diff --git "a/train.jsonl" "b/train.jsonl" --- "a/train.jsonl" +++ "b/train.jsonl" @@ -1,7010 +1,7010 @@ -{"question": "SELECT COUNT(*) FROM head WHERE age > 56", "answer": "How many heads of the departments are older than 56 ?\nAdditional table information: table: department_management"} -{"question": "SELECT name, born_state, age FROM head ORDER BY age NULLS FIRST", "answer": "List the name, born state and age of the heads of departments ordered by age.\nAdditional table information: table: department_management"} -{"question": "SELECT creation, name, budget_in_billions FROM department", "answer": "List the creation year, name and budget of each department.\nAdditional table information: table: department_management"} -{"question": "SELECT MAX(budget_in_billions), MIN(budget_in_billions) FROM department", "answer": "What are the maximum and minimum budget of the departments?\nAdditional table information: table: department_management"} -{"question": "SELECT AVG(num_employees) FROM department WHERE ranking BETWEEN 10 AND 15", "answer": "What is the average number of employees of the departments whose rank is between 10 and 15?\nAdditional table information: table: department_management"} -{"question": "SELECT name FROM head WHERE born_state <> 'California'", "answer": "What are the names of the heads who are born outside the California state?\nAdditional table information: table: department_management"} -{"question": "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'", "answer": "What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'?\nAdditional table information: table: department_management"} -{"question": "SELECT born_state FROM head GROUP BY born_state HAVING COUNT(*) >= 3", "answer": "What are the names of the states where at least 3 heads were born?\nAdditional table information: table: department_management"} -{"question": "SELECT creation FROM department GROUP BY creation ORDER BY COUNT(*) DESC LIMIT 1", "answer": "In which year were most departments established?\nAdditional table information: table: department_management"} -{"question": "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'", "answer": "Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'?\nAdditional table information: table: department_management"} -{"question": "SELECT COUNT(DISTINCT temporary_acting) FROM management", "answer": "How many acting statuses are there?\nAdditional table information: table: department_management"} -{"question": "SELECT COUNT(*) FROM department WHERE NOT department_id IN (SELECT department_id FROM management)", "answer": "How many departments are led by heads who are not mentioned?\nAdditional table information: table: department_management"} -{"question": "SELECT DISTINCT T1.age FROM management AS T2 JOIN head AS T1 ON T1.head_id = T2.head_id WHERE T2.temporary_acting = 'Yes'", "answer": "What are the distinct ages of the heads who are acting?\nAdditional table information: table: department_management"} -{"question": "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'", "answer": "List the states where both the secretary of 'Treasury' department and the secretary of 'Homeland Security' were born.\nAdditional table information: table: department_management"} -{"question": "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", "answer": "Which department has more than 1 head at a time? List the id, name and the number of heads.\nAdditional table information: table: department_management"} -{"question": "SELECT head_id, name FROM head WHERE name LIKE '%Ha%'", "answer": "Which head's name has the substring 'Ha'? List the id and name.\nAdditional table information: table: department_management"} -{"question": "SELECT COUNT(*) FROM farm", "answer": "How many farms are there?\nAdditional table information: table: farm"} -{"question": "SELECT COUNT(*) FROM farm", "answer": "Count the number of farms.\nAdditional table information: table: farm"} -{"question": "SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC NULLS FIRST", "answer": "List the total number of horses on farms in ascending order.\nAdditional table information: table: farm"} -{"question": "SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC NULLS FIRST", "answer": "What is the total horses record for each farm, sorted ascending?\nAdditional table information: table: farm"} -{"question": "SELECT Hosts FROM farm_competition WHERE Theme <> 'Aliens'", "answer": "What are the hosts of competitions whose theme is not 'Aliens'?\nAdditional table information: table: farm"} -{"question": "SELECT Hosts FROM farm_competition WHERE Theme <> 'Aliens'", "answer": "Return the hosts of competitions for which the theme is not Aliens?\nAdditional table information: table: farm"} -{"question": "SELECT Theme FROM farm_competition ORDER BY YEAR ASC NULLS FIRST", "answer": "What are the themes of farm competitions sorted by year in ascending order?\nAdditional table information: table: farm"} -{"question": "SELECT Theme FROM farm_competition ORDER BY YEAR ASC NULLS FIRST", "answer": "Return the themes of farm competitions, sorted by year ascending.\nAdditional table information: table: farm"} -{"question": "SELECT AVG(Working_Horses) FROM farm WHERE Total_Horses > 5000", "answer": "What is the average number of working horses of farms with more than 5000 total number of horses?\nAdditional table information: table: farm"} -{"question": "SELECT AVG(Working_Horses) FROM farm WHERE Total_Horses > 5000", "answer": "Give the average number of working horses on farms with more than 5000 total horses.\nAdditional table information: table: farm"} -{"question": "SELECT MAX(Cows), MIN(Cows) FROM farm", "answer": "What are the maximum and minimum number of cows across all farms.\nAdditional table information: table: farm"} -{"question": "SELECT MAX(Cows), MIN(Cows) FROM farm", "answer": "Return the maximum and minimum number of cows across all farms.\nAdditional table information: table: farm"} -{"question": "SELECT COUNT(DISTINCT Status) FROM city", "answer": "How many different statuses do cities have?\nAdditional table information: table: farm"} -{"question": "SELECT COUNT(DISTINCT Status) FROM city", "answer": "Count the number of different statuses.\nAdditional table information: table: farm"} -{"question": "SELECT Official_Name FROM city ORDER BY Population DESC", "answer": "List official names of cities in descending order of population.\nAdditional table information: table: farm"} -{"question": "SELECT Official_Name FROM city ORDER BY Population DESC", "answer": "What are the official names of cities, ordered descending by population?\nAdditional table information: table: farm"} -{"question": "SELECT Official_Name, Status FROM city ORDER BY Population DESC LIMIT 1", "answer": "List the official name and status of the city with the largest population.\nAdditional table information: table: farm"} -{"question": "SELECT Official_Name, Status FROM city ORDER BY Population DESC LIMIT 1", "answer": "What is the official name and status of the city with the most residents?\nAdditional table information: table: farm"} -{"question": "SELECT T2.Year, T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID", "answer": "Show the years and the official names of the host cities of competitions.\nAdditional table information: table: farm"} -{"question": "SELECT T2.Year, T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID", "answer": "Give the years and official names of the cities of each competition.\nAdditional table information: table: farm"} -{"question": "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", "answer": "Show the official names of the cities that have hosted more than one competition.\nAdditional table information: table: farm"} -{"question": "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", "answer": "What are the official names of cities that have hosted more than one competition?\nAdditional table information: table: farm"} -{"question": "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", "answer": "Show the status of the city that has hosted the greatest number of competitions.\nAdditional table information: table: farm"} -{"question": "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", "answer": "What is the status of the city that has hosted the most competitions?\nAdditional table information: table: farm"} -{"question": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000", "answer": "Please show the themes of competitions with host cities having populations larger than 1000.\nAdditional table information: table: farm"} -{"question": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000", "answer": "What are the themes of competitions that have corresponding host cities with more than 1000 residents?\nAdditional table information: table: farm"} -{"question": "SELECT Status, AVG(Population) FROM city GROUP BY Status", "answer": "Please show the different statuses of cities and the average population of cities with each status.\nAdditional table information: table: farm"} -{"question": "SELECT Status, AVG(Population) FROM city GROUP BY Status", "answer": "What are the statuses and average populations of each city?\nAdditional table information: table: farm"} -{"question": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC NULLS FIRST", "answer": "Please show the different statuses, ordered by the number of cities that have each.\nAdditional table information: table: farm"} -{"question": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC NULLS FIRST", "answer": "Return the different statuses of cities, ascending by frequency.\nAdditional table information: table: farm"} -{"question": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the most common type of Status across cities.\nAdditional table information: table: farm"} -{"question": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common status across all cities?\nAdditional table information: table: farm"} -{"question": "SELECT Official_Name FROM city WHERE NOT City_ID IN (SELECT Host_city_ID FROM farm_competition)", "answer": "List the official names of cities that have not held any competition.\nAdditional table information: table: farm"} -{"question": "SELECT Official_Name FROM city WHERE NOT City_ID IN (SELECT Host_city_ID FROM farm_competition)", "answer": "What are the official names of cities that have not hosted a farm competition?\nAdditional table information: table: farm"} -{"question": "SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500", "answer": "Show the status shared by cities with population bigger than 1500 and smaller than 500.\nAdditional table information: table: farm"} -{"question": "SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500", "answer": "Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500?\nAdditional table information: table: farm"} -{"question": "SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500", "answer": "Find the official names of cities with population bigger than 1500 or smaller than 500.\nAdditional table information: table: farm"} -{"question": "SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500", "answer": "What are the official names of cities that have population over 1500 or less than 500?\nAdditional table information: table: farm"} -{"question": "SELECT Census_Ranking FROM city WHERE Status <> 'Village'", "answer": "Show the census ranking of cities whose status are not 'Village'.\nAdditional table information: table: farm"} -{"question": "SELECT Census_Ranking FROM city WHERE Status <> 'Village'", "answer": "What are the census rankings of cities that do not have the status 'Village'?\nAdditional table information: table: farm"} -{"question": "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", "answer": "which course has most number of registered students?\nAdditional table information: table: student_assessment"} -{"question": "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", "answer": "What is the name of the course with the most registered students?\nAdditional table information: table: student_assessment"} -{"question": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "what is id of students who registered some courses but the least number of courses in these students?\nAdditional table information: table: student_assessment"} -{"question": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "What are the ids of the students who registered for some courses but had the least number of courses for all students?\nAdditional table information: table: student_assessment"} -{"question": "SELECT T2.first_name, T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id", "answer": "what are the first name and last name of all candidates?\nAdditional table information: table: student_assessment"} -{"question": "SELECT T2.first_name, T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id", "answer": "What are the first and last names of all the candidates?\nAdditional table information: table: student_assessment"} -{"question": "SELECT student_id FROM students WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance)", "answer": "List the id of students who never attends courses?\nAdditional table information: table: student_assessment"} -{"question": "SELECT student_id FROM students WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance)", "answer": "What are the ids of every student who has never attended a course?\nAdditional table information: table: student_assessment"} -{"question": "SELECT student_id FROM student_course_attendance", "answer": "List the id of students who attended some courses?\nAdditional table information: table: student_assessment"} -{"question": "SELECT student_id FROM student_course_attendance", "answer": "What are the ids of all students who have attended at least one course?\nAdditional table information: table: student_assessment"} -{"question": "SELECT T1.student_id, T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id", "answer": "What are the ids of all students for courses and what are the names of those courses?\nAdditional table information: table: student_assessment"} -{"question": "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", "answer": "What is detail of the student who most recently registered course?\nAdditional table information: table: student_assessment"} -{"question": "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", "answer": "What details do we have on the students who registered for courses most recently?\nAdditional table information: table: student_assessment"} -{"question": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'English'", "answer": "How many students attend course English?\nAdditional table information: table: student_assessment"} -{"question": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'English'", "answer": "How many students are attending English courses?\nAdditional table information: table: student_assessment"} -{"question": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171", "answer": "How many courses do the student whose id is 171 attend?\nAdditional table information: table: student_assessment"} -{"question": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171", "answer": "How many courses does the student with id 171 actually attend?\nAdditional table information: table: student_assessment"} -{"question": "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'", "answer": "Find id of the candidate whose email is stanley.monahan@example.org?\nAdditional table information: table: student_assessment"} -{"question": "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'", "answer": "What is the id of the candidate whose email is stanley.monahan@example.org?\nAdditional table information: table: student_assessment"} -{"question": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1", "answer": "Find id of the candidate who most recently accessed the course?\nAdditional table information: table: student_assessment"} -{"question": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1", "answer": "What is the id of the candidate who most recently accessed the course?\nAdditional table information: table: student_assessment"} -{"question": "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", "answer": "What is detail of the student who registered the most number of courses?\nAdditional table information: table: student_assessment"} -{"question": "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", "answer": "What are the details of the student who registered for the most number of courses?\nAdditional table information: table: student_assessment"} -{"question": "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", "answer": "List the id of students who registered some courses and the number of their registered courses?\nAdditional table information: table: student_assessment"} -{"question": "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", "answer": "For every student who is registered for some course, how many courses are they registered for?\nAdditional table information: table: student_assessment"} -{"question": "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", "answer": "How many registed students do each course have? List course name and the number of their registered students?\nAdditional table information: table: student_assessment"} -{"question": "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", "answer": "For each course id, how many students are registered and what are the course names?\nAdditional table information: table: student_assessment"} -{"question": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = 'Pass'", "answer": "Find id of candidates whose assessment code is 'Pass'?\nAdditional table information: table: student_assessment"} -{"question": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = 'Pass'", "answer": "What are the ids of the candidates that have an outcome code of Pass?\nAdditional table information: table: student_assessment"} -{"question": "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'", "answer": "Find the cell mobile number of the candidates whose assessment code is 'Fail'?\nAdditional table information: table: student_assessment"} -{"question": "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'", "answer": "What are the cell phone numbers of the candidates that received an assessment code of 'Fail'?\nAdditional table information: table: student_assessment"} -{"question": "SELECT student_id FROM student_course_attendance WHERE course_id = 301", "answer": "What are the id of students who registered course 301?\nAdditional table information: table: student_assessment"} -{"question": "SELECT student_id FROM student_course_attendance WHERE course_id = 301", "answer": "What are the ids of the students who registered for course 301?\nAdditional table information: table: student_assessment"} -{"question": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1", "answer": "What is the id of the student who most recently registered course 301?\nAdditional table information: table: student_assessment"} -{"question": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1", "answer": "What are the ids of the students who registered for course 301 most recently?\nAdditional table information: table: student_assessment"} -{"question": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id", "answer": "Find distinct cities of addresses of people?\nAdditional table information: table: student_assessment"} -{"question": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id", "answer": "What are the different cities where people live?\nAdditional table information: table: student_assessment"} -{"question": "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", "answer": "Find distinct cities of address of students?\nAdditional table information: table: student_assessment"} -{"question": "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", "answer": "What are the different cities where students live?\nAdditional table information: table: student_assessment"} -{"question": "SELECT course_name FROM courses ORDER BY course_name NULLS FIRST", "answer": "List the names of courses in alphabetical order?\nAdditional table information: table: student_assessment"} -{"question": "SELECT course_name FROM courses ORDER BY course_name NULLS FIRST", "answer": "What are the names of the courses in alphabetical order?\nAdditional table information: table: student_assessment"} -{"question": "SELECT first_name FROM people ORDER BY first_name NULLS FIRST", "answer": "List the first names of people in alphabetical order?\nAdditional table information: table: student_assessment"} -{"question": "SELECT first_name FROM people ORDER BY first_name NULLS FIRST", "answer": "What are the first names of the people in alphabetical order?\nAdditional table information: table: student_assessment"} -{"question": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance", "answer": "What are the id of students who registered courses or attended courses?\nAdditional table information: table: student_assessment"} -{"question": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance", "answer": "What are the ids of the students who either registered or attended a course?\nAdditional table information: table: student_assessment"} -{"question": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121", "answer": "Find the id of courses which are registered or attended by student whose id is 121?\nAdditional table information: table: student_assessment"} -{"question": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121", "answer": "What are the ids of the courses that are registered or attended by the student whose id is 121?\nAdditional table information: table: student_assessment"} -{"question": "SELECT * FROM student_course_registrations WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance)", "answer": "What are all info of students who registered courses but not attended courses?\nAdditional table information: table: student_assessment"} -{"question": "SELECT * FROM student_course_registrations WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance)", "answer": "What are all details of the students who registered but did not attend any course?\nAdditional table information: table: student_assessment"} -{"question": "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 NULLS FIRST", "answer": "List the id of students who registered course statistics in the order of registration date.\nAdditional table information: table: student_assessment"} -{"question": "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 NULLS FIRST", "answer": "What are the ids of the students who registered course statistics by order of registration date?\nAdditional table information: table: student_assessment"} -{"question": "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 NULLS FIRST", "answer": "List the id of students who attended statistics courses in the order of attendance date.\nAdditional table information: table: student_assessment"} -{"question": "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 NULLS FIRST", "answer": "What are the ids of the students who attended courses in the statistics department in order of attendance date.\nAdditional table information: table: student_assessment"} -{"question": "SELECT date FROM weather WHERE max_temperature_f > 85", "answer": "Give me the dates when the max temperature was higher than 85.\nAdditional table information: table: bike_1"} -{"question": "SELECT date FROM weather WHERE max_temperature_f > 85", "answer": "What are the dates with a maximum temperature higher than 85?\nAdditional table information: table: bike_1"} -{"question": "SELECT name FROM station WHERE lat < 37.5", "answer": "What are the names of stations that have latitude lower than 37.5?\nAdditional table information: table: bike_1"} -{"question": "SELECT name FROM station WHERE lat < 37.5", "answer": "What are the names of all stations with a latitude smaller than 37.5?\nAdditional table information: table: bike_1"} -{"question": "SELECT city, MAX(lat) FROM station GROUP BY city", "answer": "For each city, return the highest latitude among its stations.\nAdditional table information: table: bike_1"} -{"question": "SELECT city, MAX(lat) FROM station GROUP BY city", "answer": "For each city, what is the highest latitude for its stations?\nAdditional table information: table: bike_1"} -{"question": "SELECT start_station_name, end_station_name FROM trip ORDER BY id NULLS FIRST LIMIT 3", "answer": "Give me the start station and end station for the trips with the three oldest id.\nAdditional table information: table: bike_1"} -{"question": "SELECT start_station_name, end_station_name FROM trip ORDER BY id NULLS FIRST LIMIT 3", "answer": "What is the station station and end station for the trips with the three smallest ids?\nAdditional table information: table: bike_1"} -{"question": "SELECT AVG(lat), AVG(long) FROM station WHERE city = 'San Jose'", "answer": "What is the average latitude and longitude of stations located in San Jose city?\nAdditional table information: table: bike_1"} -{"question": "SELECT AVG(lat), AVG(long) FROM station WHERE city = 'San Jose'", "answer": "What is the average latitude and longitude in San Jose?\nAdditional table information: table: bike_1"} -{"question": "SELECT id FROM trip ORDER BY duration NULLS FIRST LIMIT 1", "answer": "What is the id of the trip that has the shortest duration?\nAdditional table information: table: bike_1"} -{"question": "SELECT id FROM trip ORDER BY duration NULLS FIRST LIMIT 1", "answer": "What is the id of the shortest trip?\nAdditional table information: table: bike_1"} -{"question": "SELECT SUM(duration), MAX(duration) FROM trip WHERE bike_id = 636", "answer": "What is the total and maximum duration of trips with bike id 636?\nAdditional table information: table: bike_1"} -{"question": "SELECT SUM(duration), MAX(duration) FROM trip WHERE bike_id = 636", "answer": "What is the total and maximum duration for all trips with the bike id 636?\nAdditional table information: table: bike_1"} -{"question": "SELECT zip_code, AVG(mean_temperature_f) FROM weather WHERE date LIKE '8/%' GROUP BY zip_code", "answer": "For each zip code, return the average mean temperature of August there.\nAdditional table information: table: bike_1"} -{"question": "SELECT zip_code, AVG(mean_temperature_f) FROM weather WHERE date LIKE '8/%' GROUP BY zip_code", "answer": "For each zip code, what is the average mean temperature for all dates that start with '8'?\nAdditional table information: table: bike_1"} -{"question": "SELECT COUNT(DISTINCT bike_id) FROM trip", "answer": "From the trip record, find the number of unique bikes.\nAdditional table information: table: bike_1"} -{"question": "SELECT COUNT(DISTINCT bike_id) FROM trip", "answer": "How many different bike ids are there?\nAdditional table information: table: bike_1"} -{"question": "SELECT COUNT(DISTINCT city) FROM station", "answer": "What is the number of distinct cities the stations are located at?\nAdditional table information: table: bike_1"} -{"question": "SELECT COUNT(DISTINCT city) FROM station", "answer": "How many different cities have these stations?\nAdditional table information: table: bike_1"} -{"question": "SELECT COUNT(*) FROM station WHERE city = 'Mountain View'", "answer": "How many stations does Mountain View city has?\nAdditional table information: table: bike_1"} -{"question": "SELECT COUNT(*) FROM station WHERE city = 'Mountain View'", "answer": "How many stations are in Mountain View?\nAdditional table information: table: bike_1"} -{"question": "SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7", "answer": "Return the unique name for stations that have ever had 7 bikes available.\nAdditional table information: table: bike_1"} -{"question": "SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7", "answer": "What are the different names for each station that has ever had 7 bikes available?\nAdditional table information: table: bike_1"} -{"question": "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", "answer": "Which start station had the most trips starting from August? Give me the name and id of the station.\nAdditional table information: table: bike_1"} -{"question": "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", "answer": "What are the start station's name and id for the one that had the most start trips in August?\nAdditional table information: table: bike_1"} -{"question": "SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which bike traveled the most often in zip code 94002?\nAdditional table information: table: bike_1"} -{"question": "SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id of the bike that traveled the most in 94002?\nAdditional table information: table: bike_1"} -{"question": "SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8", "answer": "How many days had both mean humidity above 50 and mean visibility above 8?\nAdditional table information: table: bike_1"} -{"question": "SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8", "answer": "What is the number of days that had an average humity above 50 and an average visibility above 8?\nAdditional table information: table: bike_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the latitude, longitude, city of the station from which the shortest trip started?\nAdditional table information: table: bike_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the latitude, longitude, and city of the station from which the trip with smallest duration started?\nAdditional table information: table: bike_1"} -{"question": "SELECT id FROM station WHERE city = 'San Francisco' INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING AVG(bikes_available) > 10", "answer": "What are the ids of stations that are located in San Francisco and have average bike availability above 10.\nAdditional table information: table: bike_1"} -{"question": "SELECT id FROM station WHERE city = 'San Francisco' INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING AVG(bikes_available) > 10", "answer": "What are the ids of the stations in San Francisco that normally have more than 10 bikes available?\nAdditional table information: table: bike_1"} -{"question": "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/%'", "answer": "What are the names and ids of stations that had more than 14 bikes available on average or were installed in December?\nAdditional table information: table: bike_1"} -{"question": "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/%'", "answer": "What are the names and ids of all stations that have more than 14 bikes available on average or had bikes installed in December?\nAdditional table information: table: bike_1"} -{"question": "SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What is the 3 most common cloud cover rates in the region of zip code 94107?\nAdditional table information: table: bike_1"} -{"question": "SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What are the 3 most common cloud covers in the zip code of 94107?\nAdditional table information: table: bike_1"} -{"question": "SELECT zip_code FROM weather GROUP BY zip_code ORDER BY AVG(mean_sea_level_pressure_inches) NULLS FIRST LIMIT 1", "answer": "What is the zip code in which the average mean sea level pressure is the lowest?\nAdditional table information: table: bike_1"} -{"question": "SELECT zip_code FROM weather GROUP BY zip_code ORDER BY AVG(mean_sea_level_pressure_inches) NULLS FIRST LIMIT 1", "answer": "What is the zip code that has the lowest average mean sea level pressure?\nAdditional table information: table: bike_1"} -{"question": "SELECT AVG(bikes_available) FROM status WHERE NOT station_id IN (SELECT id FROM station WHERE city = 'Palo Alto')", "answer": "What is the average bike availability in stations that are not located in Palo Alto?\nAdditional table information: table: bike_1"} -{"question": "SELECT AVG(bikes_available) FROM status WHERE NOT station_id IN (SELECT id FROM station WHERE city = 'Palo Alto')", "answer": "What is the average bike availablility for stations not in Palo Alto?\nAdditional table information: table: bike_1"} -{"question": "SELECT AVG(long) FROM station WHERE NOT id IN (SELECT station_id FROM status GROUP BY station_id HAVING MAX(bikes_available) > 10)", "answer": "What is the average longitude of stations that never had bike availability more than 10?\nAdditional table information: table: bike_1"} -{"question": "SELECT AVG(long) FROM station WHERE NOT id IN (SELECT station_id FROM status GROUP BY station_id HAVING MAX(bikes_available) > 10)", "answer": "What is the mean longitude for all stations that have never had more than 10 bikes available?\nAdditional table information: table: bike_1"} -{"question": "SELECT date, zip_code FROM weather WHERE max_temperature_f >= 80", "answer": "When and in what zip code did max temperature reach 80?\nAdditional table information: table: bike_1"} -{"question": "SELECT date, zip_code FROM weather WHERE max_temperature_f >= 80", "answer": "What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature?\nAdditional table information: table: bike_1"} -{"question": "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", "answer": "Give me ids for all the trip that took place in a zip code area with average mean temperature above 60.\nAdditional table information: table: bike_1"} -{"question": "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", "answer": "For each zip code, find the ids of all trips that have a higher average mean temperature above 60?\nAdditional table information: table: bike_1"} -{"question": "SELECT zip_code, COUNT(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code", "answer": "For each zip code, return how many times max wind speed reached 25?\nAdditional table information: table: bike_1"} -{"question": "SELECT zip_code, COUNT(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code", "answer": "For each zip code, how many times has the maximum wind speed reached 25 mph?\nAdditional table information: table: bike_1"} -{"question": "SELECT date, zip_code FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107)", "answer": "On which day and in which zip code was the min dew point lower than any day in zip code 94107?\nAdditional table information: table: bike_1"} -{"question": "SELECT date, zip_code FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107)", "answer": "Which days had a minimum dew point smaller than any day in zip code 94107, and in which zip codes were those measurements taken?\nAdditional table information: table: bike_1"} -{"question": "SELECT T1.id, T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id", "answer": "For each trip, return its ending station's installation date.\nAdditional table information: table: bike_1"} -{"question": "SELECT T1.id, T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id", "answer": "What is the installation date for each ending station on all the trips?\nAdditional table information: table: bike_1"} -{"question": "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", "answer": "Which trip started from the station with the largest dock count? Give me the trip id.\nAdditional table information: table: bike_1"} -{"question": "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", "answer": "What is the id of the trip that started from the station with the highest dock count?\nAdditional table information: table: bike_1"} -{"question": "SELECT COUNT(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city <> 'San Francisco'", "answer": "Count the number of trips that did not end in San Francisco city.\nAdditional table information: table: bike_1"} -{"question": "SELECT COUNT(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city <> 'San Francisco'", "answer": "How many trips did not end in San Francisco?\nAdditional table information: table: bike_1"} -{"question": "SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS <> 'Fog' AND EVENTS <> 'Rain'", "answer": "In zip code 94107, on which day neither Fog nor Rain was not observed?\nAdditional table information: table: bike_1"} -{"question": "SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS <> 'Fog' AND EVENTS <> 'Rain'", "answer": "On which day has it neither been foggy nor rained in the zip code of 94107?\nAdditional table information: table: bike_1"} -{"question": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING MIN(bikes_available) < 7", "answer": "What are the ids of stations that have latitude above 37.4 and never had bike availability below 7?\nAdditional table information: table: bike_1"} -{"question": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING MIN(bikes_available) < 7", "answer": "What are the ids of all stations that have a latitude above 37.4 and have never had less than 7 bikes available?\nAdditional table information: table: bike_1"} -{"question": "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'", "answer": "What are names of stations that have average bike availability above 10 and are not located in San Jose city?\nAdditional table information: table: bike_1"} -{"question": "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'", "answer": "What are the names of all stations that have more than 10 bikes available and are not located in San Jose?\nAdditional table information: table: bike_1"} -{"question": "SELECT name, lat, city FROM station ORDER BY lat NULLS FIRST LIMIT 1", "answer": "What are the name, latitude, and city of the station with the lowest latitude?\nAdditional table information: table: bike_1"} -{"question": "SELECT name, lat, city FROM station ORDER BY lat NULLS FIRST LIMIT 1", "answer": "What is the name, latitude, and city of the station that is located the furthest South?\nAdditional table information: table: bike_1"} -{"question": "SELECT date, mean_temperature_f, mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3", "answer": "What are the date, mean temperature and mean humidity for the top 3 days with the largest max gust speeds?\nAdditional table information: table: bike_1"} -{"question": "SELECT date, mean_temperature_f, mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3", "answer": "What is the date, average temperature and mean humidity for the days with the 3 largest maximum gust speeds?\nAdditional table information: table: bike_1"} -{"question": "SELECT city, COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15", "answer": "List the name and the number of stations for all the cities that have at least 15 stations.\nAdditional table information: table: bike_1"} -{"question": "SELECT city, COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15", "answer": "What is the name of every city that has at least 15 stations and how many stations does it have?\nAdditional table information: table: bike_1"} -{"question": "SELECT start_station_id, start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200", "answer": "Find the ids and names of stations from which at least 200 trips started.\nAdditional table information: table: bike_1"} -{"question": "SELECT start_station_id, start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200", "answer": "What are the ids and names of all start stations that were the beginning of at least 200 trips?\nAdditional table information: table: bike_1"} -{"question": "SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_visibility_miles) < 10", "answer": "Find the zip code in which the average mean visibility is lower than 10.\nAdditional table information: table: bike_1"} -{"question": "SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_visibility_miles) < 10", "answer": "For each zip code, select all those that have an average mean visiblity below 10.\nAdditional table information: table: bike_1"} -{"question": "SELECT city FROM station GROUP BY city ORDER BY MAX(lat) DESC", "answer": "List all the cities in a decreasing order of each city's stations' highest latitude.\nAdditional table information: table: bike_1"} -{"question": "SELECT city FROM station GROUP BY city ORDER BY MAX(lat) DESC", "answer": "For each city, list their names in decreasing order by their highest station latitude.\nAdditional table information: table: bike_1"} -{"question": "SELECT date, cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5", "answer": "What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate.\nAdditional table information: table: bike_1"} -{"question": "SELECT date, cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5", "answer": "What are the dates that have the 5 highest cloud cover rates and what are the rates?\nAdditional table information: table: bike_1"} -{"question": "SELECT id, duration FROM trip ORDER BY duration DESC LIMIT 3", "answer": "What are the ids and durations of the trips with the top 3 durations?\nAdditional table information: table: bike_1"} -{"question": "SELECT id, duration FROM trip ORDER BY duration DESC LIMIT 3", "answer": "What are the ids of the trips that lasted the longest and how long did they last?\nAdditional table information: table: bike_1"} -{"question": "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", "answer": "For each station, return its longitude and the average duration of trips that started from the station.\nAdditional table information: table: bike_1"} -{"question": "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", "answer": "For each start station id, what is its name, longitude and average duration of trips started there?\nAdditional table information: table: bike_1"} -{"question": "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", "answer": "For each station, find its latitude and the minimum duration of trips that ended at the station.\nAdditional table information: table: bike_1"} -{"question": "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", "answer": "For each end station id, what is its name, latitude, and minimum duration for trips ended there?\nAdditional table information: table: bike_1"} -{"question": "SELECT DISTINCT start_station_name FROM trip WHERE duration < 100", "answer": "List all the distinct stations from which a trip of duration below 100 started.\nAdditional table information: table: bike_1"} -{"question": "SELECT DISTINCT start_station_name FROM trip WHERE duration < 100", "answer": "What are all the different start station names for a trip that lasted less than 100?\nAdditional table information: table: bike_1"} -{"question": "SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70", "answer": "Find all the zip codes in which the max dew point have never reached 70.\nAdditional table information: table: bike_1"} -{"question": "SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70", "answer": "What are all the different zip codes that have a maximum dew point that was always below 70?\nAdditional table information: table: bike_1"} -{"question": "SELECT id FROM trip WHERE duration >= (SELECT AVG(duration) FROM trip WHERE zip_code = 94103)", "answer": "Find the id for the trips that lasted at least as long as the average duration of trips in zip code 94103.\nAdditional table information: table: bike_1"} -{"question": "SELECT id FROM trip WHERE duration >= (SELECT AVG(duration) FROM trip WHERE zip_code = 94103)", "answer": "What are the ids of all trips that had a duration as long as the average trip duration in the zip code 94103?\nAdditional table information: table: bike_1"} -{"question": "SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31", "answer": "What are the dates in which the mean sea level pressure was between 30.3 and 31?\nAdditional table information: table: bike_1"} -{"question": "SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31", "answer": "What are the dates that have an average sea level pressure between 30.3 and 31?\nAdditional table information: table: bike_1"} -{"question": "SELECT date, max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f NULLS FIRST LIMIT 1", "answer": "Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference.\nAdditional table information: table: bike_1"} -{"question": "SELECT date, max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f NULLS FIRST LIMIT 1", "answer": "What are the days that had the smallest temperature range, and what was that range?\nAdditional table information: table: bike_1"} -{"question": "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", "answer": "What are the id and name of the stations that have ever had more than 12 bikes available?\nAdditional table information: table: bike_1"} -{"question": "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", "answer": "What are the different ids and names of the stations that have had more than 12 bikes available?\nAdditional table information: table: bike_1"} -{"question": "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", "answer": "Give me the zip code where the average mean humidity is below 70 and at least 100 trips took place.\nAdditional table information: table: bike_1"} -{"question": "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", "answer": "What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there?\nAdditional table information: table: bike_1"} -{"question": "SELECT name FROM station WHERE city = 'Palo Alto' EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING COUNT(*) > 100", "answer": "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?\nAdditional table information: table: bike_1"} -{"question": "SELECT name FROM station WHERE city = 'Palo Alto' EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING COUNT(*) > 100", "answer": "What are the names of the stations that are located in Palo Alto but have never been the ending point of the trips\nAdditional table information: table: bike_1"} -{"question": "SELECT COUNT(*) FROM station AS T1, trip AS T2, 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'", "answer": "How many trips started from Mountain View city and ended at Palo Alto city?\nAdditional table information: table: bike_1"} -{"question": "SELECT COUNT(*) FROM station AS T1, trip AS T2, 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'", "answer": "How many trips stated from a station in Mountain View and ended at one in Palo Alto?\nAdditional table information: table: bike_1"} -{"question": "SELECT AVG(T1.lat), AVG(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id", "answer": "What is the average latitude and longitude of the starting points of all trips?\nAdditional table information: table: bike_1"} -{"question": "SELECT AVG(T1.lat), AVG(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id", "answer": "What is the average latitude and longitude of all starting stations for the trips?\nAdditional table information: table: bike_1"} -{"question": "SELECT COUNT(*) FROM book", "answer": "How many books are there?\nAdditional table information: table: book_2"} -{"question": "SELECT Writer FROM book ORDER BY Writer ASC NULLS FIRST", "answer": "List the writers of the books in ascending alphabetical order.\nAdditional table information: table: book_2"} -{"question": "SELECT Title FROM book ORDER BY Issues ASC NULLS FIRST", "answer": "List the titles of the books in ascending order of issues.\nAdditional table information: table: book_2"} -{"question": "SELECT Title FROM book WHERE Writer <> 'Elaine Lee'", "answer": "What are the titles of the books whose writer is not 'Elaine Lee'?\nAdditional table information: table: book_2"} -{"question": "SELECT Title, Issues FROM book", "answer": "What are the title and issues of the books?\nAdditional table information: table: book_2"} -{"question": "SELECT Publication_Date FROM publication ORDER BY Price DESC", "answer": "What are the dates of publications in descending order of price?\nAdditional table information: table: book_2"} -{"question": "SELECT DISTINCT Publisher FROM publication WHERE Price > 5000000", "answer": "What are the distinct publishers of publications with price higher than 5000000?\nAdditional table information: table: book_2"} -{"question": "SELECT Publisher FROM publication ORDER BY Price DESC LIMIT 1", "answer": "List the publisher of the publication with the highest price.\nAdditional table information: table: book_2"} -{"question": "SELECT Publication_Date FROM publication ORDER BY Price ASC NULLS FIRST LIMIT 3", "answer": "List the publication dates of publications with 3 lowest prices.\nAdditional table information: table: book_2"} -{"question": "SELECT T1.Title, T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID", "answer": "Show the title and publication dates of books.\nAdditional table information: table: book_2"} -{"question": "SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID WHERE T2.Price > 4000000", "answer": "Show writers who have published a book with price more than 4000000.\nAdditional table information: table: book_2"} -{"question": "SELECT T1.Title FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID ORDER BY T2.Price DESC", "answer": "Show the titles of books in descending order of publication price.\nAdditional table information: table: book_2"} -{"question": "SELECT Publisher FROM publication GROUP BY Publisher HAVING COUNT(*) > 1", "answer": "Show publishers that have more than one publication.\nAdditional table information: table: book_2"} -{"question": "SELECT Publisher, COUNT(*) FROM publication GROUP BY Publisher", "answer": "Show different publishers together with the number of publications they have.\nAdditional table information: table: book_2"} -{"question": "SELECT Publication_Date FROM publication GROUP BY Publication_Date ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the most common publication date.\nAdditional table information: table: book_2"} -{"question": "SELECT Writer FROM book GROUP BY Writer HAVING COUNT(*) > 1", "answer": "List the writers who have written more than one book.\nAdditional table information: table: book_2"} -{"question": "SELECT Title FROM book WHERE NOT Book_ID IN (SELECT Book_ID FROM publication)", "answer": "List the titles of books that are not published.\nAdditional table information: table: book_2"} -{"question": "SELECT Publisher FROM publication WHERE Price > 10000000 INTERSECT SELECT Publisher FROM publication WHERE Price < 5000000", "answer": "Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000.\nAdditional table information: table: book_2"} -{"question": "SELECT COUNT(DISTINCT Publication_Date) FROM publication", "answer": "What is the number of distinct publication dates?\nAdditional table information: table: book_2"} -{"question": "SELECT COUNT(DISTINCT Publication_Date) FROM publication", "answer": "How many distinct publication dates are there in our record?\nAdditional table information: table: book_2"} -{"question": "SELECT Price FROM publication WHERE Publisher = 'Person' OR Publisher = 'Wiley'", "answer": "Show the prices of publications whose publisher is either 'Person' or 'Wiley'\nAdditional table information: table: book_2"} -{"question": "SELECT COUNT(*) FROM actor", "answer": "How many actors are there?\nAdditional table information: table: musical"} -{"question": "SELECT COUNT(*) FROM actor", "answer": "Count the number of actors.\nAdditional table information: table: musical"} -{"question": "SELECT Name FROM actor ORDER BY Name ASC NULLS FIRST", "answer": "List the name of actors in ascending alphabetical order.\nAdditional table information: table: musical"} -{"question": "SELECT Name FROM actor ORDER BY Name ASC NULLS FIRST", "answer": "What are the names of actors, ordered alphabetically?\nAdditional table information: table: musical"} -{"question": "SELECT Character, Duration FROM actor", "answer": "What are the characters and duration of actors?\nAdditional table information: table: musical"} -{"question": "SELECT Character, Duration FROM actor", "answer": "Return the characters and durations for each actor.\nAdditional table information: table: musical"} -{"question": "SELECT Name FROM actor WHERE Age <> 20", "answer": "List the name of actors whose age is not 20.\nAdditional table information: table: musical"} -{"question": "SELECT Name FROM actor WHERE Age <> 20", "answer": "What are the names of actors who are not 20 years old?\nAdditional table information: table: musical"} -{"question": "SELECT Character FROM actor ORDER BY age DESC", "answer": "What are the characters of actors in descending order of age?\nAdditional table information: table: musical"} -{"question": "SELECT Character FROM actor ORDER BY age DESC", "answer": "Return the characters for actors, ordered by age descending.\nAdditional table information: table: musical"} -{"question": "SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1", "answer": "What is the duration of the oldest actor?\nAdditional table information: table: musical"} -{"question": "SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1", "answer": "Return the duration of the actor with the greatest age.\nAdditional table information: table: musical"} -{"question": "SELECT Name FROM musical WHERE Nominee = 'Bob Fosse'", "answer": "What are the names of musicals with nominee 'Bob Fosse'?\nAdditional table information: table: musical"} -{"question": "SELECT Name FROM musical WHERE Nominee = 'Bob Fosse'", "answer": "Return the names of musicals who have the nominee Bob Fosse.\nAdditional table information: table: musical"} -{"question": "SELECT DISTINCT Nominee FROM musical WHERE Award <> 'Tony Award'", "answer": "What are the distinct nominees of the musicals with the award that is not 'Tony Award'?\nAdditional table information: table: musical"} -{"question": "SELECT DISTINCT Nominee FROM musical WHERE Award <> 'Tony Award'", "answer": "Return the different nominees of musicals that have an award that is not the Tony Award.\nAdditional table information: table: musical"} -{"question": "SELECT T1.Name, T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID", "answer": "Show names of actors and names of musicals they are in.\nAdditional table information: table: musical"} -{"question": "SELECT T1.Name, T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID", "answer": "What are the names of actors and the musicals that they are in?\nAdditional table information: table: musical"} -{"question": "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'", "answer": "Show names of actors that have appeared in musical with name 'The Phantom of the Opera'.\nAdditional table information: table: musical"} -{"question": "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'", "answer": "What are the names of actors who have been in the musical titled The Phantom of the Opera?\nAdditional table information: table: musical"} -{"question": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC", "answer": "Show names of actors in descending order of the year their musical is awarded.\nAdditional table information: table: musical"} -{"question": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC", "answer": "What are the names of actors ordered descending by the year in which their musical was awarded?\nAdditional table information: table: musical"} -{"question": "SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID", "answer": "Show names of musicals and the number of actors who have appeared in the musicals.\nAdditional table information: table: musical"} -{"question": "SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID", "answer": "How many actors have appeared in each musical?\nAdditional table information: table: musical"} -{"question": "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", "answer": "Show names of musicals which have at least three actors.\nAdditional table information: table: musical"} -{"question": "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", "answer": "What are the names of musicals who have at 3 or more actors?\nAdditional table information: table: musical"} -{"question": "SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee", "answer": "Show different nominees and the number of musicals they have been nominated.\nAdditional table information: table: musical"} -{"question": "SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee", "answer": "How many musicals has each nominee been nominated for?\nAdditional table information: table: musical"} -{"question": "SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the nominee who has been nominated the greatest number of times.\nAdditional table information: table: musical"} -{"question": "SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Who is the nominee who has been nominated for the most musicals?\nAdditional table information: table: musical"} -{"question": "SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the most common result of the musicals.\nAdditional table information: table: musical"} -{"question": "SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the most frequent result across all musicals.\nAdditional table information: table: musical"} -{"question": "SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2", "answer": "List the nominees that have been nominated more than two musicals.\nAdditional table information: table: musical"} -{"question": "SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2", "answer": "Who are the nominees who have been nominated more than two times?\nAdditional table information: table: musical"} -{"question": "SELECT Name FROM musical WHERE NOT Musical_ID IN (SELECT Musical_ID FROM actor)", "answer": "List the name of musicals that do not have actors.\nAdditional table information: table: musical"} -{"question": "SELECT Name FROM musical WHERE NOT Musical_ID IN (SELECT Musical_ID FROM actor)", "answer": "What are the names of musicals who have no actors?\nAdditional table information: table: musical"} -{"question": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' INTERSECT SELECT Nominee FROM musical WHERE Award = 'Drama Desk Award'", "answer": "Show the nominees that have nominated musicals for both 'Tony Award' and 'Drama Desk Award'.\nAdditional table information: table: musical"} -{"question": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' INTERSECT SELECT Nominee FROM musical WHERE Award = 'Drama Desk Award'", "answer": "Who are the nominees who have been nominated for both a Tony Award and a Drama Desk Award?\nAdditional table information: table: musical"} -{"question": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' OR Award = 'Cleavant Derricks'", "answer": "Show the musical nominee with award 'Bob Fosse' or 'Cleavant Derricks'.\nAdditional table information: table: musical"} -{"question": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' OR Award = 'Cleavant Derricks'", "answer": "Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards?\nAdditional table information: table: musical"} -{"question": "SELECT email FROM user_profiles WHERE name = 'Mary'", "answer": "Find the emails of the user named 'Mary'.\nAdditional table information: table: twitter_1"} -{"question": "SELECT partitionid FROM user_profiles WHERE name = 'Iron Man'", "answer": "What is the partition id of the user named 'Iron Man'.\nAdditional table information: table: twitter_1"} -{"question": "SELECT COUNT(*) FROM user_profiles", "answer": "How many users are there?\nAdditional table information: table: twitter_1"} -{"question": "SELECT COUNT(*) FROM follows", "answer": "How many followers does each user have?\nAdditional table information: table: twitter_1"} -{"question": "SELECT COUNT(*) FROM follows GROUP BY f1", "answer": "Find the number of followers for each user.\nAdditional table information: table: twitter_1"} -{"question": "SELECT COUNT(*) FROM tweets", "answer": "Find the number of tweets in record.\nAdditional table information: table: twitter_1"} -{"question": "SELECT COUNT(DISTINCT UID) FROM tweets", "answer": "Find the number of users who posted some tweets.\nAdditional table information: table: twitter_1"} -{"question": "SELECT name, email FROM user_profiles WHERE name LIKE '%Swift%'", "answer": "Find the name and email of the user whose name contains the word \u2018Swift\u2019.\nAdditional table information: table: twitter_1"} -{"question": "SELECT name FROM user_profiles WHERE email LIKE '%superstar%' OR email LIKE '%edu%'", "answer": "Find the names of users whose emails contain \u2018superstar\u2019 or \u2018edu\u2019.\nAdditional table information: table: twitter_1"} -{"question": "SELECT text FROM tweets WHERE text LIKE '%intern%'", "answer": "Return the text of tweets about the topic 'intern'.\nAdditional table information: table: twitter_1"} -{"question": "SELECT name, email FROM user_profiles WHERE followers > 1000", "answer": "Find the name and email of the users who have more than 1000 followers.\nAdditional table information: table: twitter_1"} -{"question": "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')", "answer": "Find the names of the users whose number of followers is greater than that of the user named 'Tyler Swift'.\nAdditional table information: table: twitter_1"} -{"question": "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", "answer": "Find the name and email for the users who have more than one follower.\nAdditional table information: table: twitter_1"} -{"question": "SELECT T1.name FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT(*) > 1", "answer": "Find the names of users who have more than one tweet.\nAdditional table information: table: twitter_1"} -{"question": "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'", "answer": "Find the id of users who are followed by Mary and Susan.\nAdditional table information: table: twitter_1"} -{"question": "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'", "answer": "Find the id of users who are followed by Mary or Susan.\nAdditional table information: table: twitter_1"} -{"question": "SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 1", "answer": "Find the name of the user who has the largest number of followers.\nAdditional table information: table: twitter_1"} -{"question": "SELECT name, email FROM user_profiles ORDER BY followers NULLS FIRST LIMIT 1", "answer": "Find the name and email of the user followed by the least number of people.\nAdditional table information: table: twitter_1"} -{"question": "SELECT name, followers FROM user_profiles ORDER BY followers DESC", "answer": "List the name and number of followers for each user, and sort the results by the number of followers in descending order.\nAdditional table information: table: twitter_1"} -{"question": "SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 5", "answer": "List the names of 5 users followed by the largest number of other users.\nAdditional table information: table: twitter_1"} -{"question": "SELECT text FROM tweets ORDER BY createdate NULLS FIRST", "answer": "List the text of all tweets in the order of date.\nAdditional table information: table: twitter_1"} -{"question": "SELECT T1.name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid", "answer": "Find the name of each user and number of tweets tweeted by each of them.\nAdditional table information: table: twitter_1"} -{"question": "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", "answer": "Find the name and partition id for users who tweeted less than twice.\nAdditional table information: table: twitter_1"} -{"question": "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", "answer": "Find the name of the user who tweeted more than once, and number of tweets tweeted by them.\nAdditional table information: table: twitter_1"} -{"question": "SELECT AVG(followers) FROM user_profiles WHERE NOT UID IN (SELECT UID FROM tweets)", "answer": "Find the average number of followers for the users who do not have any tweet.\nAdditional table information: table: twitter_1"} -{"question": "SELECT AVG(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets)", "answer": "Find the average number of followers for the users who had some tweets.\nAdditional table information: table: twitter_1"} -{"question": "SELECT MAX(followers), SUM(followers) FROM user_profiles", "answer": "Find the maximum and total number of followers of all users.\nAdditional table information: table: twitter_1"} -{"question": "SELECT DISTINCT (catalog_entry_name) FROM catalog_contents", "answer": "Find the names of all the catalog entries.\nAdditional table information: table: product_catalog"} -{"question": "SELECT DISTINCT (catalog_entry_name) FROM catalog_contents", "answer": "What are all the catalog entry names?\nAdditional table information: table: product_catalog"} -{"question": "SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3", "answer": "Find the list of attribute data types possessed by more than 3 attribute definitions.\nAdditional table information: table: product_catalog"} -{"question": "SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3", "answer": "What are the attribute data types with more than 3 attribute definitions?\nAdditional table information: table: product_catalog"} -{"question": "SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = 'Green'", "answer": "What is the attribute data type of the attribute with name 'Green'?\nAdditional table information: table: product_catalog"} -{"question": "SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = 'Green'", "answer": "Find the attribute data type for the attribute named 'Green'.\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10", "answer": "Find the name and level of catalog structure with level between 5 and 10.\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10", "answer": "What are the name and level of catalog structure with level number between 5 and 10\nAdditional table information: table: product_catalog"} -{"question": "SELECT DISTINCT (catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE '%Murray%'", "answer": "Find all the catalog publishers whose name contains 'Murray'\nAdditional table information: table: product_catalog"} -{"question": "SELECT DISTINCT (catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE '%Murray%'", "answer": "Which catalog publishers have substring 'Murray' in their names?\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which catalog publisher has published the most catalogs?\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the catalog publisher that has the most catalogs.\nAdditional table information: table: product_catalog"} -{"question": "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", "answer": "Find the names and publication dates of all catalogs that have catalog level number greater than 5.\nAdditional table information: table: product_catalog"} -{"question": "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", "answer": "What are the name and publication date of the catalogs with catalog level number above 5?\nAdditional table information: table: product_catalog"} -{"question": "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)", "answer": "What are the entry names of catalog with the attribute possessed by most entries.\nAdditional table information: table: product_catalog"} -{"question": "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)", "answer": "Find the entry names of the catalog with the attribute that have the most entries.\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1", "answer": "What is the entry name of the most expensive catalog (in USD)?\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1", "answer": "Find the entry name of the catalog with the highest price (in USD).\nAdditional table information: table: product_catalog"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the level name of the cheapest catalog (in USD)?\nAdditional table information: table: product_catalog"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Find the level name of the catalog with the lowest price (in USD).\nAdditional table information: table: product_catalog"} -{"question": "SELECT AVG(price_in_euros), MIN(price_in_euros) FROM catalog_contents", "answer": "What are the average and minimum price (in Euro) of all products?\nAdditional table information: table: product_catalog"} -{"question": "SELECT AVG(price_in_euros), MIN(price_in_euros) FROM catalog_contents", "answer": "Give me the average and minimum price (in Euro) of the products.\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1", "answer": "What is the product with the highest height? Give me the catalog entry name.\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1", "answer": "Which catalog content has the highest height? Give me the catalog entry name.\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC NULLS FIRST LIMIT 1", "answer": "Find the name of the product that has the smallest capacity.\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC NULLS FIRST LIMIT 1", "answer": "Which catalog content has the smallest capacity? Return the catalog entry name.\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE '2%'", "answer": "Find the names of all the products whose stock number starts with '2'.\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE '2%'", "answer": "Which catalog contents have a product stock number that starts from '2'? Show the catalog entry names.\nAdditional table information: table: product_catalog"} -{"question": "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'", "answer": "Find the names of catalog entries with level number 8.\nAdditional table information: table: product_catalog"} -{"question": "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'", "answer": "What are the names of catalog entries with level number 8?\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5", "answer": "Find the names of the products with length smaller than 3 or height greater than 5.\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5", "answer": "Which catalog contents have length below 3 or above 5? Find the catalog entry names.\nAdditional table information: table: product_catalog"} -{"question": "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", "answer": "Find the name and attribute ID of the attribute definitions with attribute value 0.\nAdditional table information: table: product_catalog"} -{"question": "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", "answer": "Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID.\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_entry_name, capacity FROM Catalog_Contents WHERE price_in_dollars > 700", "answer": "Find the name and capacity of products with price greater than 700 (in USD).\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_entry_name, capacity FROM Catalog_Contents WHERE price_in_dollars > 700", "answer": "Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.\nAdditional table information: table: product_catalog"} -{"question": "SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING COUNT(*) > 1", "answer": "Find the dates on which more than one revisions were made.\nAdditional table information: table: product_catalog"} -{"question": "SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING COUNT(*) > 1", "answer": "On which days more than one revisions were made on catalogs.\nAdditional table information: table: product_catalog"} -{"question": "SELECT COUNT(*) FROM catalog_contents", "answer": "How many products are there in the records?\nAdditional table information: table: product_catalog"} -{"question": "SELECT COUNT(*) FROM catalog_contents", "answer": "Find the total number of catalog contents.\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8", "answer": "Name all the products with next entry ID greater than 8.\nAdditional table information: table: product_catalog"} -{"question": "SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8", "answer": "What are the catalog entry names of the products with next entry ID above 8?\nAdditional table information: table: product_catalog"} -{"question": "SELECT COUNT(*) FROM Aircraft", "answer": "How many aircrafts do we have?\nAdditional table information: table: flight_1"} -{"question": "SELECT COUNT(*) FROM Aircraft", "answer": "How many aircrafts exist in the database?\nAdditional table information: table: flight_1"} -{"question": "SELECT name, distance FROM Aircraft", "answer": "Show name and distance for all aircrafts.\nAdditional table information: table: flight_1"} -{"question": "SELECT name, distance FROM Aircraft", "answer": "What are the names and distances for all airplanes?\nAdditional table information: table: flight_1"} -{"question": "SELECT aid FROM Aircraft WHERE distance > 1000", "answer": "Show ids for all aircrafts with more than 1000 distance.\nAdditional table information: table: flight_1"} -{"question": "SELECT aid FROM Aircraft WHERE distance > 1000", "answer": "What are the ids of all aircrafts that can cover a distance of more than 1000?\nAdditional table information: table: flight_1"} -{"question": "SELECT COUNT(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000", "answer": "How many aircrafts have distance between 1000 and 5000?\nAdditional table information: table: flight_1"} -{"question": "SELECT COUNT(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000", "answer": "What is the count of aircrafts that have a distance between 1000 and 5000?\nAdditional table information: table: flight_1"} -{"question": "SELECT name, distance FROM Aircraft WHERE aid = 12", "answer": "What is the name and distance for aircraft with id 12?\nAdditional table information: table: flight_1"} -{"question": "SELECT name, distance FROM Aircraft WHERE aid = 12", "answer": "What is the name and distance for the aircraft that has an id of 12?\nAdditional table information: table: flight_1"} -{"question": "SELECT MIN(distance), AVG(distance), MAX(distance) FROM Aircraft", "answer": "What is the minimum, average, and maximum distance of all aircrafts.\nAdditional table information: table: flight_1"} -{"question": "SELECT MIN(distance), AVG(distance), MAX(distance) FROM Aircraft", "answer": "Return the minimum, average and maximum distances traveled across all aircrafts.\nAdditional table information: table: flight_1"} -{"question": "SELECT aid, name FROM Aircraft ORDER BY distance DESC LIMIT 1", "answer": "Show the id and name of the aircraft with the maximum distance.\nAdditional table information: table: flight_1"} -{"question": "SELECT aid, name FROM Aircraft ORDER BY distance DESC LIMIT 1", "answer": "What is the id and name of the aircraft that can cover the maximum distance?\nAdditional table information: table: flight_1"} -{"question": "SELECT name FROM Aircraft ORDER BY distance NULLS FIRST LIMIT 3", "answer": "Show the name of aircrafts with top three lowest distances.\nAdditional table information: table: flight_1"} -{"question": "SELECT name FROM Aircraft ORDER BY distance NULLS FIRST LIMIT 3", "answer": "What are the aircrafts with top 3 shortest lengthes? List their names.\nAdditional table information: table: flight_1"} -{"question": "SELECT name FROM Aircraft WHERE distance > (SELECT AVG(distance) FROM Aircraft)", "answer": "Show names for all aircrafts with distances more than the average.\nAdditional table information: table: flight_1"} -{"question": "SELECT name FROM Aircraft WHERE distance > (SELECT AVG(distance) FROM Aircraft)", "answer": "What are the names of all aircrafts that can cover more distances than average?\nAdditional table information: table: flight_1"} -{"question": "SELECT COUNT(*) FROM Employee", "answer": "How many employees do we have?\nAdditional table information: table: flight_1"} -{"question": "SELECT COUNT(*) FROM Employee", "answer": "What is the number of employees?\nAdditional table information: table: flight_1"} -{"question": "SELECT name, salary FROM Employee ORDER BY salary NULLS FIRST", "answer": "Show name and salary for all employees sorted by salary.\nAdditional table information: table: flight_1"} -{"question": "SELECT name, salary FROM Employee ORDER BY salary NULLS FIRST", "answer": "What is the name and salary of all employees in order of salary?\nAdditional table information: table: flight_1"} -{"question": "SELECT eid FROM Employee WHERE salary > 100000", "answer": "Show ids for all employees with at least 100000 salary.\nAdditional table information: table: flight_1"} -{"question": "SELECT eid FROM Employee WHERE salary > 100000", "answer": "What is the id of every employee who has at least a salary of 100000?\nAdditional table information: table: flight_1"} -{"question": "SELECT COUNT(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000", "answer": "How many employees have salary between 100000 and 200000?\nAdditional table information: table: flight_1"} -{"question": "SELECT COUNT(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000", "answer": "What is the number of employees that have a salary between 100000 and 200000?\nAdditional table information: table: flight_1"} -{"question": "SELECT name, salary FROM Employee WHERE eid = 242518965", "answer": "What is the name and salary for employee with id 242518965?\nAdditional table information: table: flight_1"} -{"question": "SELECT name, salary FROM Employee WHERE eid = 242518965", "answer": "What is the name and salary of the employee with the id 242518965?\nAdditional table information: table: flight_1"} -{"question": "SELECT AVG(salary), MAX(salary) FROM Employee", "answer": "What is average and maximum salary of all employees.\nAdditional table information: table: flight_1"} -{"question": "SELECT AVG(salary), MAX(salary) FROM Employee", "answer": "What is the average and largest salary of all employees?\nAdditional table information: table: flight_1"} -{"question": "SELECT eid, name FROM Employee ORDER BY salary DESC LIMIT 1", "answer": "Show the id and name of the employee with maximum salary.\nAdditional table information: table: flight_1"} -{"question": "SELECT eid, name FROM Employee ORDER BY salary DESC LIMIT 1", "answer": "What is the id and name of the employee with the highest salary?\nAdditional table information: table: flight_1"} -{"question": "SELECT name FROM Employee ORDER BY salary ASC NULLS FIRST LIMIT 3", "answer": "Show the name of employees with three lowest salaries.\nAdditional table information: table: flight_1"} -{"question": "SELECT name FROM Employee ORDER BY salary ASC NULLS FIRST LIMIT 3", "answer": "What is the name of the 3 employees who get paid the least?\nAdditional table information: table: flight_1"} -{"question": "SELECT name FROM Employee WHERE salary > (SELECT AVG(salary) FROM Employee)", "answer": "Show names for all employees with salary more than the average.\nAdditional table information: table: flight_1"} -{"question": "SELECT name FROM Employee WHERE salary > (SELECT AVG(salary) FROM Employee)", "answer": "What are the names of all employees who have a salary higher than average?\nAdditional table information: table: flight_1"} -{"question": "SELECT eid, salary FROM Employee WHERE name = 'Mark Young'", "answer": "Show the id and salary of Mark Young.\nAdditional table information: table: flight_1"} -{"question": "SELECT eid, salary FROM Employee WHERE name = 'Mark Young'", "answer": "What is the id and salary of the employee named Mark Young?\nAdditional table information: table: flight_1"} -{"question": "SELECT COUNT(*) FROM Flight", "answer": "How many flights do we have?\nAdditional table information: table: flight_1"} -{"question": "SELECT COUNT(*) FROM Flight", "answer": "What is the number of flights?\nAdditional table information: table: flight_1"} -{"question": "SELECT flno, origin, destination FROM Flight ORDER BY origin NULLS FIRST", "answer": "Show flight number, origin, destination of all flights in the alphabetical order of the departure cities.\nAdditional table information: table: flight_1"} -{"question": "SELECT flno, origin, destination FROM Flight ORDER BY origin NULLS FIRST", "answer": "What is the flight number, origin, and destination for all flights in alphabetical order by departure cities?\nAdditional table information: table: flight_1"} -{"question": "SELECT flno FROM Flight WHERE origin = 'Los Angeles'", "answer": "Show all flight number from Los Angeles.\nAdditional table information: table: flight_1"} -{"question": "SELECT flno FROM Flight WHERE origin = 'Los Angeles'", "answer": "What are the numbers of all flights coming from Los Angeles?\nAdditional table information: table: flight_1"} -{"question": "SELECT origin FROM Flight WHERE destination = 'Honolulu'", "answer": "Show origins of all flights with destination Honolulu.\nAdditional table information: table: flight_1"} -{"question": "SELECT origin FROM Flight WHERE destination = 'Honolulu'", "answer": "What are the origins of all flights that are headed to Honolulu?\nAdditional table information: table: flight_1"} -{"question": "SELECT departure_date, arrival_date FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu'", "answer": "Show me the departure date and arrival date for all flights from Los Angeles to Honolulu.\nAdditional table information: table: flight_1"} -{"question": "SELECT departure_date, arrival_date FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu'", "answer": "What are the departure and arrival dates of all flights from LA to Honolulu?\nAdditional table information: table: flight_1"} -{"question": "SELECT flno FROM Flight WHERE distance > 2000", "answer": "Show flight number for all flights with more than 2000 distance.\nAdditional table information: table: flight_1"} -{"question": "SELECT flno FROM Flight WHERE distance > 2000", "answer": "What are the numbers of all flights that can cover a distance of more than 2000?\nAdditional table information: table: flight_1"} -{"question": "SELECT AVG(price) FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu'", "answer": "What is the average price for flights from Los Angeles to Honolulu.\nAdditional table information: table: flight_1"} -{"question": "SELECT AVG(price) FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu'", "answer": "What is the average price for flights from LA to Honolulu?\nAdditional table information: table: flight_1"} -{"question": "SELECT origin, destination FROM Flight WHERE price > 300", "answer": "Show origin and destination for flights with price higher than 300.\nAdditional table information: table: flight_1"} -{"question": "SELECT origin, destination FROM Flight WHERE price > 300", "answer": "What is the origin and destination for all flights whose price is higher than 300?\nAdditional table information: table: flight_1"} -{"question": "SELECT flno, distance FROM Flight ORDER BY price DESC LIMIT 1", "answer": "Show the flight number and distance of the flight with maximum price.\nAdditional table information: table: flight_1"} -{"question": "SELECT flno, distance FROM Flight ORDER BY price DESC LIMIT 1", "answer": "What is the flight number and its distance for the one with the maximum price?\nAdditional table information: table: flight_1"} -{"question": "SELECT flno FROM Flight ORDER BY distance ASC NULLS FIRST LIMIT 3", "answer": "Show the flight number of flights with three lowest distances.\nAdditional table information: table: flight_1"} -{"question": "SELECT flno FROM Flight ORDER BY distance ASC NULLS FIRST LIMIT 3", "answer": "What are the numbers of the shortest flights?\nAdditional table information: table: flight_1"} -{"question": "SELECT AVG(distance), AVG(price) FROM Flight WHERE origin = 'Los Angeles'", "answer": "What is the average distance and average price for flights from Los Angeles.\nAdditional table information: table: flight_1"} -{"question": "SELECT AVG(distance), AVG(price) FROM Flight WHERE origin = 'Los Angeles'", "answer": "What is the average distance and price for all flights from LA?\nAdditional table information: table: flight_1"} -{"question": "SELECT origin, COUNT(*) FROM Flight GROUP BY origin", "answer": "Show all origins and the number of flights from each origin.\nAdditional table information: table: flight_1"} -{"question": "SELECT origin, COUNT(*) FROM Flight GROUP BY origin", "answer": "For each origin, how many flights came from there?\nAdditional table information: table: flight_1"} -{"question": "SELECT destination, COUNT(*) FROM Flight GROUP BY destination", "answer": "Show all destinations and the number of flights to each destination.\nAdditional table information: table: flight_1"} -{"question": "SELECT destination, COUNT(*) FROM Flight GROUP BY destination", "answer": "What are the destinations and number of flights to each one?\nAdditional table information: table: flight_1"} -{"question": "SELECT origin FROM Flight GROUP BY origin ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which origin has most number of flights?\nAdditional table information: table: flight_1"} -{"question": "SELECT origin FROM Flight GROUP BY origin ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What place has the most flights coming from there?\nAdditional table information: table: flight_1"} -{"question": "SELECT destination FROM Flight GROUP BY destination ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Which destination has least number of flights?\nAdditional table information: table: flight_1"} -{"question": "SELECT destination FROM Flight GROUP BY destination ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "What destination has the fewest number of flights?\nAdditional table information: table: flight_1"} -{"question": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99", "answer": "What is the aircraft name for the flight with number 99\nAdditional table information: table: flight_1"} -{"question": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99", "answer": "What is the name of the aircraft that was on flight number 99?\nAdditional table information: table: flight_1"} -{"question": "SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = 'Airbus A340-300'", "answer": "Show all flight numbers with aircraft Airbus A340-300.\nAdditional table information: table: flight_1"} -{"question": "SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = 'Airbus A340-300'", "answer": "What are the flight numbers for the aircraft Airbus A340-300?\nAdditional table information: table: flight_1"} -{"question": "SELECT T2.name, COUNT(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid", "answer": "Show aircraft names and number of flights for each aircraft.\nAdditional table information: table: flight_1"} -{"question": "SELECT T2.name, COUNT(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid", "answer": "What is the name of each aircraft and how many flights does each one complete?\nAdditional table information: table: flight_1"} -{"question": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING COUNT(*) >= 2", "answer": "Show names for all aircraft with at least two flights.\nAdditional table information: table: flight_1"} -{"question": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING COUNT(*) >= 2", "answer": "What are the names for all aircrafts with at least 2 flights?\nAdditional table information: table: flight_1"} -{"question": "SELECT COUNT(DISTINCT eid) FROM Certificate", "answer": "How many employees have certificate.\nAdditional table information: table: flight_1"} -{"question": "SELECT COUNT(DISTINCT eid) FROM Certificate", "answer": "What is the count of distinct employees with certificates?\nAdditional table information: table: flight_1"} -{"question": "SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate", "answer": "Show ids for all employees who don't have a certificate.\nAdditional table information: table: flight_1"} -{"question": "SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate", "answer": "What are the ids of all employees that don't have certificates?\nAdditional table information: table: flight_1"} -{"question": "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'", "answer": "Show names for all aircrafts of which John Williams has certificates.\nAdditional table information: table: flight_1"} -{"question": "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'", "answer": "What are the names of all aircrafts that John Williams have certificates to be able to fly?\nAdditional table information: table: flight_1"} -{"question": "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'", "answer": "Show names for all employees who have certificate of Boeing 737-800.\nAdditional table information: table: flight_1"} -{"question": "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'", "answer": "What are the names of all employees who have a certificate to fly Boeing 737-800?\nAdditional table information: table: flight_1"} -{"question": "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'", "answer": "Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300.\nAdditional table information: table: flight_1"} -{"question": "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'", "answer": "What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300?\nAdditional table information: table: flight_1"} -{"question": "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'", "answer": "Show names for all employees who do not have certificate of Boeing 737-800.\nAdditional table information: table: flight_1"} -{"question": "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'", "answer": "What are the names of all employees who are not certified to fly Boeing 737-800s?\nAdditional table information: table: flight_1"} -{"question": "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", "answer": "Show the name of aircraft which fewest people have its certificate.\nAdditional table information: table: flight_1"} -{"question": "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", "answer": "What are the names of the aircraft that the least people are certified to fly?\nAdditional table information: table: flight_1"} -{"question": "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 NULLS FIRST", "answer": "Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate.\nAdditional table information: table: flight_1"} -{"question": "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 NULLS FIRST", "answer": "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?\nAdditional table information: table: flight_1"} -{"question": "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", "answer": "what is the salary and name of the employee who has the most number of aircraft certificates?\nAdditional table information: table: flight_1"} -{"question": "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", "answer": "What is the salaray and name of the employee that is certified to fly the most planes?\nAdditional table information: table: flight_1"} -{"question": "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", "answer": "What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000?\nAdditional table information: table: flight_1"} -{"question": "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", "answer": "What is the salaray and name of the employee with the most certificates to fly planes more than 5000?\nAdditional table information: table: flight_1"} -{"question": "SELECT COUNT(DISTINCT allergy) FROM Allergy_type", "answer": "How many allergies are there?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(DISTINCT allergy) FROM Allergy_type", "answer": "How many allergy entries are there?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(DISTINCT allergytype) FROM Allergy_type", "answer": "How many different allergy types exist?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(DISTINCT allergytype) FROM Allergy_type", "answer": "How many distinct allergies are there?\nAdditional table information: table: allergy_1"} -{"question": "SELECT DISTINCT allergytype FROM Allergy_type", "answer": "Show all allergy types.\nAdditional table information: table: allergy_1"} -{"question": "SELECT DISTINCT allergytype FROM Allergy_type", "answer": "What are the different allergy types?\nAdditional table information: table: allergy_1"} -{"question": "SELECT allergy, allergytype FROM Allergy_type", "answer": "Show all allergies and their types.\nAdditional table information: table: allergy_1"} -{"question": "SELECT allergy, allergytype FROM Allergy_type", "answer": "What are the allergies and their types?\nAdditional table information: table: allergy_1"} -{"question": "SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = 'food'", "answer": "Show all allergies with type food.\nAdditional table information: table: allergy_1"} -{"question": "SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = 'food'", "answer": "What are all the different food allergies?\nAdditional table information: table: allergy_1"} -{"question": "SELECT allergytype FROM Allergy_type WHERE allergy = 'Cat'", "answer": "What is the type of allergy Cat?\nAdditional table information: table: allergy_1"} -{"question": "SELECT allergytype FROM Allergy_type WHERE allergy = 'Cat'", "answer": "What is allergy type of a cat allergy?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(*) FROM Allergy_type WHERE allergytype = 'animal'", "answer": "How many allergies have type animal?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(*) FROM Allergy_type WHERE allergytype = 'animal'", "answer": "How many animal type allergies exist?\nAdditional table information: table: allergy_1"} -{"question": "SELECT allergytype, COUNT(*) FROM Allergy_type GROUP BY allergytype", "answer": "Show all allergy types and the number of allergies in each type.\nAdditional table information: table: allergy_1"} -{"question": "SELECT allergytype, COUNT(*) FROM Allergy_type GROUP BY allergytype", "answer": "What are the allergy types and how many allergies correspond to each one?\nAdditional table information: table: allergy_1"} -{"question": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which allergy type has most number of allergies?\nAdditional table information: table: allergy_1"} -{"question": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which allergy type is most common?\nAdditional table information: table: allergy_1"} -{"question": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Which allergy type has least number of allergies?\nAdditional table information: table: allergy_1"} -{"question": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Which allergy type is the least common?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(*) FROM Student", "answer": "How many students are there?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(*) FROM Student", "answer": "What is the total number of students?\nAdditional table information: table: allergy_1"} -{"question": "SELECT Fname, Lname FROM Student", "answer": "Show first name and last name for all students.\nAdditional table information: table: allergy_1"} -{"question": "SELECT Fname, Lname FROM Student", "answer": "What are the full names of all students\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(DISTINCT advisor) FROM Student", "answer": "How many different advisors are listed?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(DISTINCT advisor) FROM Student", "answer": "How many advisors are there?\nAdditional table information: table: allergy_1"} -{"question": "SELECT DISTINCT Major FROM Student", "answer": "Show all majors.\nAdditional table information: table: allergy_1"} -{"question": "SELECT DISTINCT Major FROM Student", "answer": "What are the different majors?\nAdditional table information: table: allergy_1"} -{"question": "SELECT DISTINCT city_code FROM Student", "answer": "Show all cities where students live.\nAdditional table information: table: allergy_1"} -{"question": "SELECT DISTINCT city_code FROM Student", "answer": "What cities do students live in?\nAdditional table information: table: allergy_1"} -{"question": "SELECT Fname, Lname, Age FROM Student WHERE Sex = 'F'", "answer": "Show first name, last name, age for all female students. Their sex is F.\nAdditional table information: table: allergy_1"} -{"question": "SELECT Fname, Lname, Age FROM Student WHERE Sex = 'F'", "answer": "What are the full names and ages for all female students whose sex is F?\nAdditional table information: table: allergy_1"} -{"question": "SELECT StuID FROM Student WHERE Sex = 'M'", "answer": "Show student ids for all male students.\nAdditional table information: table: allergy_1"} -{"question": "SELECT StuID FROM Student WHERE Sex = 'M'", "answer": "What are the student ids for all male students?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(*) FROM Student WHERE age = 18", "answer": "How many students are age 18?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(*) FROM Student WHERE age = 18", "answer": "How many students are 18 years old?\nAdditional table information: table: allergy_1"} -{"question": "SELECT StuID FROM Student WHERE age > 20", "answer": "Show all student ids who are older than 20.\nAdditional table information: table: allergy_1"} -{"question": "SELECT StuID FROM Student WHERE age > 20", "answer": "What are the student ids for students over 20 years old?\nAdditional table information: table: allergy_1"} -{"question": "SELECT city_code FROM Student WHERE LName = 'Kim'", "answer": "Which city does the student whose last name is 'Kim' live in?\nAdditional table information: table: allergy_1"} -{"question": "SELECT city_code FROM Student WHERE LName = 'Kim'", "answer": "Give the city that the student whose family name is Kim lives in.\nAdditional table information: table: allergy_1"} -{"question": "SELECT Advisor FROM Student WHERE StuID = 1004", "answer": "Who is the advisor of student with ID 1004?\nAdditional table information: table: allergy_1"} -{"question": "SELECT Advisor FROM Student WHERE StuID = 1004", "answer": "Who advises student 1004?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(*) FROM Student WHERE city_code = 'HKG' OR city_code = 'CHI'", "answer": "How many students live in HKG or CHI?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(*) FROM Student WHERE city_code = 'HKG' OR city_code = 'CHI'", "answer": "Give the number of students living in either HKG or CHI.\nAdditional table information: table: allergy_1"} -{"question": "SELECT MIN(age), AVG(age), MAX(age) FROM Student", "answer": "Show the minimum, average, and maximum age of all students.\nAdditional table information: table: allergy_1"} -{"question": "SELECT MIN(age), AVG(age), MAX(age) FROM Student", "answer": "What is the minimum, mean, and maximum age across all students?\nAdditional table information: table: allergy_1"} -{"question": "SELECT LName FROM Student WHERE age = (SELECT MIN(age) FROM Student)", "answer": "What is the last name of the youngest student?\nAdditional table information: table: allergy_1"} -{"question": "SELECT LName FROM Student WHERE age = (SELECT MIN(age) FROM Student)", "answer": "Provide the last name of the youngest student.\nAdditional table information: table: allergy_1"} -{"question": "SELECT StuID FROM Student WHERE age = (SELECT MAX(age) FROM Student)", "answer": "Show the student id of the oldest student.\nAdditional table information: table: allergy_1"} -{"question": "SELECT StuID FROM Student WHERE age = (SELECT MAX(age) FROM Student)", "answer": "What student id corresponds to the oldest student?\nAdditional table information: table: allergy_1"} -{"question": "SELECT major, COUNT(*) FROM Student GROUP BY major", "answer": "Show all majors and corresponding number of students.\nAdditional table information: table: allergy_1"} -{"question": "SELECT major, COUNT(*) FROM Student GROUP BY major", "answer": "How many students are there for each major?\nAdditional table information: table: allergy_1"} -{"question": "SELECT major FROM Student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which major has most number of students?\nAdditional table information: table: allergy_1"} -{"question": "SELECT major FROM Student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the largest major?\nAdditional table information: table: allergy_1"} -{"question": "SELECT age, COUNT(*) FROM Student GROUP BY age", "answer": "Show all ages and corresponding number of students.\nAdditional table information: table: allergy_1"} -{"question": "SELECT age, COUNT(*) FROM Student GROUP BY age", "answer": "How old is each student and how many students are each age?\nAdditional table information: table: allergy_1"} -{"question": "SELECT AVG(age), sex FROM Student GROUP BY sex", "answer": "Show the average age for male and female students.\nAdditional table information: table: allergy_1"} -{"question": "SELECT AVG(age), sex FROM Student GROUP BY sex", "answer": "What are the average ages for male and female students?\nAdditional table information: table: allergy_1"} -{"question": "SELECT city_code, COUNT(*) FROM Student GROUP BY city_code", "answer": "Show all cities and corresponding number of students.\nAdditional table information: table: allergy_1"} -{"question": "SELECT city_code, COUNT(*) FROM Student GROUP BY city_code", "answer": "How many students live in each city?\nAdditional table information: table: allergy_1"} -{"question": "SELECT advisor, COUNT(*) FROM Student GROUP BY advisor", "answer": "Show all advisors and corresponding number of students.\nAdditional table information: table: allergy_1"} -{"question": "SELECT advisor, COUNT(*) FROM Student GROUP BY advisor", "answer": "How many students does each advisor have?\nAdditional table information: table: allergy_1"} -{"question": "SELECT advisor FROM Student GROUP BY advisor ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which advisor has most number of students?\nAdditional table information: table: allergy_1"} -{"question": "SELECT advisor FROM Student GROUP BY advisor ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Give the advisor with the most students.\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(*) FROM Has_allergy WHERE Allergy = 'Cat'", "answer": "How many students have cat allergies?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(*) FROM Has_allergy WHERE Allergy = 'Cat'", "answer": "How many students are affected by cat allergies?\nAdditional table information: table: allergy_1"} -{"question": "SELECT StuID FROM Has_allergy GROUP BY StuID HAVING COUNT(*) >= 2", "answer": "Show all student IDs who have at least two allergies.\nAdditional table information: table: allergy_1"} -{"question": "SELECT StuID FROM Has_allergy GROUP BY StuID HAVING COUNT(*) >= 2", "answer": "What are the students ids of students who have more than one allergy?\nAdditional table information: table: allergy_1"} -{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy", "answer": "What are the student ids of students who don't have any allergies?\nAdditional table information: table: allergy_1"} -{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy", "answer": "Which students are unaffected by allergies?\nAdditional table information: table: allergy_1"} -{"question": "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'", "answer": "How many female students have milk or egg allergies?\nAdditional table information: table: allergy_1"} -{"question": "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'", "answer": "How many students who are female are allergic to milk or eggs?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = 'food'", "answer": "How many students have a food allergy?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = 'food'", "answer": "How many students are affected by food related allergies?\nAdditional table information: table: allergy_1"} -{"question": "SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which allergy has most number of students affected?\nAdditional table information: table: allergy_1"} -{"question": "SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which allergy is the most common?\nAdditional table information: table: allergy_1"} -{"question": "SELECT Allergy, COUNT(*) FROM Has_allergy GROUP BY Allergy", "answer": "Show all allergies with number of students affected.\nAdditional table information: table: allergy_1"} -{"question": "SELECT Allergy, COUNT(*) FROM Has_allergy GROUP BY Allergy", "answer": "How many students have each different allergy?\nAdditional table information: table: allergy_1"} -{"question": "SELECT T2.allergytype, COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype", "answer": "Show all allergy type with number of students affected.\nAdditional table information: table: allergy_1"} -{"question": "SELECT T2.allergytype, COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype", "answer": "How many students are affected by each allergy type?\nAdditional table information: table: allergy_1"} -{"question": "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')", "answer": "Find the last name and age of the student who has allergy to both milk and cat.\nAdditional table information: table: allergy_1"} -{"question": "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')", "answer": "What are the last names and ages of the students who are allergic to milk and cat?\nAdditional table information: table: allergy_1"} -{"question": "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 NULLS FIRST", "answer": "What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies.\nAdditional table information: table: allergy_1"} -{"question": "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 NULLS FIRST", "answer": "What are the allergies the girl named Lisa has? And what are the types of them? Order the result by allergy names.\nAdditional table information: table: allergy_1"} -{"question": "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')", "answer": "Find the first name and gender of the student who has allergy to milk but not cat.\nAdditional table information: table: allergy_1"} -{"question": "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')", "answer": "What are the first name and gender of the students who have allergy to milk but can put up with cats?\nAdditional table information: table: allergy_1"} -{"question": "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')", "answer": "Find the average age of the students who have allergies with food and animal types.\nAdditional table information: table: allergy_1"} -{"question": "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')", "answer": "How old are the students with allergies to food and animal types on average?\nAdditional table information: table: allergy_1"} -{"question": "SELECT fname, lname FROM Student WHERE NOT StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food')", "answer": "List the first and last name of the students who do not have any food type allergy.\nAdditional table information: table: allergy_1"} -{"question": "SELECT fname, lname FROM Student WHERE NOT StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food')", "answer": "What is the full name of each student who is not allergic to any type of food.\nAdditional table information: table: allergy_1"} -{"question": "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')", "answer": "Find the number of male (sex is 'M') students who have some food type allery.\nAdditional table information: table: allergy_1"} -{"question": "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')", "answer": "How many male students (sex is 'M') are allergic to any type of food?\nAdditional table information: table: allergy_1"} -{"question": "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'", "answer": "Find the different first names and cities of the students who have allergy to milk or cat.\nAdditional table information: table: allergy_1"} -{"question": "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'", "answer": "What are the distinct first names and cities of the students who have allergy either to milk or to cat?\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(*) FROM Student WHERE age > 18 AND NOT StuID 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')", "answer": "Find the number of students who are older than 18 and do not have allergy to either food or animal.\nAdditional table information: table: allergy_1"} -{"question": "SELECT COUNT(*) FROM Student WHERE age > 18 AND NOT StuID 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')", "answer": "How many students are over 18 and do not have allergy to food type or animal type?\nAdditional table information: table: allergy_1"} -{"question": "SELECT fname, major FROM Student WHERE NOT StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Soy')", "answer": "Find the first name and major of the students who are not allegry to soy.\nAdditional table information: table: allergy_1"} -{"question": "SELECT fname, major FROM Student WHERE NOT StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Soy')", "answer": "What are the first name and major of the students who are able to consume soy?\nAdditional table information: table: allergy_1"} -{"question": "SELECT billing_country, COUNT(*) FROM invoices GROUP BY billing_country ORDER BY COUNT(*) DESC LIMIT 5", "answer": "A list of the top 5 countries by number of invoices. List country name and number of invoices.\nAdditional table information: table: store_1"} -{"question": "SELECT billing_country, COUNT(*) FROM invoices GROUP BY billing_country ORDER BY COUNT(*) DESC LIMIT 5", "answer": "What are the top 5 countries by number of invoices and how many do they have?\nAdditional table information: table: store_1"} -{"question": "SELECT billing_country, SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8", "answer": "A list of the top 8 countries by gross/total invoice size. List country name and gross invoice size.\nAdditional table information: table: store_1"} -{"question": "SELECT billing_country, SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8", "answer": "What are the names of the top 8 countries by total invoice size and what are those sizes?\nAdditional table information: table: store_1"} -{"question": "SELECT billing_country, AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10", "answer": "A list of the top 10 countries by average invoice size. List country name and average invoice size.\nAdditional table information: table: store_1"} -{"question": "SELECT billing_country, AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10", "answer": "What are the names of the countries and average invoice size of the top countries by size?\nAdditional table information: table: store_1"} -{"question": "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", "answer": "Find out 5 customers who most recently purchased something. List customers' first and last name.\nAdditional table information: table: store_1"} -{"question": "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", "answer": "What are the first and last names of the 5 customers who purchased something most recently?\nAdditional table information: table: store_1"} -{"question": "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", "answer": "Find out the top 10 customers by total number of orders. List customers' first and last name and the number of total orders.\nAdditional table information: table: store_1"} -{"question": "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", "answer": "What are the top 10 customers' first and last names by total number of orders and how many orders did they make?\nAdditional table information: table: store_1"} -{"question": "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", "answer": "List the top 10 customers by total gross sales. List customers' first and last name and total gross sales.\nAdditional table information: table: store_1"} -{"question": "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", "answer": "What are the top 10 customers' first and last names with the highest gross sales, and also what are the sales?\nAdditional table information: table: store_1"} -{"question": "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", "answer": "List the top 5 genres by number of tracks. List genres name and total tracks.\nAdditional table information: table: store_1"} -{"question": "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", "answer": "How many tracks does each genre have and what are the names of the top 5?\nAdditional table information: table: store_1"} -{"question": "SELECT title FROM albums", "answer": "List every album's title.\nAdditional table information: table: store_1"} -{"question": "SELECT title FROM albums", "answer": "What are the titles of all the albums?\nAdditional table information: table: store_1"} -{"question": "SELECT title FROM albums ORDER BY title NULLS FIRST", "answer": "List every album ordered by album title in ascending order.\nAdditional table information: table: store_1"} -{"question": "SELECT title FROM albums ORDER BY title NULLS FIRST", "answer": "What are the titles of all the albums alphabetically ascending?\nAdditional table information: table: store_1"} -{"question": "SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title NULLS FIRST", "answer": "List every album whose title starts with A in alphabetical order.\nAdditional table information: table: store_1"} -{"question": "SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title NULLS FIRST", "answer": "What are the titles of all albums that start with A in alphabetical order?\nAdditional table information: table: store_1"} -{"question": "SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total NULLS FIRST LIMIT 10", "answer": "List the customers first and last name of 10 least expensive invoices.\nAdditional table information: table: store_1"} -{"question": "SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total NULLS FIRST LIMIT 10", "answer": "What are the first and last names of the customers with the 10 cheapest invoices?\nAdditional table information: table: store_1"} -{"question": "SELECT SUM(total) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL'", "answer": "List total amount of invoice from Chicago, IL.\nAdditional table information: table: store_1"} -{"question": "SELECT SUM(total) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL'", "answer": "What are the total amount of money in the invoices billed from Chicago, Illinois?\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL'", "answer": "List the number of invoices from Chicago, IL.\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL'", "answer": "How many invoices were billed from Chicago, IL?\nAdditional table information: table: store_1"} -{"question": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state", "answer": "List the number of invoices from the US, grouped by state.\nAdditional table information: table: store_1"} -{"question": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state", "answer": "How many invoices were billed from each state?\nAdditional table information: table: store_1"} -{"question": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the state in the US with the most invoices.\nAdditional table information: table: store_1"} -{"question": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the states with the most invoices?\nAdditional table information: table: store_1"} -{"question": "SELECT billing_state, COUNT(*), SUM(total) FROM invoices WHERE billing_state = 'CA'", "answer": "List the number of invoices and the invoice total from California.\nAdditional table information: table: store_1"} -{"question": "SELECT billing_state, COUNT(*), SUM(total) FROM invoices WHERE billing_state = 'CA'", "answer": "What is the number of invoices and total money billed in them from CA?\nAdditional table information: table: store_1"} -{"question": "SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Aerosmith'", "answer": "List Aerosmith's albums.\nAdditional table information: table: store_1"} -{"question": "SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Aerosmith'", "answer": "What are the titles of all the Aerosmith albums?\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Billy Cobham'", "answer": "How many albums does Billy Cobham has?\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Billy Cobham'", "answer": "How many albums has Billy Cobam released?\nAdditional table information: table: store_1"} -{"question": "SELECT company FROM customers WHERE first_name = 'Eduardo' AND last_name = 'Martins'", "answer": "Eduardo Martins is a customer at which company?\nAdditional table information: table: store_1"} -{"question": "SELECT company FROM customers WHERE first_name = 'Eduardo' AND last_name = 'Martins'", "answer": "What is the company where Eduardo Martins is a customer?\nAdditional table information: table: store_1"} -{"question": "SELECT email, phone FROM customers WHERE first_name = 'Astrid' AND last_name = 'Gruber'", "answer": "What is Astrid Gruber's email and phone number?\nAdditional table information: table: store_1"} -{"question": "SELECT email, phone FROM customers WHERE first_name = 'Astrid' AND last_name = 'Gruber'", "answer": "What is the email and phone number of Astrid Gruber the customer?\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*) FROM customers WHERE city = 'Prague'", "answer": "How many customers live in Prague city?\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*) FROM customers WHERE city = 'Prague'", "answer": "How many customers live in the city of Prague?\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*) FROM customers WHERE state = 'CA'", "answer": "How many customers in state of CA?\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*) FROM customers WHERE state = 'CA'", "answer": "How many customers are from California?\nAdditional table information: table: store_1"} -{"question": "SELECT country FROM customers WHERE first_name = 'Roberto' AND last_name = 'Almeida'", "answer": "What country does Roberto Almeida live?\nAdditional table information: table: store_1"} -{"question": "SELECT country FROM customers WHERE first_name = 'Roberto' AND last_name = 'Almeida'", "answer": "In which country does Roberto Almeida?\nAdditional table information: table: store_1"} -{"question": "SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%'", "answer": "List the name of albums that are released by aritist whose name has 'Led'\nAdditional table information: table: store_1"} -{"question": "SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%'", "answer": "What is the title of the album that was released by the artist whose name has the phrase 'Led'?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "How many customers does Steve Johnson support?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "What is the count of customers that Steve Johnson supports?\nAdditional table information: table: store_1"} -{"question": "SELECT title, phone, hire_date FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "answer": "What is the title, phone and hire date of Nancy Edwards?\nAdditional table information: table: store_1"} -{"question": "SELECT title, phone, hire_date FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "answer": "What is the title, phone number and hire date for the employee named Nancy Edwards?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "find the full name of employees who report to Nancy Edwards?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "What is the first and last name of the employee who reports to Nancy Edwards?\nAdditional table information: table: store_1"} -{"question": "SELECT address FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "answer": "What is the address of employee Nancy Edwards?\nAdditional table information: table: store_1"} -{"question": "SELECT address FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "answer": "What is Nancy Edwards's address?\nAdditional table information: table: store_1"} -{"question": "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", "answer": "Find the full name of employee who supported the most number of customers.\nAdditional table information: table: store_1"} -{"question": "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", "answer": "What is the full name of the employee who has the most customers?\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*) FROM employees WHERE country = 'Canada'", "answer": "How many employees are living in Canada?\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*) FROM employees WHERE country = 'Canada'", "answer": "How many employees live in Canada?\nAdditional table information: table: store_1"} -{"question": "SELECT phone FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "answer": "What is employee Nancy Edwards's phone number?\nAdditional table information: table: store_1"} -{"question": "SELECT phone FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "answer": "What is the the phone number of Nancy Edwards?\nAdditional table information: table: store_1"} -{"question": "SELECT first_name, last_name FROM employees ORDER BY birth_date DESC LIMIT 1", "answer": "Who is the youngest employee in the company? List employee's first and last name.\nAdditional table information: table: store_1"} -{"question": "SELECT first_name, last_name FROM employees ORDER BY birth_date DESC LIMIT 1", "answer": "What si the youngest employee's first and last name?\nAdditional table information: table: store_1"} -{"question": "SELECT first_name, last_name FROM employees ORDER BY hire_date ASC NULLS FIRST LIMIT 10", "answer": "List top 10 employee work longest in the company. List employee's first and last name.\nAdditional table information: table: store_1"} -{"question": "SELECT first_name, last_name FROM employees ORDER BY hire_date ASC NULLS FIRST LIMIT 10", "answer": "What are the first and last names of the top 10 longest-serving employees?\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*), city FROM employees WHERE title = 'IT Staff' GROUP BY city", "answer": "Find the number of employees whose title is IT Staff from each city?\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*), city FROM employees WHERE title = 'IT Staff' GROUP BY city", "answer": "How many employees who are IT staff are from each city?\nAdditional table information: table: store_1"} -{"question": "SELECT T2.first_name, T2.last_name, COUNT(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(T1.reports_to) DESC LIMIT 1", "answer": "Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.\nAdditional table information: table: store_1"} -{"question": "SELECT T2.first_name, T2.last_name, COUNT(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(T1.reports_to) DESC LIMIT 1", "answer": "What are the first and last names of all the employees and how many people report to them?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "How many orders does Lucas Mancini has?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "How many orders does Luca Mancini have in his invoices?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "What is the total amount of money spent by Lucas Mancini?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "How much money did Lucas Mancini spend?\nAdditional table information: table: store_1"} -{"question": "SELECT name FROM media_types", "answer": "List all media types.\nAdditional table information: table: store_1"} -{"question": "SELECT name FROM media_types", "answer": "What are the names of all the media types?\nAdditional table information: table: store_1"} -{"question": "SELECT DISTINCT name FROM genres", "answer": "List all different genre types.\nAdditional table information: table: store_1"} -{"question": "SELECT DISTINCT name FROM genres", "answer": "What are the different names of the genres?\nAdditional table information: table: store_1"} -{"question": "SELECT name FROM playlists", "answer": "List the name of all playlist.\nAdditional table information: table: store_1"} -{"question": "SELECT name FROM playlists", "answer": "What are the names of all the playlists?\nAdditional table information: table: store_1"} -{"question": "SELECT composer FROM tracks WHERE name = 'Fast As a Shark'", "answer": "Who is the composer of track Fast As a Shark?\nAdditional table information: table: store_1"} -{"question": "SELECT composer FROM tracks WHERE name = 'Fast As a Shark'", "answer": "What is the composer who created the track 'Fast As a Shark'?\nAdditional table information: table: store_1"} -{"question": "SELECT milliseconds FROM tracks WHERE name = 'Fast As a Shark'", "answer": "How long does track Fast As a Shark has?\nAdditional table information: table: store_1"} -{"question": "SELECT milliseconds FROM tracks WHERE name = 'Fast As a Shark'", "answer": "How many milliseconds long is Fast As a Shark?\nAdditional table information: table: store_1"} -{"question": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock'", "answer": "What is the name of tracks whose genre is Rock?\nAdditional table information: table: store_1"} -{"question": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock'", "answer": "What is the name of all tracks in the Rock genre?\nAdditional table information: table: store_1"} -{"question": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = 'Balls to the Wall'", "answer": "What is title of album which track Balls to the Wall belongs to?\nAdditional table information: table: store_1"} -{"question": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = 'Balls to the Wall'", "answer": "What is the name of the album that has the track Ball to the Wall?\nAdditional table information: table: store_1"} -{"question": "SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = 'Balls to the Wall'", "answer": "List name of all tracks in Balls to the Wall.\nAdditional table information: table: store_1"} -{"question": "SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = 'Balls to the Wall'", "answer": "What is the name of all tracks in the album named Balls to the Wall?\nAdditional table information: table: store_1"} -{"question": "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", "answer": "List title of albums have the number of tracks greater than 10.\nAdditional table information: table: store_1"} -{"question": "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", "answer": "What are the names of the albums that have more than 10 tracks?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "List the name of tracks belongs to genre Rock and whose media type is MPEG audio file.\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "What are the names of all Rock tracks that are stored on MPEG audio files?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "List the name of tracks belongs to genre Rock or media type is MPEG audio file.\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "List the name of tracks belongs to genre Rock or genre Jazz.\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "What are the names of the tracks that are Rock or Jazz songs?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "List the name of all tracks in the playlists of Movies.\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "What are the names of all tracks that are on playlists titled Movies?\nAdditional table information: table: store_1"} -{"question": "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", "answer": "List the name of playlist which has number of tracks greater than 100.\nAdditional table information: table: store_1"} -{"question": "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", "answer": "What are the names of all playlists that have more than 100 tracks?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "List all tracks bought by customer Daan Peeters.\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "What are the tracks that Dean Peeters bought?\nAdditional table information: table: store_1"} -{"question": "SELECT unit_price FROM tracks WHERE name = 'Fast As a Shark'", "answer": "How much is the track Fast As a Shark?\nAdditional table information: table: store_1"} -{"question": "SELECT unit_price FROM tracks WHERE name = 'Fast As a Shark'", "answer": "What is the unit price of the tune 'Fast As a Shark'?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "Find the name of tracks which are in Movies playlist but not in music playlist.\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "What are the names of all tracks that are on the Movies playlist but not in the music playlist?\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "Find the name of tracks which are in both Movies and music playlists.\nAdditional table information: table: store_1"} -{"question": "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'", "answer": "What are the names of all the tracks that are in both the Movies and music playlists?\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*), T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name", "answer": "Find number of tracks in each genre?\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*), T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name", "answer": "How many tracks are in each genre?\nAdditional table information: table: store_1"} -{"question": "SELECT COUNT(*) FROM editor", "answer": "How many editors are there?\nAdditional table information: table: journal_committee"} -{"question": "SELECT Name FROM editor ORDER BY Age ASC NULLS FIRST", "answer": "List the names of editors in ascending order of age.\nAdditional table information: table: journal_committee"} -{"question": "SELECT Name, Age FROM editor", "answer": "What are the names and ages of editors?\nAdditional table information: table: journal_committee"} -{"question": "SELECT Name FROM editor WHERE Age > 25", "answer": "List the names of editors who are older than 25.\nAdditional table information: table: journal_committee"} -{"question": "SELECT Name FROM editor WHERE Age = 24 OR Age = 25", "answer": "Show the names of editors of age either 24 or 25.\nAdditional table information: table: journal_committee"} -{"question": "SELECT Name FROM editor ORDER BY Age ASC NULLS FIRST LIMIT 1", "answer": "What is the name of the youngest editor?\nAdditional table information: table: journal_committee"} -{"question": "SELECT Age, COUNT(*) FROM editor GROUP BY Age", "answer": "What are the different ages of editors? Show each age along with the number of editors of that age.\nAdditional table information: table: journal_committee"} -{"question": "SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the most common age of editors.\nAdditional table information: table: journal_committee"} -{"question": "SELECT DISTINCT Theme FROM journal", "answer": "Show the distinct themes of journals.\nAdditional table information: table: journal_committee"} -{"question": "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", "answer": "Show the names of editors and the theme of journals for which they serve on committees.\nAdditional table information: table: journal_committee"} -{"question": "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", "answer": "For each journal_committee, find the editor name and the journal theme.\nAdditional table information: table: journal_committee"} -{"question": "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 NULLS FIRST", "answer": "Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme.\nAdditional table information: table: journal_committee"} -{"question": "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", "answer": "Show the names of editors that are on the committee of journals with sales bigger than 3000.\nAdditional table information: table: journal_committee"} -{"question": "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", "answer": "Show the id, name of each editor and the number of journal committees they are on.\nAdditional table information: table: journal_committee"} -{"question": "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", "answer": "Show the names of editors that are on at least two journal committees.\nAdditional table information: table: journal_committee"} -{"question": "SELECT Name FROM editor WHERE NOT editor_id IN (SELECT editor_id FROM journal_committee)", "answer": "List the names of editors that are not on any journal committee.\nAdditional table information: table: journal_committee"} -{"question": "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", "answer": "List the date, theme and sales of the journal which did not have any of the listed editors serving on committee.\nAdditional table information: table: journal_committee"} -{"question": "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'", "answer": "What is the average sales of the journals that have an editor whose work type is 'Photo'?\nAdditional table information: table: journal_committee"} -{"question": "SELECT COUNT(*) FROM Accounts", "answer": "How many accounts do we have?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(*) FROM Accounts", "answer": "Count the number of accounts.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT account_id, customer_id, account_name FROM Accounts", "answer": "Show ids, customer ids, names for all accounts.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT account_id, customer_id, account_name FROM Accounts", "answer": "What are the account ids, customer ids, and account names for all the accounts?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT other_account_details FROM Accounts WHERE account_name = '338'", "answer": "Show other account details for account with name 338.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT other_account_details FROM Accounts WHERE account_name = '338'", "answer": "What are the other account details for the account with the name 338?\nAdditional table information: table: customers_card_transactions"} -{"question": "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'", "answer": "What is the first name, last name, and phone of the customer with account name 162?\nAdditional table information: table: customers_card_transactions"} -{"question": "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'", "answer": "Give the full name and phone of the customer who has the account name 162.\nAdditional table information: table: customers_card_transactions"} -{"question": "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'", "answer": "How many accounts does the customer with first name Art and last name Turcotte have?\nAdditional table information: table: customers_card_transactions"} -{"question": "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'", "answer": "Return the number of accounts that the customer with the first name Art and last name Turcotte has.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id", "answer": "Show all customer ids and the number of accounts for each customer.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id", "answer": "How many accounts are there for each customer id?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the customer id and number of accounts with most accounts.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the customer id of the customer with the most accounts, and how many accounts does this person have?\nAdditional table information: table: customers_card_transactions"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the customer first, last name and id with least number of accounts.\nAdditional table information: table: customers_card_transactions"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Give the full name and customer id of the customer with the fewest accounts.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts)", "answer": "Show the number of all customers without an account.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts)", "answer": "How many customers do not have an account?\nAdditional table information: table: customers_card_transactions"} -{"question": "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", "answer": "Show the first names and last names of customers without any account.\nAdditional table information: table: customers_card_transactions"} -{"question": "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", "answer": "What are the full names of customers who do not have any accounts?\nAdditional table information: table: customers_card_transactions"} -{"question": "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", "answer": "Show distinct first and last names for all customers with an account.\nAdditional table information: table: customers_card_transactions"} -{"question": "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", "answer": "What are the full names of customers who have accounts?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(DISTINCT customer_id) FROM Accounts", "answer": "How many customers have an account?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(DISTINCT customer_id) FROM Accounts", "answer": "Count the number of customers who hold an account.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(*) FROM Customers", "answer": "How many customers do we have?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(*) FROM Customers", "answer": "Count the number of customers.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT customer_id, customer_first_name, customer_last_name, customer_phone FROM Customers", "answer": "Show ids, first names, last names, and phones for all customers.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT customer_id, customer_first_name, customer_last_name, customer_phone FROM Customers", "answer": "What are the ids, full names, and phones of each customer?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT customer_phone, customer_email FROM Customers WHERE customer_first_name = 'Aniyah' AND customer_last_name = 'Feest'", "answer": "What is the phone and email for customer with first name Aniyah and last name Feest?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT customer_phone, customer_email FROM Customers WHERE customer_first_name = 'Aniyah' AND customer_last_name = 'Feest'", "answer": "Return the phone and email of the customer with the first name Aniyah and last name Feest.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(*) FROM Customers_cards", "answer": "Show the number of customer cards.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(*) FROM Customers_cards", "answer": "How many customer cards are there?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT card_id, customer_id, card_type_code, card_number FROM Customers_cards", "answer": "Show ids, customer ids, card type codes, card numbers for all cards.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT card_id, customer_id, card_type_code, card_number FROM Customers_cards", "answer": "What are card ids, customer ids, card types, and card numbers for each customer card?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT date_valid_from, date_valid_to FROM Customers_cards WHERE card_number = '4560596484842'", "answer": "Show the date valid from and the date valid to for the card with card number '4560596484842'.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT date_valid_from, date_valid_to FROM Customers_cards WHERE card_number = '4560596484842'", "answer": "What are the valid from and valid to dates for the card with the number 4560596484842?\nAdditional table information: table: customers_card_transactions"} -{"question": "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'", "answer": "What is the first name, last name, and phone of the customer with card 4560596484842.\nAdditional table information: table: customers_card_transactions"} -{"question": "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'", "answer": "Return the full name and phone of the customer who has card number 4560596484842.\nAdditional table information: table: customers_card_transactions"} -{"question": "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'", "answer": "How many cards does customer Art Turcotte have?\nAdditional table information: table: customers_card_transactions"} -{"question": "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'", "answer": "Count the number of cards the customer with the first name Art and last name Turcotte has.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(*) FROM Customers_cards WHERE card_type_code = 'Debit'", "answer": "How many debit cards do we have?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(*) FROM Customers_cards WHERE card_type_code = 'Debit'", "answer": "Count the number of customer cards of the type Debit.\nAdditional table information: table: customers_card_transactions"} -{"question": "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'", "answer": "How many credit cards does customer Blanche Huels have?\nAdditional table information: table: customers_card_transactions"} -{"question": "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'", "answer": "Count the number of credit cards that the customer with first name Blanche and last name Huels has.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id", "answer": "Show all customer ids and the number of cards owned by each customer.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id", "answer": "What are the different customer ids, and how many cards does each one hold?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the customer id with most number of cards, and how many does he have?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the id of the customer who has the most cards, as well as the number of cards.\nAdditional table information: table: customers_card_transactions"} -{"question": "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", "answer": "Show id, first and last names for all customers with at least two cards.\nAdditional table information: table: customers_card_transactions"} -{"question": "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", "answer": "What are the ids and full names of customers who hold two or more cards?\nAdditional table information: table: customers_card_transactions"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the customer id, first and last name with least number of accounts.\nAdditional table information: table: customers_card_transactions"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Return the id and full name of the customer who has the fewest accounts.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT card_type_code, COUNT(*) FROM Customers_cards GROUP BY card_type_code", "answer": "Show all card type codes and the number of cards in each type.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT card_type_code, COUNT(*) FROM Customers_cards GROUP BY card_type_code", "answer": "What are the different card types, and how many cards are there of each?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the card type code with most number of cards?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the code of the card type that is most common.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING COUNT(*) >= 5", "answer": "Show card type codes with at least 5 cards.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING COUNT(*) >= 5", "answer": "What are the codes of card types that have 5 or more cards?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT card_type_code, COUNT(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code", "answer": "Show all card type codes and the number of customers holding cards in each type.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT card_type_code, COUNT(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code", "answer": "What are the different card type codes, and how many different customers hold each type?\nAdditional table information: table: customers_card_transactions"} -{"question": "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'", "answer": "Show the customer ids and firstname without a credit card.\nAdditional table information: table: customers_card_transactions"} -{"question": "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'", "answer": "What are the ids and first names of customers who do not hold a credit card?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT DISTINCT card_type_code FROM Customers_Cards", "answer": "Show all card type codes.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT DISTINCT card_type_code FROM Customers_Cards", "answer": "What are the different card type codes?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(DISTINCT card_type_code) FROM Customers_Cards", "answer": "Show the number of card types.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(DISTINCT card_type_code) FROM Customers_Cards", "answer": "How many different card types are there?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT DISTINCT transaction_type FROM Financial_Transactions", "answer": "Show all transaction types.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT DISTINCT transaction_type FROM Financial_Transactions", "answer": "What are the different types of transactions?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(DISTINCT transaction_type) FROM Financial_Transactions", "answer": "Show the number of transaction types.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(DISTINCT transaction_type) FROM Financial_Transactions", "answer": "How many different types of transactions are there?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT AVG(transaction_amount), SUM(transaction_amount) FROM Financial_transactions", "answer": "What is the average and total transaction amount?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT AVG(transaction_amount), SUM(transaction_amount) FROM Financial_transactions", "answer": "Return the average transaction amount, as well as the total amount of all transactions.\nAdditional table information: table: customers_card_transactions"} -{"question": "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", "answer": "Show the card type codes and the number of transactions.\nAdditional table information: table: customers_card_transactions"} -{"question": "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", "answer": "What are the different card types, and how many transactions have been made with each?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT transaction_type, COUNT(*) FROM Financial_transactions GROUP BY transaction_type", "answer": "Show the transaction type and the number of transactions.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT transaction_type, COUNT(*) FROM Financial_transactions GROUP BY transaction_type", "answer": "What are the different transaction types, and how many transactions of each have taken place?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY SUM(transaction_amount) DESC LIMIT 1", "answer": "What is the transaction type that has processed the greatest total amount in transactions?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY SUM(transaction_amount) DESC LIMIT 1", "answer": "Return the type of transaction with the highest total amount.\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT account_id, COUNT(*) FROM Financial_transactions GROUP BY account_id", "answer": "Show the account id and the number of transactions for each account\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT account_id, COUNT(*) FROM Financial_transactions GROUP BY account_id", "answer": "What are the different account ids that have made financial transactions, as well as how many transactions correspond to each?\nAdditional table information: table: customers_card_transactions"} -{"question": "SELECT COUNT(*) FROM track", "answer": "How many tracks do we have?\nAdditional table information: table: race_track"} -{"question": "SELECT COUNT(*) FROM track", "answer": "Count the number of tracks.\nAdditional table information: table: race_track"} -{"question": "SELECT name, LOCATION FROM track", "answer": "Show the name and location for all tracks.\nAdditional table information: table: race_track"} -{"question": "SELECT name, LOCATION FROM track", "answer": "What are the names and locations of all tracks?\nAdditional table information: table: race_track"} -{"question": "SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating NULLS FIRST", "answer": "Show names and seatings, ordered by seating for all tracks opened after 2000.\nAdditional table information: table: race_track"} -{"question": "SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating NULLS FIRST", "answer": "What are the names and seatings for all tracks opened after 2000, ordered by seating?\nAdditional table information: table: race_track"} -{"question": "SELECT name, LOCATION, seating FROM track ORDER BY year_opened DESC LIMIT 1", "answer": "What is the name, location and seating for the most recently opened track?\nAdditional table information: table: race_track"} -{"question": "SELECT name, LOCATION, seating FROM track ORDER BY year_opened DESC LIMIT 1", "answer": "Return the name, location, and seating of the track that was opened in the most recent year.\nAdditional table information: table: race_track"} -{"question": "SELECT MIN(seating), MAX(seating), AVG(seating) FROM track", "answer": "What is the minimum, maximum, and average seating for all tracks.\nAdditional table information: table: race_track"} -{"question": "SELECT MIN(seating), MAX(seating), AVG(seating) FROM track", "answer": "Return the minimum, maximum, and average seating across all tracks.\nAdditional table information: table: race_track"} -{"question": "SELECT name, LOCATION, year_opened FROM track WHERE seating > (SELECT AVG(seating) FROM track)", "answer": "Show the name, location, open year for all tracks with a seating higher than the average.\nAdditional table information: table: race_track"} -{"question": "SELECT name, LOCATION, year_opened FROM track WHERE seating > (SELECT AVG(seating) FROM track)", "answer": "What are the names, locations, and years of opening for tracks with seating higher than average?\nAdditional table information: table: race_track"} -{"question": "SELECT DISTINCT LOCATION FROM track", "answer": "What are distinct locations where tracks are located?\nAdditional table information: table: race_track"} -{"question": "SELECT DISTINCT LOCATION FROM track", "answer": "Give the different locations of tracks.\nAdditional table information: table: race_track"} -{"question": "SELECT COUNT(*) FROM race", "answer": "How many races are there?\nAdditional table information: table: race_track"} -{"question": "SELECT COUNT(*) FROM race", "answer": "Count the number of races.\nAdditional table information: table: race_track"} -{"question": "SELECT DISTINCT CLASS FROM race", "answer": "What are the distinct classes that races can have?\nAdditional table information: table: race_track"} -{"question": "SELECT DISTINCT CLASS FROM race", "answer": "Return the different classes of races.\nAdditional table information: table: race_track"} -{"question": "SELECT name, CLASS, date FROM race", "answer": "Show name, class, and date for all races.\nAdditional table information: table: race_track"} -{"question": "SELECT name, CLASS, date FROM race", "answer": "What are the names, classes, and dates for all races?\nAdditional table information: table: race_track"} -{"question": "SELECT CLASS, COUNT(*) FROM race GROUP BY CLASS", "answer": "Show the race class and number of races in each class.\nAdditional table information: table: race_track"} -{"question": "SELECT CLASS, COUNT(*) FROM race GROUP BY CLASS", "answer": "What are the different classes of races, and how many races correspond to each?\nAdditional table information: table: race_track"} -{"question": "SELECT CLASS FROM race GROUP BY CLASS ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the race class with most number of races.\nAdditional table information: table: race_track"} -{"question": "SELECT CLASS FROM race GROUP BY CLASS ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Give the class of races that is most common.\nAdditional table information: table: race_track"} -{"question": "SELECT CLASS FROM race GROUP BY CLASS HAVING COUNT(*) >= 2", "answer": "List the race class with at least two races.\nAdditional table information: table: race_track"} -{"question": "SELECT CLASS FROM race GROUP BY CLASS HAVING COUNT(*) >= 2", "answer": "What are the classes of races that have two or more corresponding races?\nAdditional table information: table: race_track"} -{"question": "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'", "answer": "What are the names for tracks without a race in class 'GT'.\nAdditional table information: table: race_track"} -{"question": "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'", "answer": "Give the names of tracks that do not have a race in the class 'GT'.\nAdditional table information: table: race_track"} -{"question": "SELECT name FROM track WHERE NOT track_id IN (SELECT track_id FROM race)", "answer": "Show all track names that have had no races.\nAdditional table information: table: race_track"} -{"question": "SELECT name FROM track WHERE NOT track_id IN (SELECT track_id FROM race)", "answer": "Return the names of tracks that have no had any races.\nAdditional table information: table: race_track"} -{"question": "SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000", "answer": "Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened.\nAdditional table information: table: race_track"} -{"question": "SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000", "answer": "What are the years of opening for tracks with seating between 4000 and 5000?\nAdditional table information: table: race_track"} -{"question": "SELECT T2.name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id", "answer": "Show the name of track and the number of races in each track.\nAdditional table information: table: race_track"} -{"question": "SELECT T2.name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id", "answer": "What are the names of different tracks, and how many races has each had?\nAdditional table information: table: race_track"} -{"question": "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", "answer": "Show the name of track with most number of races.\nAdditional table information: table: race_track"} -{"question": "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", "answer": "What is the name of the track that has had the greatest number of races?\nAdditional table information: table: race_track"} -{"question": "SELECT T1.name, T1.date, T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id", "answer": "Show the name and date for each race and its track name.\nAdditional table information: table: race_track"} -{"question": "SELECT T1.name, T1.date, T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id", "answer": "What are the names and dates of races, and the names of the tracks where they are held?\nAdditional table information: table: race_track"} -{"question": "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", "answer": "Show the name and location of track with 1 race.\nAdditional table information: table: race_track"} -{"question": "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", "answer": "What are the names and locations of tracks that have had exactly 1 race?\nAdditional table information: table: race_track"} -{"question": "SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000", "answer": "Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats.\nAdditional table information: table: race_track"} -{"question": "SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000", "answer": "What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats?\nAdditional table information: table: race_track"} -{"question": "SELECT COUNT(*) FROM member WHERE Membership_card = 'Black'", "answer": "How many members have the black membership card?\nAdditional table information: table: coffee_shop"} -{"question": "SELECT COUNT(*), address FROM member GROUP BY address", "answer": "Find the number of members living in each address.\nAdditional table information: table: coffee_shop"} -{"question": "SELECT name FROM member WHERE address = 'Harford' OR address = 'Waterbury'", "answer": "Give me the names of members whose address is in Harford or Waterbury.\nAdditional table information: table: coffee_shop"} -{"question": "SELECT name, member_id FROM member WHERE Membership_card = 'Black' OR age < 30", "answer": "Find the ids and names of members who are under age 30 or with black membership card.\nAdditional table information: table: coffee_shop"} -{"question": "SELECT Time_of_purchase, age, address FROM member ORDER BY Time_of_purchase NULLS FIRST", "answer": "Find the purchase time, age and address of each member, and show the results in the order of purchase time.\nAdditional table information: table: coffee_shop"} -{"question": "SELECT Membership_card FROM member GROUP BY Membership_card HAVING COUNT(*) > 5", "answer": "Which membership card has more than 5 members?\nAdditional table information: table: coffee_shop"} -{"question": "SELECT address FROM member WHERE age < 30 INTERSECT SELECT address FROM member WHERE age > 40", "answer": "Which address has both members younger than 30 and members older than 40?\nAdditional table information: table: coffee_shop"} -{"question": "SELECT membership_card FROM member WHERE address = 'Hartford' INTERSECT SELECT membership_card FROM member WHERE address = 'Waterbury'", "answer": "What is the membership card held by both members living in Hartford and ones living in Waterbury address?\nAdditional table information: table: coffee_shop"} -{"question": "SELECT COUNT(*) FROM member WHERE address <> 'Hartford'", "answer": "How many members are not living in Hartford?\nAdditional table information: table: coffee_shop"} -{"question": "SELECT address FROM member EXCEPT SELECT address FROM member WHERE Membership_card = 'Black'", "answer": "Which address do not have any member with the black membership card?\nAdditional table information: table: coffee_shop"} -{"question": "SELECT address FROM shop ORDER BY open_year NULLS FIRST", "answer": "Show the shop addresses ordered by their opening year.\nAdditional table information: table: coffee_shop"} -{"question": "SELECT AVG(num_of_staff), AVG(score) FROM shop", "answer": "What are the average score and average staff number of all shops?\nAdditional table information: table: coffee_shop"} -{"question": "SELECT shop_id, address FROM shop WHERE score < (SELECT AVG(score) FROM shop)", "answer": "Find the id and address of the shops whose score is below the average score.\nAdditional table information: table: coffee_shop"} -{"question": "SELECT address, num_of_staff FROM shop WHERE NOT shop_id IN (SELECT shop_id FROM happy_hour)", "answer": "Find the address and staff number of the shops that do not have any happy hour.\nAdditional table information: table: coffee_shop"} -{"question": "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'", "answer": "What are the id and address of the shops which have a happy hour in May?\nAdditional table information: table: coffee_shop"} -{"question": "SELECT shop_id, COUNT(*) FROM happy_hour GROUP BY shop_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "which shop has happy hour most frequently? List its id and number of happy hours.\nAdditional table information: table: coffee_shop"} -{"question": "SELECT MONTH FROM happy_hour GROUP BY MONTH ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which month has the most happy hours?\nAdditional table information: table: coffee_shop"} -{"question": "SELECT MONTH FROM happy_hour GROUP BY MONTH HAVING COUNT(*) > 2", "answer": "Which months have more than 2 happy hours?\nAdditional table information: table: coffee_shop"} -{"question": "SELECT COUNT(*) FROM ALBUM", "answer": "How many albums are there?\nAdditional table information: table: chinook_1"} -{"question": "SELECT COUNT(*) FROM ALBUM", "answer": "Find the number of albums.\nAdditional table information: table: chinook_1"} -{"question": "SELECT Name FROM GENRE", "answer": "List the names of all music genres.\nAdditional table information: table: chinook_1"} -{"question": "SELECT Name FROM GENRE", "answer": "What are the names of different music genres?\nAdditional table information: table: chinook_1"} -{"question": "SELECT * FROM CUSTOMER WHERE State = 'NY'", "answer": "Find all the customer information in state NY.\nAdditional table information: table: chinook_1"} -{"question": "SELECT * FROM CUSTOMER WHERE State = 'NY'", "answer": "What is all the customer information for customers in NY state?\nAdditional table information: table: chinook_1"} -{"question": "SELECT FirstName, LastName FROM EMPLOYEE WHERE City = 'Calgary'", "answer": "What are the first names and last names of the employees who live in Calgary city.\nAdditional table information: table: chinook_1"} -{"question": "SELECT FirstName, LastName FROM EMPLOYEE WHERE City = 'Calgary'", "answer": "Find the full names of employees living in the city of Calgary.\nAdditional table information: table: chinook_1"} -{"question": "SELECT DISTINCT (BillingCountry) FROM INVOICE", "answer": "What are the distinct billing countries of the invoices?\nAdditional table information: table: chinook_1"} -{"question": "SELECT DISTINCT (BillingCountry) FROM INVOICE", "answer": "Find the different billing countries for all invoices.\nAdditional table information: table: chinook_1"} -{"question": "SELECT Name FROM ARTIST WHERE Name LIKE '%a%'", "answer": "Find the names of all artists that have 'a' in their names.\nAdditional table information: table: chinook_1"} -{"question": "SELECT Name FROM ARTIST WHERE Name LIKE '%a%'", "answer": "What are the names of artist who have the letter 'a' in their names?\nAdditional table information: table: chinook_1"} -{"question": "SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'AC/DC'", "answer": "Find the title of all the albums of the artist 'AC/DC'.\nAdditional table information: table: chinook_1"} -{"question": "SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'AC/DC'", "answer": "What are the titles of albums by the artist 'AC/DC'?\nAdditional table information: table: chinook_1"} -{"question": "SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'Metallica'", "answer": "Hom many albums does the artist 'Metallica' have?\nAdditional table information: table: chinook_1"} -{"question": "SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'Metallica'", "answer": "Find the number of albums by the artist 'Metallica'.\nAdditional table information: table: chinook_1"} -{"question": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = 'Balls to the Wall'", "answer": "Which artist does the album 'Balls to the Wall' belong to?\nAdditional table information: table: chinook_1"} -{"question": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = 'Balls to the Wall'", "answer": "Find the name of the artist who made the album 'Balls to the Wall'.\nAdditional table information: table: chinook_1"} -{"question": "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", "answer": "Which artist has the most albums?\nAdditional table information: table: chinook_1"} -{"question": "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", "answer": "What is the name of the artist with the greatest number of albums?\nAdditional table information: table: chinook_1"} -{"question": "SELECT Name FROM TRACK WHERE Name LIKE '%you%'", "answer": "Find the names of all the tracks that contain the word 'you'.\nAdditional table information: table: chinook_1"} -{"question": "SELECT Name FROM TRACK WHERE Name LIKE '%you%'", "answer": "What are the names of tracks that contain the the word you in them?\nAdditional table information: table: chinook_1"} -{"question": "SELECT AVG(UnitPrice) FROM TRACK", "answer": "What is the average unit price of all the tracks?\nAdditional table information: table: chinook_1"} -{"question": "SELECT AVG(UnitPrice) FROM TRACK", "answer": "Find the average unit price for a track.\nAdditional table information: table: chinook_1"} -{"question": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM TRACK", "answer": "What are the durations of the longest and the shortest tracks in milliseconds?\nAdditional table information: table: chinook_1"} -{"question": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM TRACK", "answer": "Find the maximum and minimum durations of tracks in milliseconds.\nAdditional table information: table: chinook_1"} -{"question": "SELECT T1.Title, T2.AlbumID, COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID", "answer": "Show the album names, ids and the number of tracks for each album.\nAdditional table information: table: chinook_1"} -{"question": "SELECT T1.Title, T2.AlbumID, COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID", "answer": "What are the names and ids of the different albums, and how many tracks are on each?\nAdditional table information: table: chinook_1"} -{"question": "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", "answer": "What is the name of the most common genre in all tracks?\nAdditional table information: table: chinook_1"} -{"question": "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", "answer": "Find the name of the genre that is most frequent across all tracks.\nAdditional table information: table: chinook_1"} -{"question": "SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the least common media type in all tracks?\nAdditional table information: table: chinook_1"} -{"question": "SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the name of the media type that is least common across all tracks?\nAdditional table information: table: chinook_1"} -{"question": "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", "answer": "Show the album names and ids for albums that contain tracks with unit price bigger than 1.\nAdditional table information: table: chinook_1"} -{"question": "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", "answer": "What are the titles and ids for albums containing tracks with unit price greater than 1?\nAdditional table information: table: chinook_1"} -{"question": "SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock'", "answer": "How many tracks belong to rock genre?\nAdditional table information: table: chinook_1"} -{"question": "SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock'", "answer": "Count the number of tracks that are part of the rock genre.\nAdditional table information: table: chinook_1"} -{"question": "SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Jazz'", "answer": "What is the average unit price of tracks that belong to Jazz genre?\nAdditional table information: table: chinook_1"} -{"question": "SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Jazz'", "answer": "Find the average unit price of jazz tracks.\nAdditional table information: table: chinook_1"} -{"question": "SELECT FirstName, LastName FROM CUSTOMER WHERE Email = 'luisg@embraer.com.br'", "answer": "What is the first name and last name of the customer that has email 'luisg@embraer.com.br'?\nAdditional table information: table: chinook_1"} -{"question": "SELECT FirstName, LastName FROM CUSTOMER WHERE Email = 'luisg@embraer.com.br'", "answer": "Find the full name of the customer with the email 'luisg@embraer.com.br'.\nAdditional table information: table: chinook_1"} -{"question": "SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE '%gmail.com%'", "answer": "How many customers have email that contains 'gmail.com'?\nAdditional table information: table: chinook_1"} -{"question": "SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE '%gmail.com%'", "answer": "Count the number of customers that have an email containing 'gmail.com'.\nAdditional table information: table: chinook_1"} -{"question": "SELECT T2.FirstName, T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = 'Leonie'", "answer": "What is the first name and last name employee helps the customer with first name Leonie?\nAdditional table information: table: chinook_1"} -{"question": "SELECT T2.FirstName, T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = 'Leonie'", "answer": "Find the full names of employees who help customers with the first name Leonie.\nAdditional table information: table: chinook_1"} -{"question": "SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = '70174'", "answer": "What city does the employee who helps the customer with postal code 70174 live in?\nAdditional table information: table: chinook_1"} -{"question": "SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = '70174'", "answer": "Find the cities corresponding to employees who help customers with the postal code 70174.\nAdditional table information: table: chinook_1"} -{"question": "SELECT COUNT(DISTINCT city) FROM EMPLOYEE", "answer": "How many distinct cities does the employees live in?\nAdditional table information: table: chinook_1"} -{"question": "SELECT COUNT(DISTINCT city) FROM EMPLOYEE", "answer": "Find the number of different cities that employees live in.\nAdditional table information: table: chinook_1"} -{"question": "SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = 'Astrid' AND LastName = 'Gruber'", "answer": "Find all invoice dates corresponding to customers with first name Astrid and last name Gruber.\nAdditional table information: table: chinook_1"} -{"question": "SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = 'Astrid' AND LastName = 'Gruber'", "answer": "What are the invoice dates for customers with the first name Astrid and the last name Gruber?\nAdditional table information: table: chinook_1"} -{"question": "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", "answer": "Find all the customer last names that do not have invoice totals larger than 20.\nAdditional table information: table: chinook_1"} -{"question": "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", "answer": "What are the last names of customers without invoice totals exceeding 20?\nAdditional table information: table: chinook_1"} -{"question": "SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Brazil'", "answer": "Find the first names of all customers that live in Brazil and have an invoice.\nAdditional table information: table: chinook_1"} -{"question": "SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Brazil'", "answer": "What are the different first names for customers from Brazil who have also had an invoice?\nAdditional table information: table: chinook_1"} -{"question": "SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Germany'", "answer": "Find the address of all customers that live in Germany and have invoice.\nAdditional table information: table: chinook_1"} -{"question": "SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Germany'", "answer": "What are the addresses of customers living in Germany who have had an invoice?\nAdditional table information: table: chinook_1"} -{"question": "SELECT Phone FROM EMPLOYEE", "answer": "List the phone numbers of all employees.\nAdditional table information: table: chinook_1"} -{"question": "SELECT Phone FROM EMPLOYEE", "answer": "What are the phone numbers for each employee?\nAdditional table information: table: chinook_1"} -{"question": "SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = 'AAC audio file'", "answer": "How many tracks are in the AAC audio file media type?\nAdditional table information: table: chinook_1"} -{"question": "SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = 'AAC audio file'", "answer": "Count the number of tracks that are of the media type 'AAC audio file'.\nAdditional table information: table: chinook_1"} -{"question": "SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Latin' OR T1.Name = 'Pop'", "answer": "What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?\nAdditional table information: table: chinook_1"} -{"question": "SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Latin' OR T1.Name = 'Pop'", "answer": "Find the average millisecond length of Latin and Pop tracks.\nAdditional table information: table: chinook_1"} -{"question": "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", "answer": "Please show the employee first names and ids of employees who serve at least 10 customers.\nAdditional table information: table: chinook_1"} -{"question": "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", "answer": "What are the first names and support rep ids for employees serving 10 or more customers?\nAdditional table information: table: chinook_1"} -{"question": "SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20", "answer": "Please show the employee last names that serves no more than 20 customers.\nAdditional table information: table: chinook_1"} -{"question": "SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20", "answer": "What are the last names of employees who serve at most 20 customers?\nAdditional table information: table: chinook_1"} -{"question": "SELECT Title FROM ALBUM ORDER BY Title NULLS FIRST", "answer": "Please list all album titles in alphabetical order.\nAdditional table information: table: chinook_1"} -{"question": "SELECT Title FROM ALBUM ORDER BY Title NULLS FIRST", "answer": "What are all the album titles, in alphabetical order?\nAdditional table information: table: chinook_1"} -{"question": "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 NULLS FIRST", "answer": "Please list the name and id of all artists that have at least 3 albums in alphabetical order.\nAdditional table information: table: chinook_1"} -{"question": "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 NULLS FIRST", "answer": "What are the names and ids of artists with 3 or more albums, listed in alphabetical order?\nAdditional table information: table: chinook_1"} -{"question": "SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId", "answer": "Find the names of artists that do not have any albums.\nAdditional table information: table: chinook_1"} -{"question": "SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId", "answer": "What are the names of artists who have not released any albums?\nAdditional table information: table: chinook_1"} -{"question": "SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock'", "answer": "What is the average unit price of rock tracks?\nAdditional table information: table: chinook_1"} -{"question": "SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock'", "answer": "Find the average unit price of tracks from the Rock genre.\nAdditional table information: table: chinook_1"} -{"question": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Pop'", "answer": "What are the duration of the longest and shortest pop tracks in milliseconds?\nAdditional table information: table: chinook_1"} -{"question": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Pop'", "answer": "Find the maximum and minimum millisecond lengths of pop tracks.\nAdditional table information: table: chinook_1"} -{"question": "SELECT BirthDate FROM EMPLOYEE WHERE City = 'Edmonton'", "answer": "What are the birth dates of employees living in Edmonton?\nAdditional table information: table: chinook_1"} -{"question": "SELECT BirthDate FROM EMPLOYEE WHERE City = 'Edmonton'", "answer": "Find the birth dates corresponding to employees who live in the city of Edmonton.\nAdditional table information: table: chinook_1"} -{"question": "SELECT DISTINCT (UnitPrice) FROM TRACK", "answer": "What are the distinct unit prices of all tracks?\nAdditional table information: table: chinook_1"} -{"question": "SELECT DISTINCT (UnitPrice) FROM TRACK", "answer": "Find the distinct unit prices for tracks.\nAdditional table information: table: chinook_1"} -{"question": "SELECT COUNT(*) FROM ARTIST WHERE NOT artistid IN (SELECT artistid FROM ALBUM)", "answer": "How many artists do not have any album?\nAdditional table information: table: chinook_1"} -{"question": "SELECT COUNT(*) FROM ARTIST WHERE NOT artistid IN (SELECT artistid FROM ALBUM)", "answer": "Cound the number of artists who have not released an album.\nAdditional table information: table: chinook_1"} -{"question": "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'", "answer": "What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?\nAdditional table information: table: chinook_1"} -{"question": "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'", "answer": "Find the titles of albums that contain tracks of both the Reggae and Rock genres.\nAdditional table information: table: chinook_1"} -{"question": "SELECT customer_phone FROM available_policies", "answer": "Find all the phone numbers.\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT customer_phone FROM available_policies", "answer": "What are all the phone numbers?\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT customer_phone FROM available_policies WHERE policy_type_code = 'Life Insurance'", "answer": "What are the customer phone numbers under the policy 'Life Insurance'?\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT customer_phone FROM available_policies WHERE policy_type_code = 'Life Insurance'", "answer": "What are the phone numbers of customers using the policy with the code 'Life Insurance'?\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which policy type has the most records in the database?\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which policy type appears most frequently in the available policies?\nAdditional table information: table: insurance_fnol"} -{"question": "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)", "answer": "What are all the customer phone numbers under the most popular policy type?\nAdditional table information: table: insurance_fnol"} -{"question": "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)", "answer": "Find the phone numbers of customers using the most common policy type among the available policies.\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING COUNT(*) > 4", "answer": "Find the policy type used by more than 4 customers.\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING COUNT(*) > 4", "answer": "Find the policy types more than 4 customers use. Show their type code.\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT SUM(settlement_amount), AVG(settlement_amount) FROM settlements", "answer": "Find the total and average amount of settlements.\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT SUM(settlement_amount), AVG(settlement_amount) FROM settlements", "answer": "Return the sum and average of all settlement amounts.\nAdditional table information: table: insurance_fnol"} -{"question": "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", "answer": "Find the name of services that have been used for more than 2 times in first notification of loss.\nAdditional table information: table: insurance_fnol"} -{"question": "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", "answer": "Which services have been used more than twice in first notification of loss? Return the service name.\nAdditional table information: table: insurance_fnol"} -{"question": "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", "answer": "What is the effective date of the claim that has the largest amount of total settlement?\nAdditional table information: table: insurance_fnol"} -{"question": "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", "answer": "Find the claim that has the largest total settlement amount. Return the effective date of the claim.\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT COUNT(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Dayana Robel'", "answer": "How many policies are listed for the customer named 'Dayana Robel'?\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT COUNT(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Dayana Robel'", "answer": "Count the total number of policies used by the customer named 'Dayana Robel'.\nAdditional table information: table: insurance_fnol"} -{"question": "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", "answer": "What is the name of the customer who has the most policies listed?\nAdditional table information: table: insurance_fnol"} -{"question": "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", "answer": "Which customer uses the most policies? Give me the customer name.\nAdditional table information: table: insurance_fnol"} -{"question": "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'", "answer": "What are all the policy types of the customer named 'Dayana Robel'?\nAdditional table information: table: insurance_fnol"} -{"question": "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'", "answer": "Tell me the types of the policy used by the customer named 'Dayana Robel'.\nAdditional table information: table: insurance_fnol"} -{"question": "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)", "answer": "What are all the policy types of the customer that has the most policies listed?\nAdditional table information: table: insurance_fnol"} -{"question": "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)", "answer": "List all the policy types used by the customer enrolled in the most policies.\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT service_name FROM services ORDER BY service_name NULLS FIRST", "answer": "List all the services in the alphabetical order.\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT service_name FROM services ORDER BY service_name NULLS FIRST", "answer": "Give me a list of all the service names sorted alphabetically.\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT COUNT(*) FROM services", "answer": "How many services are there?\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT COUNT(*) FROM services", "answer": "Count the total number of available services.\nAdditional table information: table: insurance_fnol"} -{"question": "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", "answer": "Find the names of users who do not have a first notification of loss record.\nAdditional table information: table: insurance_fnol"} -{"question": "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", "answer": "Which customers do not have a first notification of loss record? Give me the customer names.\nAdditional table information: table: insurance_fnol"} -{"question": "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'", "answer": "Find the names of customers who have used either the service 'Close a policy' or the service 'Upgrade a policy'.\nAdditional table information: table: insurance_fnol"} -{"question": "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'", "answer": "Which customers have used the service named 'Close a policy' or 'Upgrade a policy'? Give me the customer names.\nAdditional table information: table: insurance_fnol"} -{"question": "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'", "answer": "Find the names of customers who have used both the service 'Close a policy' and the service 'New policy application'.\nAdditional table information: table: insurance_fnol"} -{"question": "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'", "answer": "Which customers have used both the service named 'Close a policy' and the service named 'Upgrade a policy'? Give me the customer names.\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT customer_id FROM customers WHERE customer_name LIKE '%Diana%'", "answer": "Find the IDs of customers whose name contains 'Diana'.\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT customer_id FROM customers WHERE customer_name LIKE '%Diana%'", "answer": "What are the IDs of customers who have 'Diana' in part of their names?\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements", "answer": "What are the maximum and minimum settlement amount on record?\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements", "answer": "Find the maximum and minimum settlement amount.\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT customer_id, customer_name FROM customers ORDER BY customer_id ASC NULLS FIRST", "answer": "List all the customers in increasing order of IDs.\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT customer_id, customer_name FROM customers ORDER BY customer_id ASC NULLS FIRST", "answer": "What is the ordered list of customer ids?\nAdditional table information: table: insurance_fnol"} -{"question": "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%'", "answer": "Retrieve the open and close dates of all the policies associated with the customer whose name contains 'Diana'\nAdditional table information: table: insurance_fnol"} -{"question": "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%'", "answer": "What are the open and close dates of all the policies used by the customer who have 'Diana' in part of their names?\nAdditional table information: table: insurance_fnol"} -{"question": "SELECT COUNT(*) FROM enzyme", "answer": "How many kinds of enzymes are there?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT COUNT(*) FROM enzyme", "answer": "What is the total count of enzymes?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT name FROM enzyme ORDER BY name DESC", "answer": "List the name of enzymes in descending lexicographical order.\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT name FROM enzyme ORDER BY name DESC", "answer": "What are the names of enzymes in descending order?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT name, LOCATION FROM enzyme", "answer": "List the names and the locations that the enzymes can make an effect.\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT name, LOCATION FROM enzyme", "answer": "What are the names and locations of all enzymes listed?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT MAX(OMIM) FROM enzyme", "answer": "What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT MAX(OMIM) FROM enzyme", "answer": "What is the maximum OMIM value in the database?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol'", "answer": "What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol'", "answer": "What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT name FROM enzyme WHERE product <> 'Heme'", "answer": "What are the names of enzymes who does not produce 'Heme'?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT name FROM enzyme WHERE product <> 'Heme'", "answer": "What are the names of enzymes whose product is not 'Heme'?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes'", "answer": "What are the names and trade names of the medicines which has 'Yes' value in the FDA record?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes'", "answer": "What are the names and trade names of the medcines that are FDA approved?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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'", "answer": "What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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'", "answer": "What are the names of the enzymes used in the medicine Amisulpride that acts as inhibitors?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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", "answer": "What are the ids and names of the medicine that can interact with two or more enzymes?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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", "answer": "For every medicine id, what are the names of the medicines that can interact with more than one enzyme?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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", "answer": "What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with.\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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", "answer": "What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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", "answer": "What is the id and name of the enzyme with most number of medicines that can interact as 'activator'?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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", "answer": "What is the id and name of the enzyme that can interact with the most medicines as an activator?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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'", "answer": "What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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'", "answer": "What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT interaction_type, COUNT(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common interaction type between enzymes and medicine? And how many are there?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT interaction_type, COUNT(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the most common types of interactions between enzymes and medicine, and how many types are there?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No'", "answer": "How many medicines have the FDA approval status 'No' ?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No'", "answer": "How many medicines were not approved by the FDA?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT COUNT(*) FROM enzyme WHERE NOT id IN (SELECT enzyme_id FROM medicine_enzyme_interaction)", "answer": "How many enzymes do not have any interactions?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT COUNT(*) FROM enzyme WHERE NOT id IN (SELECT enzyme_id FROM medicine_enzyme_interaction)", "answer": "What is the count of enzymes without any interactions?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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", "answer": "What is the id and trade name of the medicines can interact with at least 3 enzymes?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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", "answer": "What are the ids and trade names of the medicine that can interact with at least 3 enzymes?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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'", "answer": "What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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'", "answer": "What are the different names, locations, and products of the enzymes that are capable inhibitor interactions?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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'", "answer": "List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes.\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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'", "answer": "What are the medicine and trade names that can interact as an inhibitor and activitor with enzymes?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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'", "answer": "Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'.\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "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'", "answer": "What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT COUNT(DISTINCT FDA_approved) FROM medicine", "answer": "How many distinct FDA approval statuses are there for the medicines?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT COUNT(DISTINCT FDA_approved) FROM medicine", "answer": "How many different FDA approval statuses exist for medicines?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT name FROM enzyme WHERE name LIKE '%ALA%'", "answer": "Which enzyme names have the substring 'ALA'?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT name FROM enzyme WHERE name LIKE '%ALA%'", "answer": "What are the names of enzymes that include the string 'ALA'?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name", "answer": "find the number of medicines offered by each trade.\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name", "answer": "How many medicines are offered by each trade name?\nAdditional table information: table: medicine_enzyme_interaction"} -{"question": "SELECT school, nickname FROM university ORDER BY founded NULLS FIRST", "answer": "List all schools and their nicknames in the order of founded year.\nAdditional table information: table: university_basketball"} -{"question": "SELECT school, nickname FROM university ORDER BY founded NULLS FIRST", "answer": "What are the different schools and their nicknames, ordered by their founding years?\nAdditional table information: table: university_basketball"} -{"question": "SELECT school, LOCATION FROM university WHERE affiliation = 'Public'", "answer": "List all public schools and their locations.\nAdditional table information: table: university_basketball"} -{"question": "SELECT school, LOCATION FROM university WHERE affiliation = 'Public'", "answer": "What are the public schools and what are their locations?\nAdditional table information: table: university_basketball"} -{"question": "SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1", "answer": "When was the school with the largest enrollment founded?\nAdditional table information: table: university_basketball"} -{"question": "SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1", "answer": "Return the founded year for the school with the largest enrollment.\nAdditional table information: table: university_basketball"} -{"question": "SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1", "answer": "Find the founded year of the newest non public school.\nAdditional table information: table: university_basketball"} -{"question": "SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1", "answer": "What is the founded year of the non public school that was founded most recently?\nAdditional table information: table: university_basketball"} -{"question": "SELECT COUNT(DISTINCT school_id) FROM basketball_match", "answer": "How many schools are in the basketball match?\nAdditional table information: table: university_basketball"} -{"question": "SELECT COUNT(DISTINCT school_id) FROM basketball_match", "answer": "Count the number of schools that have had basketball matches.\nAdditional table information: table: university_basketball"} -{"question": "SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1", "answer": "What is the highest acc percent score in the competition?\nAdditional table information: table: university_basketball"} -{"question": "SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1", "answer": "Return the highest acc percent across all basketball matches.\nAdditional table information: table: university_basketball"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the primary conference of the school that has the lowest acc percent score in the competition?\nAdditional table information: table: university_basketball"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Return the primary conference of the school with the lowest acc percentage score.\nAdditional table information: table: university_basketball"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the team name and acc regular season score of the school that was founded for the longest time?\nAdditional table information: table: university_basketball"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Return the name of the team and the acc during the regular season for the school that was founded the earliest.\nAdditional table information: table: university_basketball"} -{"question": "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'", "answer": "Find the location and all games score of the school that has Clemson as its team name.\nAdditional table information: table: university_basketball"} -{"question": "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'", "answer": "What are the all games score and location of the school called Clemson?\nAdditional table information: table: university_basketball"} -{"question": "SELECT AVG(enrollment) FROM university WHERE founded < 1850", "answer": "What are the average enrollment size of the universities that are founded before 1850?\nAdditional table information: table: university_basketball"} -{"question": "SELECT AVG(enrollment) FROM university WHERE founded < 1850", "answer": "Return the average enrollment of universities founded before 1850.\nAdditional table information: table: university_basketball"} -{"question": "SELECT enrollment, primary_conference FROM university ORDER BY founded NULLS FIRST LIMIT 1", "answer": "Show the enrollment and primary_conference of the oldest college.\nAdditional table information: table: university_basketball"} -{"question": "SELECT enrollment, primary_conference FROM university ORDER BY founded NULLS FIRST LIMIT 1", "answer": "What are the enrollment and primary conference for the university which was founded the earliest?\nAdditional table information: table: university_basketball"} -{"question": "SELECT SUM(enrollment), MIN(enrollment) FROM university", "answer": "What is the total and minimum enrollment of all schools?\nAdditional table information: table: university_basketball"} -{"question": "SELECT SUM(enrollment), MIN(enrollment) FROM university", "answer": "Return the total and minimum enrollments across all schools.\nAdditional table information: table: university_basketball"} -{"question": "SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation", "answer": "Find the total student enrollment for different affiliation type schools.\nAdditional table information: table: university_basketball"} -{"question": "SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation", "answer": "What are the total enrollments of universities of each affiliation type?\nAdditional table information: table: university_basketball"} -{"question": "SELECT COUNT(*) FROM university WHERE NOT school_id IN (SELECT school_id FROM basketball_match)", "answer": "How many schools do not participate in the basketball match?\nAdditional table information: table: university_basketball"} -{"question": "SELECT COUNT(*) FROM university WHERE NOT school_id IN (SELECT school_id FROM basketball_match)", "answer": "Count the number of universities that do not participate in the baketball match.\nAdditional table information: table: university_basketball"} -{"question": "SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'", "answer": "Find the schools that were either founded after 1850 or public.\nAdditional table information: table: university_basketball"} -{"question": "SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'", "answer": "What are the schools that were either founded before 1850 or are public?\nAdditional table information: table: university_basketball"} -{"question": "SELECT COUNT(DISTINCT affiliation) FROM university", "answer": "Find how many different affiliation types there are.\nAdditional table information: table: university_basketball"} -{"question": "SELECT COUNT(DISTINCT affiliation) FROM university", "answer": "Count the number of different affiliation types.\nAdditional table information: table: university_basketball"} -{"question": "SELECT COUNT(*) FROM university WHERE LOCATION LIKE '%NY%'", "answer": "Find how many school locations have the word 'NY'.\nAdditional table information: table: university_basketball"} -{"question": "SELECT COUNT(*) FROM university WHERE LOCATION LIKE '%NY%'", "answer": "How many universities have a location that contains NY?\nAdditional table information: table: university_basketball"} -{"question": "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)", "answer": "Find the team names of the universities whose enrollments are smaller than the average enrollment size.\nAdditional table information: table: university_basketball"} -{"question": "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)", "answer": "What are the names of teams from universities that have a below average enrollment?\nAdditional table information: table: university_basketball"} -{"question": "SELECT COUNT(*), affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation", "answer": "Find the number of universities that have over a 20000 enrollment size for each affiliation type.\nAdditional table information: table: university_basketball"} -{"question": "SELECT COUNT(*), affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation", "answer": "What are the different affiliations, and how many schools with each have an enrollment size of above 20000?\nAdditional table information: table: university_basketball"} -{"question": "SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation", "answer": "Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.\nAdditional table information: table: university_basketball"} -{"question": "SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation", "answer": "What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?\nAdditional table information: table: university_basketball"} -{"question": "SELECT MAX(Enrollment) FROM university", "answer": "What is the maximum enrollment across all schools?\nAdditional table information: table: university_basketball"} -{"question": "SELECT MAX(Enrollment) FROM university", "answer": "Return the maximum enrollment across all schools.\nAdditional table information: table: university_basketball"} -{"question": "SELECT * FROM basketball_match", "answer": "List all information regarding the basketball match.\nAdditional table information: table: university_basketball"} -{"question": "SELECT * FROM basketball_match", "answer": "What is all the information about the basketball match?\nAdditional table information: table: university_basketball"} -{"question": "SELECT team_name FROM basketball_match ORDER BY All_Home DESC", "answer": "List names of all teams in the basketball competition, ordered by all home scores in descending order.\nAdditional table information: table: university_basketball"} -{"question": "SELECT team_name FROM basketball_match ORDER BY All_Home DESC", "answer": "What are the names of all the teams in the basketball competition, sorted by all home scores in descending order?\nAdditional table information: table: university_basketball"} -{"question": "SELECT Model_name FROM chip_model WHERE Launch_year BETWEEN 2002 AND 2004", "answer": "the names of models that launched between 2002 and 2004.\nAdditional table information: table: phone_1"} -{"question": "SELECT Model_name, RAM_MiB FROM chip_model ORDER BY RAM_MiB ASC NULLS FIRST LIMIT 1", "answer": "Which model has the least amount of RAM? List the model name and the amount of RAM.\nAdditional table information: table: phone_1"} -{"question": "SELECT chip_model, screen_mode FROM phone WHERE Hardware_Model_name = 'LG-P760'", "answer": "What are the chip model and screen mode of the phone with hardware model name 'LG-P760'?\nAdditional table information: table: phone_1"} -{"question": "SELECT COUNT(*) FROM phone WHERE Company_name = 'Nokia Corporation'", "answer": "How many phone hardware models are produced by the company named 'Nokia Corporation'?\nAdditional table information: table: phone_1"} -{"question": "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'", "answer": "What is maximum and minimum RAM size of phone produced by company named 'Nokia Corporation'?\nAdditional table information: table: phone_1"} -{"question": "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'", "answer": "What is the average ROM size of phones produced by the company named 'Nokia Corporation'?\nAdditional table information: table: phone_1"} -{"question": "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", "answer": "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.\nAdditional table information: table: phone_1"} -{"question": "SELECT Hardware_Model_name, Company_name FROM phone WHERE Accreditation_type LIKE 'Full'", "answer": "Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.\nAdditional table information: table: phone_1"} -{"question": "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'", "answer": "Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is 'LG-P760'.\nAdditional table information: table: phone_1"} -{"question": "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'", "answer": "List the hardware model name and company name for the phone whose screen mode type is 'Graphics.'\nAdditional table information: table: phone_1"} -{"question": "SELECT Company_name, COUNT(*) FROM phone GROUP BY Company_name ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "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.\nAdditional table information: table: phone_1"} -{"question": "SELECT Company_name FROM phone GROUP BY Company_name HAVING COUNT(*) > 1", "answer": "List the name of the company that produced more than one phone model.\nAdditional table information: table: phone_1"} -{"question": "SELECT MAX(used_kb), MIN(used_kb), AVG(used_kb) FROM screen_mode", "answer": "List the maximum, minimum and average number of used kb in screen mode.\nAdditional table information: table: phone_1"} -{"question": "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", "answer": "List the name of the phone model launched in year 2002 and with the highest RAM size.\nAdditional table information: table: phone_1"} -{"question": "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'", "answer": "What are the wifi and screen mode type of the hardware model named 'LG-P760'?\nAdditional table information: table: phone_1"} -{"question": "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", "answer": "List the hardware model name for the phones that have screen mode type 'Text' or RAM size greater than 32.\nAdditional table information: table: phone_1"} -{"question": "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'", "answer": "List the hardware model name for the phones that were produced by 'Nokia Corporation' or whose screen mode type is 'Graphics.'\nAdditional table information: table: phone_1"} -{"question": "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'", "answer": "List the hardware model name for the phons that were produced by 'Nokia Corporation' but whose screen mode type is not Text.\nAdditional table information: table: phone_1"} -{"question": "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", "answer": "List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15.\nAdditional table information: table: phone_1"} -{"question": "SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type", "answer": "Find the number of phones for each accreditation type.\nAdditional table information: table: phone_1"} -{"question": "SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type", "answer": "How many phones belongs to each accreditation type?\nAdditional table information: table: phone_1"} -{"question": "SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING COUNT(*) > 3", "answer": "Find the accreditation level that more than 3 phones use.\nAdditional table information: table: phone_1"} -{"question": "SELECT * FROM chip_model", "answer": "Find the details for all chip models.\nAdditional table information: table: phone_1"} -{"question": "SELECT COUNT(*) FROM chip_model WHERE wifi = 'No'", "answer": "How many models do not have the wifi function?\nAdditional table information: table: phone_1"} -{"question": "SELECT COUNT(*) FROM chip_model WHERE wifi = 'No'", "answer": "Count the number of chip model that do not have wifi.\nAdditional table information: table: phone_1"} -{"question": "SELECT model_name FROM chip_model ORDER BY launch_year NULLS FIRST", "answer": "List all the model names sorted by their launch year.\nAdditional table information: table: phone_1"} -{"question": "SELECT AVG(RAM_MiB) FROM chip_model WHERE NOT model_name IN (SELECT chip_model FROM phone)", "answer": "Find the average ram mib size of the chip models that are never used by any phone.\nAdditional table information: table: phone_1"} -{"question": "SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type = 'Full'", "answer": "Find the names of the chip models that are not used by any phone with full accreditation type.\nAdditional table information: table: phone_1"} -{"question": "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'", "answer": "Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.\nAdditional table information: table: phone_1"} -{"question": "SELECT COUNT(*) FROM country", "answer": "How many countries are there in total?\nAdditional table information: table: match_season"} -{"question": "SELECT COUNT(*) FROM country", "answer": "Count the number of countries.\nAdditional table information: table: match_season"} -{"question": "SELECT Country_name, Capital FROM country", "answer": "Show the country name and capital of all countries.\nAdditional table information: table: match_season"} -{"question": "SELECT Country_name, Capital FROM country", "answer": "What are the names and capitals of each country?\nAdditional table information: table: match_season"} -{"question": "SELECT Official_native_language FROM country WHERE Official_native_language LIKE '%English%'", "answer": "Show all official native languages that contain the word 'English'.\nAdditional table information: table: match_season"} -{"question": "SELECT Official_native_language FROM country WHERE Official_native_language LIKE '%English%'", "answer": "What are the official native languages that contain the string 'English'.\nAdditional table information: table: match_season"} -{"question": "SELECT DISTINCT POSITION FROM match_season", "answer": "Show all distinct positions of matches.\nAdditional table information: table: match_season"} -{"question": "SELECT DISTINCT POSITION FROM match_season", "answer": "What are the different positions for match season?\nAdditional table information: table: match_season"} -{"question": "SELECT Player FROM match_season WHERE College = 'UCLA'", "answer": "Show the players from college UCLA.\nAdditional table information: table: match_season"} -{"question": "SELECT Player FROM match_season WHERE College = 'UCLA'", "answer": "Who are the players from UCLA?\nAdditional table information: table: match_season"} -{"question": "SELECT DISTINCT POSITION FROM match_season WHERE College = 'UCLA' OR College = 'Duke'", "answer": "Show the distinct position of players from college UCLA or Duke.\nAdditional table information: table: match_season"} -{"question": "SELECT DISTINCT POSITION FROM match_season WHERE College = 'UCLA' OR College = 'Duke'", "answer": "What are the different positions of players from UCLA or Duke colleges?\nAdditional table information: table: match_season"} -{"question": "SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = 'Defender'", "answer": "Show the draft pick numbers and draft classes of players whose positions are defenders.\nAdditional table information: table: match_season"} -{"question": "SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = 'Defender'", "answer": "What are the draft pick numbers and draft classes for players who play the Defender position?\nAdditional table information: table: match_season"} -{"question": "SELECT COUNT(DISTINCT Team) FROM match_season", "answer": "How many distinct teams are involved in match seasons?\nAdditional table information: table: match_season"} -{"question": "SELECT COUNT(DISTINCT Team) FROM match_season", "answer": "Count the number of different teams involved in match season.\nAdditional table information: table: match_season"} -{"question": "SELECT Player, Years_Played FROM player", "answer": "Show the players and the years played.\nAdditional table information: table: match_season"} -{"question": "SELECT Player, Years_Played FROM player", "answer": "Who are the different players and how many years has each played?\nAdditional table information: table: match_season"} -{"question": "SELECT Name FROM Team", "answer": "Show all team names.\nAdditional table information: table: match_season"} -{"question": "SELECT Name FROM Team", "answer": "What are the names of all teams?\nAdditional table information: table: match_season"} -{"question": "SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country", "answer": "Show the season, the player, and the name of the country that player belongs to.\nAdditional table information: table: match_season"} -{"question": "SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country", "answer": "For each player, what are their name, season, and country that they belong to?\nAdditional table information: table: match_season"} -{"question": "SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = 'Indonesia'", "answer": "Which players are from Indonesia?\nAdditional table information: table: match_season"} -{"question": "SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = 'Indonesia'", "answer": "Who are the players from Indonesia?\nAdditional table information: table: match_season"} -{"question": "SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = 'Dublin'", "answer": "What are the distinct positions of the players from a country whose capital is Dublin?\nAdditional table information: table: match_season"} -{"question": "SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = 'Dublin'", "answer": "Give the different positions of players who play for the country with the capital Dublin.\nAdditional table information: table: match_season"} -{"question": "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'", "answer": "What are the official languages of the countries of players from Maryland or Duke college?\nAdditional table information: table: match_season"} -{"question": "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'", "answer": "Return the official native languages of countries who have players from Maryland or Duke colleges.\nAdditional table information: table: match_season"} -{"question": "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'", "answer": "How many distinct official languages are there among countries of players whose positions are defenders.\nAdditional table information: table: match_season"} -{"question": "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'", "answer": "Count the number of different official languages corresponding to countries that players who play Defender are from.\nAdditional table information: table: match_season"} -{"question": "SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id", "answer": "Show the season, the player, and the name of the team that players belong to.\nAdditional table information: table: match_season"} -{"question": "SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id", "answer": "Who are the different players, what season do they play in, and what is the name of the team they are on?\nAdditional table information: table: match_season"} -{"question": "SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Ryley Goldner'", "answer": "Show the positions of the players from the team with name 'Ryley Goldner'.\nAdditional table information: table: match_season"} -{"question": "SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Ryley Goldner'", "answer": "Return the positions of players on the team Ryley Goldner.\nAdditional table information: table: match_season"} -{"question": "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'", "answer": "How many distinct colleges are associated with players from the team with name 'Columbus Crew'.\nAdditional table information: table: match_season"} -{"question": "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'", "answer": "Count the number of different colleges that players who play for Columbus Crew are from.\nAdditional table information: table: match_season"} -{"question": "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'", "answer": "Show the players and years played for players from team 'Columbus Crew'.\nAdditional table information: table: match_season"} -{"question": "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'", "answer": "What are the players who played for Columbus Crew, and how many years did each play for?\nAdditional table information: table: match_season"} -{"question": "SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION", "answer": "Show the position of players and the corresponding number of players.\nAdditional table information: table: match_season"} -{"question": "SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION", "answer": "How many players played each position?\nAdditional table information: table: match_season"} -{"question": "SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name", "answer": "Show the country names and the corresponding number of players.\nAdditional table information: table: match_season"} -{"question": "SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name", "answer": "How many players are from each country?\nAdditional table information: table: match_season"} -{"question": "SELECT player FROM match_season ORDER BY College ASC NULLS FIRST", "answer": "Return all players sorted by college in ascending alphabetical order.\nAdditional table information: table: match_season"} -{"question": "SELECT player FROM match_season ORDER BY College ASC NULLS FIRST", "answer": "What are all the players who played in match season, sorted by college in ascending alphabetical order?\nAdditional table information: table: match_season"} -{"question": "SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common position of players in match seasons.\nAdditional table information: table: match_season"} -{"question": "SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the position that is most common among players in match seasons?\nAdditional table information: table: match_season"} -{"question": "SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3", "answer": "Show the top 3 most common colleges of players in match seasons.\nAdditional table information: table: match_season"} -{"question": "SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What are the three colleges from which the most players are from?\nAdditional table information: table: match_season"} -{"question": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2", "answer": "Show the name of colleges that have at least two players.\nAdditional table information: table: match_season"} -{"question": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2", "answer": "What are the names of all colleges that have two or more players?\nAdditional table information: table: match_season"} -{"question": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 ORDER BY College DESC", "answer": "Show the name of colleges that have at least two players in descending alphabetical order.\nAdditional table information: table: match_season"} -{"question": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 ORDER BY College DESC", "answer": "What are the names of colleges that have two or more players, listed in descending alphabetical order?\nAdditional table information: table: match_season"} -{"question": "SELECT Name FROM team WHERE NOT Team_id IN (SELECT Team FROM match_season)", "answer": "What are the names of teams that do no have match season record?\nAdditional table information: table: match_season"} -{"question": "SELECT Name FROM team WHERE NOT Team_id IN (SELECT Team FROM match_season)", "answer": "Return the names of teams that have no match season record.\nAdditional table information: table: match_season"} -{"question": "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'", "answer": "What are the names of countries that have both players with position forward and players with position defender?\nAdditional table information: table: match_season"} -{"question": "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'", "answer": "Return the names of countries that have players that play the Forward position, as well as players who play the Defender position.\nAdditional table information: table: match_season"} -{"question": "SELECT College FROM match_season WHERE POSITION = 'Midfielder' INTERSECT SELECT College FROM match_season WHERE POSITION = 'Defender'", "answer": "Which college have both players with position midfielder and players with position defender?\nAdditional table information: table: match_season"} -{"question": "SELECT College FROM match_season WHERE POSITION = 'Midfielder' INTERSECT SELECT College FROM match_season WHERE POSITION = 'Defender'", "answer": "Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position.\nAdditional table information: table: match_season"} -{"question": "SELECT COUNT(*) FROM climber", "answer": "How many climbers are there?\nAdditional table information: table: climbing"} -{"question": "SELECT COUNT(*) FROM climber", "answer": "Count the number of climbers.\nAdditional table information: table: climbing"} -{"question": "SELECT Name FROM climber ORDER BY Points DESC", "answer": "List the names of climbers in descending order of points.\nAdditional table information: table: climbing"} -{"question": "SELECT Name FROM climber ORDER BY Points DESC", "answer": "What are the names of the climbers, ordered by points descending?\nAdditional table information: table: climbing"} -{"question": "SELECT Name FROM climber WHERE Country <> 'Switzerland'", "answer": "List the names of climbers whose country is not Switzerland.\nAdditional table information: table: climbing"} -{"question": "SELECT Name FROM climber WHERE Country <> 'Switzerland'", "answer": "What are the names of climbers who are not from the country of Switzerland?\nAdditional table information: table: climbing"} -{"question": "SELECT MAX(Points) FROM climber WHERE Country = 'United Kingdom'", "answer": "What is the maximum point for climbers whose country is United Kingdom?\nAdditional table information: table: climbing"} -{"question": "SELECT MAX(Points) FROM climber WHERE Country = 'United Kingdom'", "answer": "Return the maximum number of points for climbers from the United Kingdom.\nAdditional table information: table: climbing"} -{"question": "SELECT COUNT(DISTINCT Country) FROM climber", "answer": "How many distinct countries are the climbers from?\nAdditional table information: table: climbing"} -{"question": "SELECT COUNT(DISTINCT Country) FROM climber", "answer": "Count the number of different countries that climbers are from.\nAdditional table information: table: climbing"} -{"question": "SELECT Name FROM mountain ORDER BY Name ASC NULLS FIRST", "answer": "What are the names of mountains in ascending alphabetical order?\nAdditional table information: table: climbing"} -{"question": "SELECT Name FROM mountain ORDER BY Name ASC NULLS FIRST", "answer": "Give the names of mountains in alphabetical order.\nAdditional table information: table: climbing"} -{"question": "SELECT Country FROM mountain WHERE Height > 5000", "answer": "What are the countries of mountains with height bigger than 5000?\nAdditional table information: table: climbing"} -{"question": "SELECT Country FROM mountain WHERE Height > 5000", "answer": "Return the countries of the mountains that have a height larger than 5000.\nAdditional table information: table: climbing"} -{"question": "SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1", "answer": "What is the name of the highest mountain?\nAdditional table information: table: climbing"} -{"question": "SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1", "answer": "Return the name of the mountain with the greatest height.\nAdditional table information: table: climbing"} -{"question": "SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3", "answer": "List the distinct ranges of the mountains with the top 3 prominence.\nAdditional table information: table: climbing"} -{"question": "SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3", "answer": "What are the different ranges of the 3 mountains with the highest prominence?\nAdditional table information: table: climbing"} -{"question": "SELECT T1.Name, T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID", "answer": "Show names of climbers and the names of mountains they climb.\nAdditional table information: table: climbing"} -{"question": "SELECT T1.Name, T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID", "answer": "What are the names of climbers and the corresponding names of mountains that they climb?\nAdditional table information: table: climbing"} -{"question": "SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID", "answer": "Show the names of climbers and the heights of mountains they climb.\nAdditional table information: table: climbing"} -{"question": "SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID", "answer": "What are the names of climbers and the corresponding heights of the mountains that they climb?\nAdditional table information: table: climbing"} -{"question": "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", "answer": "Show the height of the mountain climbed by the climber with the maximum points.\nAdditional table information: table: climbing"} -{"question": "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", "answer": "What is the height of the mountain climbined by the climbing who had the most points?\nAdditional table information: table: climbing"} -{"question": "SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = 'West Germany'", "answer": "Show the distinct names of mountains climbed by climbers from country 'West Germany'.\nAdditional table information: table: climbing"} -{"question": "SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = 'West Germany'", "answer": "What are the different names of mountains ascended by climbers from the country of West Germany?\nAdditional table information: table: climbing"} -{"question": "SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = 'Uganda'", "answer": "Show the times used by climbers to climb mountains in Country Uganda.\nAdditional table information: table: climbing"} -{"question": "SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = 'Uganda'", "answer": "What are the times used by climbers who climbed mountains in the country of Uganda?\nAdditional table information: table: climbing"} -{"question": "SELECT Country, COUNT(*) FROM climber GROUP BY Country", "answer": "Please show the countries and the number of climbers from each country.\nAdditional table information: table: climbing"} -{"question": "SELECT Country, COUNT(*) FROM climber GROUP BY Country", "answer": "How many climbers are from each country?\nAdditional table information: table: climbing"} -{"question": "SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1", "answer": "List the countries that have more than one mountain.\nAdditional table information: table: climbing"} -{"question": "SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1", "answer": "Which countries have more than one mountain?\nAdditional table information: table: climbing"} -{"question": "SELECT Name FROM mountain WHERE NOT Mountain_ID IN (SELECT Mountain_ID FROM climber)", "answer": "List the names of mountains that do not have any climber.\nAdditional table information: table: climbing"} -{"question": "SELECT Name FROM mountain WHERE NOT Mountain_ID IN (SELECT Mountain_ID FROM climber)", "answer": "What are the names of countains that no climber has climbed?\nAdditional table information: table: climbing"} -{"question": "SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200", "answer": "Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200.\nAdditional table information: table: climbing"} -{"question": "SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200", "answer": "What are the countries that have both mountains that are higher than 5600 and lower than 5200?\nAdditional table information: table: climbing"} -{"question": "SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the range that has the most number of mountains.\nAdditional table information: table: climbing"} -{"question": "SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which range contains the most mountains?\nAdditional table information: table: climbing"} -{"question": "SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000", "answer": "Show the names of mountains with height more than 5000 or prominence more than 1000.\nAdditional table information: table: climbing"} -{"question": "SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000", "answer": "What are the names of mountains that have a height of over 5000 or a prominence of over 1000?\nAdditional table information: table: climbing"} -{"question": "SELECT COUNT(*) FROM body_builder", "answer": "How many body builders are there?\nAdditional table information: table: body_builder"} -{"question": "SELECT Total FROM body_builder ORDER BY Total ASC NULLS FIRST", "answer": "List the total scores of body builders in ascending order.\nAdditional table information: table: body_builder"} -{"question": "SELECT Snatch, Clean_Jerk FROM body_builder ORDER BY Snatch ASC NULLS FIRST", "answer": "List the snatch score and clean jerk score of body builders in ascending order of snatch score.\nAdditional table information: table: body_builder"} -{"question": "SELECT AVG(Snatch) FROM body_builder", "answer": "What is the average snatch score of body builders?\nAdditional table information: table: body_builder"} -{"question": "SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1", "answer": "What are the clean and jerk score of the body builder with the highest total score?\nAdditional table information: table: body_builder"} -{"question": "SELECT Birth_Date FROM People ORDER BY Height ASC NULLS FIRST", "answer": "What are the birthdays of people in ascending order of height?\nAdditional table information: table: body_builder"} -{"question": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID", "answer": "What are the names of body builders?\nAdditional table information: table: body_builder"} -{"question": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300", "answer": "What are the names of body builders whose total score is higher than 300?\nAdditional table information: table: body_builder"} -{"question": "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", "answer": "What is the name of the body builder with the greatest body weight?\nAdditional table information: table: body_builder"} -{"question": "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", "answer": "What are the birth date and birth place of the body builder with the highest total points?\nAdditional table information: table: body_builder"} -{"question": "SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315", "answer": "What are the heights of body builders with total score smaller than 315?\nAdditional table information: table: body_builder"} -{"question": "SELECT AVG(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200", "answer": "What is the average total score of body builders with height bigger than 200?\nAdditional table information: table: body_builder"} -{"question": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC", "answer": "What are the names of body builders in descending order of total scores?\nAdditional table information: table: body_builder"} -{"question": "SELECT Birth_Place, COUNT(*) FROM people GROUP BY Birth_Place", "answer": "List each birth place along with the number of people from there.\nAdditional table information: table: body_builder"} -{"question": "SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common birth place of people?\nAdditional table information: table: body_builder"} -{"question": "SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) >= 2", "answer": "What are the birth places that are shared by at least two people?\nAdditional table information: table: body_builder"} -{"question": "SELECT Height, Weight FROM people ORDER BY Height DESC", "answer": "List the height and weight of people in descending order of height.\nAdditional table information: table: body_builder"} -{"question": "SELECT * FROM body_builder", "answer": "Show all information about each body builder.\nAdditional table information: table: body_builder"} -{"question": "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", "answer": "List the names and origins of people who are not body builders.\nAdditional table information: table: body_builder"} -{"question": "SELECT COUNT(DISTINCT Birth_Place) FROM people", "answer": "How many distinct birth places are there?\nAdditional table information: table: body_builder"} -{"question": "SELECT COUNT(*) FROM people WHERE NOT people_id IN (SELECT People_ID FROM body_builder)", "answer": "How many persons are not body builders?\nAdditional table information: table: body_builder"} -{"question": "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", "answer": "List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200.\nAdditional table information: table: body_builder"} -{"question": "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%'", "answer": "What are the total scores of the body builders whose birthday contains the string 'January' ?\nAdditional table information: table: body_builder"} -{"question": "SELECT MIN(snatch) FROM body_builder", "answer": "What is the minimum snatch score?\nAdditional table information: table: body_builder"} -{"question": "SELECT COUNT(*) FROM election", "answer": "How many elections are there?\nAdditional table information: table: election_representative"} -{"question": "SELECT Votes FROM election ORDER BY Votes DESC", "answer": "List the votes of elections in descending order.\nAdditional table information: table: election_representative"} -{"question": "SELECT Date, Vote_Percent FROM election", "answer": "List the dates and vote percents of elections.\nAdditional table information: table: election_representative"} -{"question": "SELECT MIN(Vote_Percent), MAX(Vote_Percent) FROM election", "answer": "What are the minimum and maximum vote percents of elections?\nAdditional table information: table: election_representative"} -{"question": "SELECT Name, Party FROM representative", "answer": "What are the names and parties of representatives?\nAdditional table information: table: election_representative"} -{"question": "SELECT Name FROM Representative WHERE Party <> 'Republican'", "answer": "What are the names of representatives whose party is not 'Republican'?\nAdditional table information: table: election_representative"} -{"question": "SELECT Lifespan FROM representative WHERE State = 'New York' OR State = 'Indiana'", "answer": "What are the life spans of representatives from New York state or Indiana state?\nAdditional table information: table: election_representative"} -{"question": "SELECT T2.Name, T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID", "answer": "What are the names of representatives and the dates of elections they participated in.\nAdditional table information: table: election_representative"} -{"question": "SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE Votes > 10000", "answer": "What are the names of representatives with more than 10000 votes in election?\nAdditional table information: table: election_representative"} -{"question": "SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC", "answer": "What are the names of representatives in descending order of votes?\nAdditional table information: table: election_representative"} -{"question": "SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes ASC NULLS FIRST LIMIT 1", "answer": "What is the party of the representative that has the smallest number of votes.\nAdditional table information: table: election_representative"} -{"question": "SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY Vote_Percent DESC", "answer": "What are the lifespans of representatives in descending order of vote percent?\nAdditional table information: table: election_representative"} -{"question": "SELECT AVG(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = 'Republican'", "answer": "What is the average number of votes of representatives from party 'Republican'?\nAdditional table information: table: election_representative"} -{"question": "SELECT Party, COUNT(*) FROM representative GROUP BY Party", "answer": "What are the different parties of representative? Show the party name and the number of representatives in each party.\nAdditional table information: table: election_representative"} -{"question": "SELECT Party, COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the party that has the largest number of representatives?\nAdditional table information: table: election_representative"} -{"question": "SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3", "answer": "What parties have at least three representatives?\nAdditional table information: table: election_representative"} -{"question": "SELECT State FROM representative GROUP BY State HAVING COUNT(*) >= 2", "answer": "What states have at least two representatives?\nAdditional table information: table: election_representative"} -{"question": "SELECT Name FROM representative WHERE NOT Representative_ID IN (SELECT Representative_ID FROM election)", "answer": "List the names of representatives that have not participated in elections listed here.\nAdditional table information: table: election_representative"} -{"question": "SELECT Party FROM representative WHERE State = 'New York' INTERSECT SELECT Party FROM representative WHERE State = 'Pennsylvania'", "answer": "Show the parties that have both representatives in New York state and representatives in Pennsylvania state.\nAdditional table information: table: election_representative"} -{"question": "SELECT COUNT(DISTINCT Party) FROM representative", "answer": "How many distinct parties are there for representatives?\nAdditional table information: table: election_representative"} -{"question": "SELECT COUNT(*) FROM Apartment_Bookings", "answer": "How many apartment bookings are there in total?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT COUNT(*) FROM Apartment_Bookings", "answer": "Count the total number of apartment bookings.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT booking_start_date, booking_end_date FROM Apartment_Bookings", "answer": "Show the start dates and end dates of all the apartment bookings.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT booking_start_date, booking_end_date FROM Apartment_Bookings", "answer": "What are the start date and end date of each apartment booking?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT DISTINCT building_description FROM Apartment_Buildings", "answer": "Show all distinct building descriptions.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT DISTINCT building_description FROM Apartment_Buildings", "answer": "Give me a list of all the distinct building descriptions.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = 'Emma'", "answer": "Show the short names of the buildings managed by 'Emma'.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = 'Emma'", "answer": "Which buildings does 'Emma' manage? Give me the short names of the buildings.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = 'Brenden'", "answer": "Show the addresses and phones of all the buildings managed by 'Brenden'.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = 'Brenden'", "answer": "What are the address and phone number of the buildings managed by 'Brenden'?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE '%court%'", "answer": "What are the building full names that contain the word 'court'?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE '%court%'", "answer": "Find all the building full names containing the word 'court'.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT MIN(bathroom_count), MAX(bathroom_count) FROM Apartments", "answer": "What is the minimum and maximum number of bathrooms of all the apartments?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT MIN(bathroom_count), MAX(bathroom_count) FROM Apartments", "answer": "Give me the minimum and maximum bathroom count among all the apartments.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT AVG(bedroom_count) FROM Apartments", "answer": "What is the average number of bedrooms of all apartments?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT AVG(bedroom_count) FROM Apartments", "answer": "Find the average number of bedrooms of all the apartments.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_number, room_count FROM Apartments", "answer": "Return the apartment number and the number of rooms for each apartment.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_number, room_count FROM Apartments", "answer": "What are the apartment number and the room count of each apartment?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT AVG(room_count) FROM Apartments WHERE apt_type_code = 'Studio'", "answer": "What is the average number of rooms of apartments with type code 'Studio'?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT AVG(room_count) FROM Apartments WHERE apt_type_code = 'Studio'", "answer": "Find the average room count of the apartments that have the 'Studio' type code.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_number FROM Apartments WHERE apt_type_code = 'Flat'", "answer": "Return the apartment numbers of the apartments with type code 'Flat'.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_number FROM Apartments WHERE apt_type_code = 'Flat'", "answer": "Which apartments have type code 'Flat'? Give me their apartment numbers.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT guest_first_name, guest_last_name FROM Guests", "answer": "Return the first names and last names of all guests\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT guest_first_name, guest_last_name FROM Guests", "answer": "What are the first names and last names of all the guests?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT date_of_birth FROM Guests WHERE gender_code = 'Male'", "answer": "Return the date of birth for all the guests with gender code 'Male'.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT date_of_birth FROM Guests WHERE gender_code = 'Male'", "answer": "What are dates of birth of all the guests whose gender is 'Male'?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id", "answer": "Show the apartment numbers, start dates, and end dates of all the apartment bookings.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id", "answer": "What are the apartment number, start date, and end date of each apartment booking?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = 'Duplex'", "answer": "What are the booking start and end dates of the apartments with type code 'Duplex'?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = 'Duplex'", "answer": "Return the booking start date and end date for the apartments that have type code 'Duplex'.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2", "answer": "What are the booking start and end dates of the apartments with more than 2 bedrooms?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2", "answer": "Find the booking start date and end date for the apartments that have more than two bedrooms.\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "What is the booking status code of the apartment with apartment number 'Suite 634'?\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "Tell me the booking status code for the apartment with number 'Suite 634'.\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "Show the distinct apartment numbers of the apartments that have bookings with status code 'Confirmed'.\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "Which apartments have bookings with status code 'Confirmed'? Return their apartment numbers.\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "Show the average room count of the apartments that have booking status code 'Provisional'.\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "What is the average room count of the apartments whose booking status code is 'Provisional'?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id", "answer": "Show the guest first names, start dates, and end dates of all the apartment bookings.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id", "answer": "What are the guest first name, start date, and end date of each apartment booking?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = 'Female'", "answer": "Show the start dates and end dates of all the apartment bookings made by guests with gender code 'Female'.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = 'Female'", "answer": "What are the start date and end date of the apartment bookings made by female guests (gender code 'Female')?\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "Show the first names and last names of all the guests that have apartment bookings with status code 'Confirmed'.\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "Which guests have apartment bookings with status code 'Confirmed'? Return their first names and last names.\nAdditional table information: table: apartment_rentals"} -{"question": "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", "answer": "Show the facility codes of apartments with more than 4 bedrooms.\nAdditional table information: table: apartment_rentals"} -{"question": "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", "answer": "What are the facility codes of the apartments with more than four bedrooms?\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "Show the total number of rooms of all apartments with facility code 'Gym'.\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "Find the total number of rooms in the apartments that have facility code 'Gym'.\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "Show the total number of rooms of the apartments in the building with short name 'Columbus Square'.\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "How many rooms in total are there in the apartments in the building with short name 'Columbus Square'?\nAdditional table information: table: apartment_rentals"} -{"question": "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", "answer": "Show the addresses of the buildings that have apartments with more than 2 bathrooms.\nAdditional table information: table: apartment_rentals"} -{"question": "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", "answer": "Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings.\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "Show the apartment type codes and apartment numbers in the buildings managed by 'Kyle'.\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "What apartment type codes and apartment numbers do the buildings managed by 'Kyle' have?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code", "answer": "Show the booking status code and the corresponding number of bookings.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code", "answer": "How many bookings does each booking status have? List the booking status code and the number of corresponding bookings.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_number FROM Apartments ORDER BY room_count ASC NULLS FIRST", "answer": "Return all the apartment numbers sorted by the room count in ascending order.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_number FROM Apartments ORDER BY room_count ASC NULLS FIRST", "answer": "Sort the apartment numbers in ascending order of room count.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1", "answer": "Return the apartment number with the largest number of bedrooms.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1", "answer": "What is the apartment number of the apartment with the most beds?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_type_code, COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC NULLS FIRST", "answer": "Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_type_code, COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC NULLS FIRST", "answer": "Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY AVG(room_count) DESC LIMIT 3", "answer": "Show the top 3 apartment type codes sorted by the average number of rooms in descending order.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY AVG(room_count) DESC LIMIT 3", "answer": "What are the top three apartment types in terms of the average room count? Give me the\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_type_code, bathroom_count, bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY SUM(room_count) DESC LIMIT 1", "answer": "Show the apartment type code that has the largest number of total rooms, together with the number of bathrooms and number of bedrooms.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_type_code, bathroom_count, bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY SUM(room_count) DESC LIMIT 1", "answer": "Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common apartment type code.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which apartment type code appears the most often?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common apartment type code among apartments with more than 1 bathroom.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which apartment type code is the most common among apartments with more than one bathroom?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_type_code, MAX(room_count), MIN(room_count) FROM Apartments GROUP BY apt_type_code", "answer": "Show each apartment type code, and the maximum and minimum number of rooms for each type.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT apt_type_code, MAX(room_count), MIN(room_count) FROM Apartments GROUP BY apt_type_code", "answer": "Return each apartment type code along with the maximum and minimum number of rooms among each type.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT gender_code, COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC", "answer": "Show each gender code and the corresponding count of guests sorted by the count in descending order.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT gender_code, COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC", "answer": "Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT COUNT(*) FROM Apartments WHERE NOT apt_id IN (SELECT apt_id FROM Apartment_Facilities)", "answer": "How many apartments do not have any facility?\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT COUNT(*) FROM Apartments WHERE NOT apt_id IN (SELECT apt_id FROM Apartment_Facilities)", "answer": "Find the number of apartments that have no facility.\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "Show the apartment numbers of apartments with bookings that have status code both 'Provisional' and 'Confirmed'\nAdditional table information: table: apartment_rentals"} -{"question": "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'", "answer": "Which apartments have bookings with both status codes 'Provisional' and 'Confirmed'? Give me the apartment numbers.\nAdditional table information: table: apartment_rentals"} -{"question": "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", "answer": "Show the apartment numbers of apartments with unit status availability of both 0 and 1.\nAdditional table information: table: apartment_rentals"} -{"question": "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", "answer": "Which apartments have unit status availability of both 0 and 1? Return their apartment numbers.\nAdditional table information: table: apartment_rentals"} -{"question": "SELECT COUNT(*) FROM game WHERE season > 2007", "answer": "How many games are held after season 2007?\nAdditional table information: table: game_injury"} -{"question": "SELECT Date FROM game ORDER BY home_team DESC", "answer": "List the dates of games by the home team name in descending order.\nAdditional table information: table: game_injury"} -{"question": "SELECT season, home_team, away_team FROM game", "answer": "List the season, home team, away team of all the games.\nAdditional table information: table: game_injury"} -{"question": "SELECT MAX(home_games), MIN(home_games), AVG(home_games) FROM stadium", "answer": "What are the maximum, minimum and average home games each stadium held?\nAdditional table information: table: game_injury"} -{"question": "SELECT average_attendance FROM stadium WHERE capacity_percentage > 100", "answer": "What is the average attendance of stadiums with capacity percentage higher than 100%?\nAdditional table information: table: game_injury"} -{"question": "SELECT player, number_of_matches, SOURCE FROM injury_accident WHERE injury <> 'Knee problem'", "answer": "What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'?\nAdditional table information: table: game_injury"} -{"question": "SELECT T1.season FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id WHERE T2.player = 'Walter Samuel'", "answer": "What is the season of the game which causes the player 'Walter Samuel' to get injured?\nAdditional table information: table: game_injury"} -{"question": "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", "answer": "What are the ids, scores, and dates of the games which caused at least two injury accidents?\nAdditional table information: table: game_injury"} -{"question": "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", "answer": "What are the id and name of the stadium where the most injury accidents happened?\nAdditional table information: table: game_injury"} -{"question": "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", "answer": "Find the id and name of the stadium where the largest number of injury accidents occurred.\nAdditional table information: table: game_injury"} -{"question": "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'", "answer": "In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'?\nAdditional table information: table: game_injury"} -{"question": "SELECT COUNT(DISTINCT SOURCE) FROM injury_accident", "answer": "How many different kinds of information sources are there for injury accidents?\nAdditional table information: table: game_injury"} -{"question": "SELECT COUNT(*) FROM game WHERE NOT id IN (SELECT game_id FROM injury_accident)", "answer": "How many games are free of injury accidents?\nAdditional table information: table: game_injury"} -{"question": "SELECT COUNT(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.season > 2010", "answer": "How many distinct kinds of injuries happened after season 2010?\nAdditional table information: table: game_injury"} -{"question": "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'", "answer": "List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured.\nAdditional table information: table: game_injury"} -{"question": "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", "answer": "Show the name, average attendance, total attendance for stadiums where no accidents happened.\nAdditional table information: table: game_injury"} -{"question": "SELECT name FROM stadium WHERE name LIKE '%Bank%'", "answer": "Which stadium name contains the substring 'Bank'?\nAdditional table information: table: game_injury"} -{"question": "SELECT T1.id, COUNT(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.id", "answer": "How many games has each stadium held?\nAdditional table information: table: game_injury"} -{"question": "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", "answer": "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.\nAdditional table information: table: game_injury"} -{"question": "SELECT T1.name, T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id", "answer": "List all country and league names.\nAdditional table information: table: soccer_1"} -{"question": "SELECT COUNT(*) FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id WHERE T1.name = 'England'", "answer": "How many leagues are there in England?\nAdditional table information: table: soccer_1"} -{"question": "SELECT AVG(weight) FROM Player", "answer": "What is the average weight of all players?\nAdditional table information: table: soccer_1"} -{"question": "SELECT MAX(weight), MIN(weight) FROM Player", "answer": "What is the maximum and minimum height of all players?\nAdditional table information: table: soccer_1"} -{"question": "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)", "answer": "List all player names who have an overall rating higher than the average.\nAdditional table information: table: soccer_1"} -{"question": "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)", "answer": "What are the names of players who have the best dribbling?\nAdditional table information: table: soccer_1"} -{"question": "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'", "answer": "List the names of all players who have a crossing score higher than 90 and prefer their right foot.\nAdditional table information: table: soccer_1"} -{"question": "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", "answer": "List the names of all left-footed players who have overall rating between 85 and 90.\nAdditional table information: table: soccer_1"} -{"question": "SELECT preferred_foot, AVG(overall_rating) FROM Player_Attributes GROUP BY preferred_foot", "answer": "What is the average rating for right-footed players and left-footed players?\nAdditional table information: table: soccer_1"} -{"question": "SELECT preferred_foot, COUNT(*) FROM Player_Attributes WHERE overall_rating > 80 GROUP BY preferred_foot", "answer": "Of all players with an overall rating greater than 80, how many are right-footed and left-footed?\nAdditional table information: table: soccer_1"} -{"question": "SELECT player_api_id FROM Player WHERE height >= 180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating > 85", "answer": "List all of the player ids with a height of at least 180cm and an overall rating higher than 85.\nAdditional table information: table: soccer_1"} -{"question": "SELECT player_api_id FROM Player WHERE height >= 180 AND height <= 190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = 'left'", "answer": "List all of the ids for left-footed players with a height between 180cm and 190cm.\nAdditional table information: table: soccer_1"} -{"question": "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", "answer": "Who are the top 3 players in terms of overall rating?\nAdditional table information: table: soccer_1"} -{"question": "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", "answer": "List the names and birthdays of the top five players in terms of potential.\nAdditional table information: table: soccer_1"} -{"question": "SELECT COUNT(*) FROM performance", "answer": "How many performances are there?\nAdditional table information: table: performance_attendance"} -{"question": "SELECT HOST FROM performance ORDER BY Attendance ASC NULLS FIRST", "answer": "List the hosts of performances in ascending order of attendance.\nAdditional table information: table: performance_attendance"} -{"question": "SELECT Date, LOCATION FROM performance", "answer": "What are the dates and locations of performances?\nAdditional table information: table: performance_attendance"} -{"question": "SELECT Attendance FROM performance WHERE LOCATION = 'TD Garden' OR LOCATION = 'Bell Centre'", "answer": "Show the attendances of the performances at location 'TD Garden' or 'Bell Centre'\nAdditional table information: table: performance_attendance"} -{"question": "SELECT AVG(Attendance) FROM performance", "answer": "What is the average number of attendees for performances?\nAdditional table information: table: performance_attendance"} -{"question": "SELECT Date FROM performance ORDER BY Attendance DESC LIMIT 1", "answer": "What is the date of the performance with the highest number of attendees?\nAdditional table information: table: performance_attendance"} -{"question": "SELECT LOCATION, COUNT(*) FROM performance GROUP BY LOCATION", "answer": "Show different locations and the number of performances at each location.\nAdditional table information: table: performance_attendance"} -{"question": "SELECT LOCATION FROM performance GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common location of performances.\nAdditional table information: table: performance_attendance"} -{"question": "SELECT LOCATION FROM performance GROUP BY LOCATION HAVING COUNT(*) >= 2", "answer": "Show the locations that have at least two performances.\nAdditional table information: table: performance_attendance"} -{"question": "SELECT LOCATION FROM performance WHERE Attendance > 2000 INTERSECT SELECT LOCATION FROM performance WHERE Attendance < 1000", "answer": "Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees.\nAdditional table information: table: performance_attendance"} -{"question": "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", "answer": "Show the names of members and the location of the performances they attended.\nAdditional table information: table: performance_attendance"} -{"question": "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 NULLS FIRST", "answer": "Show the names of members and the location of performances they attended in ascending alphabetical order of their names.\nAdditional table information: table: performance_attendance"} -{"question": "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'", "answer": "Show the dates of performances with attending members whose roles are 'Violin'.\nAdditional table information: table: performance_attendance"} -{"question": "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", "answer": "Show the names of members and the dates of performances they attended in descending order of attendance of the performances.\nAdditional table information: table: performance_attendance"} -{"question": "SELECT Name FROM member WHERE NOT Member_ID IN (SELECT Member_ID FROM member_attendance)", "answer": "List the names of members who did not attend any performance.\nAdditional table information: table: performance_attendance"} -{"question": "SELECT DISTINCT building FROM classroom WHERE capacity > 50", "answer": "Find the buildings which have rooms with capacity more than 50.\nAdditional table information: table: college_2"} -{"question": "SELECT DISTINCT building FROM classroom WHERE capacity > 50", "answer": "What are the distinct buildings with capacities of greater than 50?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*) FROM classroom WHERE building <> 'Lamberton'", "answer": "Count the number of rooms that are not in the Lamberton building.\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*) FROM classroom WHERE building <> 'Lamberton'", "answer": "How many classrooms are not in Lamberton?\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name, building FROM department WHERE budget > (SELECT AVG(budget) FROM department)", "answer": "What is the name and building of the departments whose budget is more than the average budget?\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name, building FROM department WHERE budget > (SELECT AVG(budget) FROM department)", "answer": "Give the name and building of the departments with greater than average budget.\nAdditional table information: table: college_2"} -{"question": "SELECT building, room_number FROM classroom WHERE capacity BETWEEN 50 AND 100", "answer": "Find the room number of the rooms which can sit 50 to 100 students and their buildings.\nAdditional table information: table: college_2"} -{"question": "SELECT building, room_number FROM classroom WHERE capacity BETWEEN 50 AND 100", "answer": "What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students?\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name, building FROM department ORDER BY budget DESC LIMIT 1", "answer": "Find the name and building of the department with the highest budget.\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name, building FROM department ORDER BY budget DESC LIMIT 1", "answer": "What is the department name and corresponding building for the department with the greatest budget?\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1", "answer": "What is the name of the student who has the highest total credits in the History department.\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1", "answer": "Give the name of the student in the History department with the most credits.\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton'", "answer": "How many rooms does the Lamberton building have?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton'", "answer": "Count the number of classrooms in Lamberton.\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(DISTINCT s_id) FROM advisor", "answer": "How many students have advisors?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(DISTINCT s_id) FROM advisor", "answer": "Count the number of students who have advisors.\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(DISTINCT dept_name) FROM course", "answer": "How many departments offer courses?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(DISTINCT dept_name) FROM course", "answer": "Count the number of departments which offer courses.\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(DISTINCT course_id) FROM course WHERE dept_name = 'Physics'", "answer": "How many different courses offered by Physics department?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(DISTINCT course_id) FROM course WHERE dept_name = 'Physics'", "answer": "Count the number of courses in the Physics department.\nAdditional table information: table: college_2"} -{"question": "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", "answer": "Find the title of courses that have two prerequisites?\nAdditional table information: table: college_2"} -{"question": "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", "answer": "What are the titles for courses with two prerequisites?\nAdditional table information: table: college_2"} -{"question": "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", "answer": "Find the title, credit, and department name of courses that have more than one prerequisites?\nAdditional table information: table: college_2"} -{"question": "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", "answer": "What is the title, credit value, and department name for courses with more than one prerequisite?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*) FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)", "answer": "How many courses that do not have prerequisite?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*) FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)", "answer": "Count the number of courses without prerequisites.\nAdditional table information: table: college_2"} -{"question": "SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)", "answer": "Find the name of the courses that do not have any prerequisite?\nAdditional table information: table: college_2"} -{"question": "SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)", "answer": "What are the titles of courses without prerequisites?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(DISTINCT id) FROM teaches", "answer": "How many different instructors have taught some course?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(DISTINCT id) FROM teaches", "answer": "Count the number of distinct instructors who have taught a course.\nAdditional table information: table: college_2"} -{"question": "SELECT SUM(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance'", "answer": "Find the total budgets of the Marketing or Finance department.\nAdditional table information: table: college_2"} -{"question": "SELECT SUM(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance'", "answer": "What is the sum of budgets of the Marketing and Finance departments?\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'", "answer": "Find the department name of the instructor whose name contains 'Soisalon'.\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'", "answer": "What is the name of the department with an instructure who has a name like 'Soisalon'?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50", "answer": "How many rooms whose capacity is less than 50 does the Lamberton building have?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50", "answer": "Count the number of rooms in Lamberton with capacity lower than 50.\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department)", "answer": "Find the name and budget of departments whose budgets are more than the average budget.\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department)", "answer": "What are the names and budgets of departments with budgets greater than the average?\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary NULLS FIRST LIMIT 1", "answer": "what is the name of the instructor who is in Statistics department and earns the lowest salary?\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary NULLS FIRST LIMIT 1", "answer": "Give the name of the lowest earning instructor in the Statistics department.\nAdditional table information: table: college_2"} -{"question": "SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology'", "answer": "Find the title of course that is provided by both Statistics and Psychology departments.\nAdditional table information: table: college_2"} -{"question": "SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology'", "answer": "What is the title of a course that is listed in both the Statistics and Psychology departments?\nAdditional table information: table: college_2"} -{"question": "SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology'", "answer": "Find the title of course that is provided by Statistics but not Psychology departments.\nAdditional table information: table: college_2"} -{"question": "SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology'", "answer": "What are the titles of courses that are in the Statistics department but not the Psychology department?\nAdditional table information: table: college_2"} -{"question": "SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010", "answer": "Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010.\nAdditional table information: table: college_2"} -{"question": "SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010", "answer": "What are the ids of instructors who taught in the Fall of 2009 but not in the Spring of 2010?\nAdditional table information: table: college_2"} -{"question": "SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010", "answer": "Find the name of students who took any class in the years of 2009 and 2010.\nAdditional table information: table: college_2"} -{"question": "SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010", "answer": "What are the names of the students who took classes in 2009 or 2010?\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 3", "answer": "Find the names of the top 3 departments that provide the largest amount of courses?\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What are the names of the 3 departments with the most courses?\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY SUM(credits) DESC LIMIT 1", "answer": "Find the name of the department that offers the highest total credits?\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY SUM(credits) DESC LIMIT 1", "answer": "What is the name of the department with the most credits?\nAdditional table information: table: college_2"} -{"question": "SELECT title FROM course ORDER BY title NULLS FIRST, credits NULLS FIRST", "answer": "List the names of all courses ordered by their titles and credits.\nAdditional table information: table: college_2"} -{"question": "SELECT title FROM course ORDER BY title NULLS FIRST, credits NULLS FIRST", "answer": "Given the titles of all courses, in order of titles and credits.\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name FROM department ORDER BY budget NULLS FIRST LIMIT 1", "answer": "Which department has the lowest budget?\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name FROM department ORDER BY budget NULLS FIRST LIMIT 1", "answer": "Give the name of the department with the lowest budget.\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name, building FROM department ORDER BY budget DESC", "answer": "List the names and buildings of all departments sorted by the budget from large to small.\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name, building FROM department ORDER BY budget DESC", "answer": "What are the names and buildings of the deparments, sorted by budget descending?\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor ORDER BY salary DESC LIMIT 1", "answer": "Who is the instructor with the highest salary?\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor ORDER BY salary DESC LIMIT 1", "answer": "Give the name of the highest paid instructor.\nAdditional table information: table: college_2"} -{"question": "SELECT * FROM instructor ORDER BY salary NULLS FIRST", "answer": "List the information of all instructors ordered by their salary in ascending order.\nAdditional table information: table: college_2"} -{"question": "SELECT * FROM instructor ORDER BY salary NULLS FIRST", "answer": "Give all information regarding instructors, in order of salary from least to greatest.\nAdditional table information: table: college_2"} -{"question": "SELECT name, dept_name FROM student ORDER BY tot_cred NULLS FIRST", "answer": "Find the name of the students and their department names sorted by their total credits in ascending order.\nAdditional table information: table: college_2"} -{"question": "SELECT name, dept_name FROM student ORDER BY tot_cred NULLS FIRST", "answer": "What are the names of students and their respective departments, ordered by number of credits from least to greatest?\nAdditional table information: table: college_2"} -{"question": "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 NULLS FIRST", "answer": "list in alphabetic order all course names and their instructors' names in year 2008.\nAdditional table information: table: college_2"} -{"question": "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 NULLS FIRST", "answer": "Show all titles and their instructors' names for courses in 2008, in alphabetical order by title.\nAdditional table information: table: college_2"} -{"question": "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", "answer": "Find the name of instructors who are advising more than one student.\nAdditional table information: table: college_2"} -{"question": "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", "answer": "What are the names of instructors who advise more than one student?\nAdditional table information: table: college_2"} -{"question": "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", "answer": "Find the name of the students who have more than one advisor?\nAdditional table information: table: college_2"} -{"question": "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", "answer": "What are the names of students who have more than one advisor?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*), building FROM classroom WHERE capacity > 50 GROUP BY building", "answer": "Find the number of rooms with more than 50 capacity for each building.\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*), building FROM classroom WHERE capacity > 50 GROUP BY building", "answer": "How many rooms in each building have a capacity of over 50?\nAdditional table information: table: college_2"} -{"question": "SELECT MAX(capacity), AVG(capacity), building FROM classroom GROUP BY building", "answer": "Find the maximum and average capacity among rooms in each building.\nAdditional table information: table: college_2"} -{"question": "SELECT MAX(capacity), AVG(capacity), building FROM classroom GROUP BY building", "answer": "What are the greatest and average capacity for rooms in each building?\nAdditional table information: table: college_2"} -{"question": "SELECT title FROM course GROUP BY title HAVING COUNT(*) > 1", "answer": "Find the title of the course that is offered by more than one department.\nAdditional table information: table: college_2"} -{"question": "SELECT title FROM course GROUP BY title HAVING COUNT(*) > 1", "answer": "What are the titles of courses that are offered in more than one department?\nAdditional table information: table: college_2"} -{"question": "SELECT SUM(credits), dept_name FROM course GROUP BY dept_name", "answer": "Find the total credits of courses provided by different department.\nAdditional table information: table: college_2"} -{"question": "SELECT SUM(credits), dept_name FROM course GROUP BY dept_name", "answer": "How many total credits are offered by each department?\nAdditional table information: table: college_2"} -{"question": "SELECT MIN(salary), dept_name FROM instructor GROUP BY dept_name HAVING AVG(salary) > (SELECT AVG(salary) FROM instructor)", "answer": "Find the minimum salary for the departments whose average salary is above the average payment of all instructors.\nAdditional table information: table: college_2"} -{"question": "SELECT MIN(salary), dept_name FROM instructor GROUP BY dept_name HAVING AVG(salary) > (SELECT AVG(salary) FROM instructor)", "answer": "What is the lowest salary in departments with average salary greater than the overall average.\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*), semester, YEAR FROM SECTION GROUP BY semester, YEAR", "answer": "Find the number of courses provided in each semester and year.\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*), semester, YEAR FROM SECTION GROUP BY semester, YEAR", "answer": "How many courses are provided in each semester and year?\nAdditional table information: table: college_2"} -{"question": "SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the year which offers the largest number of courses.\nAdditional table information: table: college_2"} -{"question": "SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which year had the greatest number of courses?\nAdditional table information: table: college_2"} -{"question": "SELECT semester, YEAR FROM SECTION GROUP BY semester, YEAR ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the year and semester when offers the largest number of courses.\nAdditional table information: table: college_2"} -{"question": "SELECT semester, YEAR FROM SECTION GROUP BY semester, YEAR ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the year and semester with the most courses?\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name FROM student GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of department has the highest amount of students?\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name FROM student GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the deparment with the highest enrollment?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*), dept_name FROM student GROUP BY dept_name", "answer": "Find the total number of students in each department.\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*), dept_name FROM student GROUP BY dept_name", "answer": "How many students are in each department?\nAdditional table information: table: college_2"} -{"question": "SELECT semester, YEAR FROM takes GROUP BY semester, YEAR ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Find the semester and year which has the least number of student taking any class.\nAdditional table information: table: college_2"} -{"question": "SELECT semester, YEAR FROM takes GROUP BY semester, YEAR ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Which semeseter and year had the fewest students?\nAdditional table information: table: college_2"} -{"question": "SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History'", "answer": "What is the id of the instructor who advises of all students from History department?\nAdditional table information: table: college_2"} -{"question": "SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History'", "answer": "Give id of the instructor who advises students in the History department.\nAdditional table information: table: college_2"} -{"question": "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'", "answer": "Find the name and salary of the instructors who are advisors of any student from History department?\nAdditional table information: table: college_2"} -{"question": "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'", "answer": "What are the names and salaries of instructors who advises students in the History department?\nAdditional table information: table: college_2"} -{"question": "SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq", "answer": "Find the id of the courses that do not have any prerequisite?\nAdditional table information: table: college_2"} -{"question": "SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq", "answer": "What are the ids of courses without prerequisites?\nAdditional table information: table: college_2"} -{"question": "SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)", "answer": "Find the name of the courses that do not have any prerequisite?\nAdditional table information: table: college_2"} -{"question": "SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)", "answer": "What are the names of courses without prerequisites?\nAdditional table information: table: college_2"} -{"question": "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')", "answer": "What is the title of the prerequisite class of International Finance course?\nAdditional table information: table: college_2"} -{"question": "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')", "answer": "Give the title of the prerequisite to the course International Finance.\nAdditional table information: table: college_2"} -{"question": "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')", "answer": "Find the title of course whose prerequisite is course Differential Geometry.\nAdditional table information: table: college_2"} -{"question": "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')", "answer": "What is the title of the course with Differential Geometry as a prerequisite?\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003)", "answer": "Find the names of students who have taken any course in the fall semester of year 2003.\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003)", "answer": "What are the names of students who took a course in the Fall of 2003?\nAdditional table information: table: college_2"} -{"question": "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", "answer": "What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010?\nAdditional table information: table: college_2"} -{"question": "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", "answer": "Give the title of the course offered in Chandler during the Fall of 2010.\nAdditional table information: table: college_2"} -{"question": "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'", "answer": "Find the name of the instructors who taught C Programming course before.\nAdditional table information: table: college_2"} -{"question": "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'", "answer": "What are the names of instructors who have taught C Programming courses?\nAdditional table information: table: college_2"} -{"question": "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'", "answer": "Find the name and salary of instructors who are advisors of the students from the Math department.\nAdditional table information: table: college_2"} -{"question": "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'", "answer": "What are the names and salaries of instructors who advise students in the Math department?\nAdditional table information: table: college_2"} -{"question": "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 NULLS FIRST", "answer": "Find the name of instructors who are advisors of the students from the Math department, and sort the results by students' total credit.\nAdditional table information: table: college_2"} -{"question": "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 NULLS FIRST", "answer": "What are the names of all instructors who advise students in the math depart sorted by total credits of the student.\nAdditional table information: table: college_2"} -{"question": "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')", "answer": "What is the course title of the prerequisite of course Mobile Computing?\nAdditional table information: table: college_2"} -{"question": "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')", "answer": "What is the title of the course that is a prerequisite for Mobile Computing?\nAdditional table information: table: college_2"} -{"question": "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", "answer": "Find the name of instructor who is the advisor of the student who has the highest number of total credits.\nAdditional table information: table: college_2"} -{"question": "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", "answer": "What is the name of the instructor who advises the student with the greatest number of total credits?\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches)", "answer": "Find the name of instructors who didn't teach any courses?\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches)", "answer": "What are the names of instructors who didn't teach?\nAdditional table information: table: college_2"} -{"question": "SELECT id FROM instructor EXCEPT SELECT id FROM teaches", "answer": "Find the id of instructors who didn't teach any courses?\nAdditional table information: table: college_2"} -{"question": "SELECT id FROM instructor EXCEPT SELECT id FROM teaches", "answer": "What are the ids of instructors who didnt' teach?\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches WHERE semester = 'Spring')", "answer": "Find the names of instructors who didn't each any courses in any Spring semester.\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches WHERE semester = 'Spring')", "answer": "What are the names of instructors who didn't teach courses in the Spring?\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY AVG(salary) DESC LIMIT 1", "answer": "Find the name of the department which has the highest average salary of professors.\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY AVG(salary) DESC LIMIT 1", "answer": "Which department has the highest average instructor salary?\nAdditional table information: table: college_2"} -{"question": "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", "answer": "Find the number and averaged salary of all instructors who are in the department with the highest budget.\nAdditional table information: table: college_2"} -{"question": "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", "answer": "How many instructors are in the department with the highest budget, and what is their average salary?\nAdditional table information: table: college_2"} -{"question": "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)", "answer": "What is the title and credits of the course that is taught in the largest classroom (with the highest capacity)?\nAdditional table information: table: college_2"} -{"question": "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)", "answer": "Give the title and credits for the course that is taught in the classroom with the greatest capacity.\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM student WHERE NOT id IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology')", "answer": "Find the name of students who didn't take any course from Biology department.\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM student WHERE NOT id IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology')", "answer": "What are the names of students who haven't taken any Biology courses?\nAdditional table information: table: college_2"} -{"question": "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", "answer": "Find the total number of students and total number of instructors for each department.\nAdditional table information: table: college_2"} -{"question": "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", "answer": "How many students and instructors are in each department?\nAdditional table information: table: college_2"} -{"question": "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')", "answer": "Find the name of students who have taken the prerequisite course of the course with title International Finance.\nAdditional table information: table: college_2"} -{"question": "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')", "answer": "What are the names of students who have taken the prerequisite for the course International Finance?\nAdditional table information: table: college_2"} -{"question": "SELECT name, salary FROM instructor WHERE salary < (SELECT AVG(salary) FROM instructor WHERE dept_name = 'Physics')", "answer": "Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department.\nAdditional table information: table: college_2"} -{"question": "SELECT name, salary FROM instructor WHERE salary < (SELECT AVG(salary) FROM instructor WHERE dept_name = 'Physics')", "answer": "What are the names and salaries for instructors who earn less than the average salary of instructors in the Physics department?\nAdditional table information: table: college_2"} -{"question": "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'", "answer": "Find the name of students who took some course offered by Statistics department.\nAdditional table information: table: college_2"} -{"question": "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'", "answer": "What are the names of students who have taken Statistics courses?\nAdditional table information: table: college_2"} -{"question": "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 NULLS FIRST", "answer": "Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles.\nAdditional table information: table: college_2"} -{"question": "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 NULLS FIRST", "answer": "What are the building, room number, semester and year of courses in the Psychology department, sorted using course title?\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.'", "answer": "Find the names of all instructors in computer science department\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.'", "answer": "What are the names of all instructors in the Comp. Sci. department?\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000", "answer": "Find the names of all instructors in Comp. Sci. department with salary > 80000.\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000", "answer": "What are the names of the instructors in the Comp. Sci. department who earn more than 80000?\nAdditional table information: table: college_2"} -{"question": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID", "answer": "Find the names of all instructors who have taught some course and the course_id.\nAdditional table information: table: college_2"} -{"question": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID", "answer": "What are the names of all instructors who have taught a course, as well as the corresponding course id?\nAdditional table information: table: college_2"} -{"question": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art'", "answer": "Find the names of all instructors in the Art department who have taught some course and the course_id.\nAdditional table information: table: college_2"} -{"question": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art'", "answer": "What are the names of Art instructors who have taught a course, and the corresponding course id?\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE name LIKE '%dar%'", "answer": "Find the names of all instructors whose name includes the substring \u201cdar\u201d.\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE name LIKE '%dar%'", "answer": "What are the names of all instructors with names that include 'dar'?\nAdditional table information: table: college_2"} -{"question": "SELECT DISTINCT name FROM instructor ORDER BY name NULLS FIRST", "answer": "List in alphabetic order the names of all distinct instructors.\nAdditional table information: table: college_2"} -{"question": "SELECT DISTINCT name FROM instructor ORDER BY name NULLS FIRST", "answer": "List the distinct names of the instructors, ordered by name.\nAdditional table information: table: college_2"} -{"question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "answer": "Find courses that ran in Fall 2009 or in Spring 2010.\nAdditional table information: table: college_2"} -{"question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "answer": "What are the ids for courses in the Fall of 2009 or the Spring of 2010?\nAdditional table information: table: college_2"} -{"question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "answer": "Find courses that ran in Fall 2009 and in Spring 2010.\nAdditional table information: table: college_2"} -{"question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "answer": "What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010?\nAdditional table information: table: college_2"} -{"question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "answer": "Find courses that ran in Fall 2009 but not in Spring 2010.\nAdditional table information: table: college_2"} -{"question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "answer": "What are the ids of courses offered in Fall of 2009 but not in Spring of 2010?\nAdditional table information: table: college_2"} -{"question": "SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT MAX(salary) FROM instructor)", "answer": "Find the salaries of all distinct instructors that are less than the largest salary.\nAdditional table information: table: college_2"} -{"question": "SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT MAX(salary) FROM instructor)", "answer": "What are the distinct salaries of all instructors who earned less than the maximum salary?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010", "answer": "Find the total number of instructors who teach a course in the Spring 2010 semester.\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010", "answer": "How many instructors teach a course in the Spring of 2010?\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name HAVING AVG(salary) > 42000", "answer": "Find the names and average salaries of all departments whose average salary is greater than 42000.\nAdditional table information: table: college_2"} -{"question": "SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name HAVING AVG(salary) > 42000", "answer": "What are the names and average salaries for departments with average salary higher than 42000?\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology')", "answer": "Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department.\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology')", "answer": "What are the names of instructors who earn more than at least one instructor from the Biology department?\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE salary > (SELECT MAX(salary) FROM instructor WHERE dept_name = 'Biology')", "answer": "Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department.\nAdditional table information: table: college_2"} -{"question": "SELECT name FROM instructor WHERE salary > (SELECT MAX(salary) FROM instructor WHERE dept_name = 'Biology')", "answer": "What are the names of all instructors with a higher salary than any of the instructors in the Biology department?\nAdditional table information: table: college_2"} -{"question": "SELECT COUNT(*) FROM debate", "answer": "How many debates are there?\nAdditional table information: table: debate"} -{"question": "SELECT Venue FROM debate ORDER BY Num_of_Audience ASC NULLS FIRST", "answer": "List the venues of debates in ascending order of the number of audience.\nAdditional table information: table: debate"} -{"question": "SELECT Date, Venue FROM debate", "answer": "What are the date and venue of each debate?\nAdditional table information: table: debate"} -{"question": "SELECT Date FROM debate WHERE Num_of_Audience > 150", "answer": "List the dates of debates with number of audience bigger than 150\nAdditional table information: table: debate"} -{"question": "SELECT Name FROM people WHERE Age = 35 OR Age = 36", "answer": "Show the names of people aged either 35 or 36.\nAdditional table information: table: debate"} -{"question": "SELECT Party FROM people ORDER BY Age ASC NULLS FIRST LIMIT 1", "answer": "What is the party of the youngest people?\nAdditional table information: table: debate"} -{"question": "SELECT Party, COUNT(*) FROM people GROUP BY Party", "answer": "Show different parties of people along with the number of people in each party.\nAdditional table information: table: debate"} -{"question": "SELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the party that has the most people.\nAdditional table information: table: debate"} -{"question": "SELECT DISTINCT Venue FROM debate", "answer": "Show the distinct venues of debates\nAdditional table information: table: debate"} -{"question": "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", "answer": "Show the names of people, and dates and venues of debates they are on the affirmative side.\nAdditional table information: table: debate"} -{"question": "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 NULLS FIRST", "answer": "Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name.\nAdditional table information: table: debate"} -{"question": "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", "answer": "Show the names of people that are on affirmative side of debates with number of audience bigger than 200.\nAdditional table information: table: debate"} -{"question": "SELECT T2.Name, COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name", "answer": "Show the names of people and the number of times they have been on the affirmative side of debates.\nAdditional table information: table: debate"} -{"question": "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", "answer": "Show the names of people who have been on the negative side of debates at least twice.\nAdditional table information: table: debate"} -{"question": "SELECT Name FROM people WHERE NOT People_id IN (SELECT Affirmative FROM debate_people)", "answer": "List the names of people that have not been on the affirmative side of debates.\nAdditional table information: table: debate"} -{"question": "SELECT customer_details FROM customers ORDER BY customer_details NULLS FIRST", "answer": "List the names of all the customers in alphabetical order.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT customer_details FROM customers ORDER BY customer_details NULLS FIRST", "answer": "Sort the customer names in alphabetical order.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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'", "answer": "Find all the policy type codes associated with the customer 'Dayana Robel'\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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'", "answer": "What are the type codes of the policies used by the customer 'Dayana Robel'?\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which type of policy is most frequently used? Give me the policy type code.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the type code of the most frequently used policy.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING COUNT(*) > 2", "answer": "Find all the policy types that are used by more than 2 customers.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING COUNT(*) > 2", "answer": "Which types of policy are chosen by more than 2 customers? Give me the policy type codes.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT SUM(amount_piad), AVG(amount_piad) FROM claim_headers", "answer": "Find the total and average amount paid in claim headers.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT SUM(amount_piad), AVG(amount_piad) FROM claim_headers", "answer": "What are the total amount and average amount paid in claim headers?\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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 NULLS FIRST LIMIT 1)", "answer": "Find the total amount claimed in the most recently created document.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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 NULLS FIRST LIMIT 1)", "answer": "How much amount in total were claimed in the most recently created document?\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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)", "answer": "What is the name of the customer who has made the largest amount of claim in a single claim?\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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)", "answer": "Which customer made the largest amount of claim in a single claim? Return the customer details.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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)", "answer": "What is the name of the customer who has made the minimum amount of payment in one claim?\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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)", "answer": "Which customer made the smallest amount of claim in one claim? Return the customer details.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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", "answer": "Find the names of customers who have no policies associated.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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", "answer": "What are the names of customers who do not have any policies?\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT COUNT(*) FROM claims_processing_stages", "answer": "How many claim processing stages are there in total?\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT COUNT(*) FROM claims_processing_stages", "answer": "Find the number of distinct stages in claim processing.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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", "answer": "What is the name of the claim processing stage that most of the claims are on?\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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", "answer": "Which claim processing stage has the most claims? Show the claim status name.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT customer_details FROM customers WHERE customer_details LIKE '%Diana%'", "answer": "Find the names of customers whose name contains 'Diana'.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT customer_details FROM customers WHERE customer_details LIKE '%Diana%'", "answer": "Which customers have the substring 'Diana' in their names? Return the customer details.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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'", "answer": "Find the names of the customers who have an deputy policy.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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'", "answer": "Which customers have an insurance policy with the type code 'Deputy'? Give me the customer details.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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'", "answer": "Find the names of customers who either have an deputy policy or uniformed policy.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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'", "answer": "Which customers have an insurance policy with the type code 'Deputy' or 'Uniform'? Return the customer details.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT customer_details FROM customers UNION SELECT staff_details FROM staff", "answer": "Find the names of all the customers and staff members.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT customer_details FROM customers UNION SELECT staff_details FROM staff", "answer": "What are the names of the customers and staff members?\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT policy_type_code, COUNT(*) FROM policies GROUP BY policy_type_code", "answer": "Find the number of records of each policy type and its type code.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT policy_type_code, COUNT(*) FROM policies GROUP BY policy_type_code", "answer": "For each policy type, return its type code and its count in the record.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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", "answer": "Find the name of the customer that has been involved in the most policies.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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", "answer": "Which customer have the most policies? Give me the customer details.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = 'Open'", "answer": "What is the description of the claim status 'Open'?\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = 'Open'", "answer": "Find the description of the claim status 'Open'.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT COUNT(DISTINCT claim_outcome_code) FROM claims_processing", "answer": "How many distinct claim outcome codes are there?\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT COUNT(DISTINCT claim_outcome_code) FROM claims_processing", "answer": "Count the number of distinct claim outcome codes.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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)", "answer": "Which customer is associated with the latest policy?\nAdditional table information: table: insurance_and_eClaims"} -{"question": "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)", "answer": "Find the customer who started a policy most recently.\nAdditional table information: table: insurance_and_eClaims"} -{"question": "SELECT COUNT(*) FROM Accounts", "answer": "Show the number of accounts.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*) FROM Accounts", "answer": "How many accounts are there?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(DISTINCT customer_id) FROM Accounts", "answer": "How many customers have opened an account?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(DISTINCT customer_id) FROM Accounts", "answer": "Count the number of customers who have an account.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT account_id, date_account_opened, account_name, other_account_details FROM Accounts", "answer": "Show the id, the date of account opened, the account name, and other account detail for all accounts.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT account_id, date_account_opened, account_name, other_account_details FROM Accounts", "answer": "What are the ids, date opened, name, and other details for all accounts?\nAdditional table information: table: customers_and_invoices"} -{"question": "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'", "answer": "Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'.\nAdditional table information: table: customers_and_invoices"} -{"question": "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'", "answer": "What are the ids, names, dates of opening, and other details for accounts corresponding to the customer with the first name 'Meaghan'?\nAdditional table information: table: customers_and_invoices"} -{"question": "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'", "answer": "Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling.\nAdditional table information: table: customers_and_invoices"} -{"question": "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'", "answer": "What are the names and other details for accounts corresponding to the customer named Meaghan Keeling?\nAdditional table information: table: customers_and_invoices"} -{"question": "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'", "answer": "Show the first name and last name for the customer with account name 900.\nAdditional table information: table: customers_and_invoices"} -{"question": "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'", "answer": "What are the full names of customers with the account name 900?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts)", "answer": "How many customers don't have an account?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts)", "answer": "Count the number of customers who do not have an account.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "Show the unique first names, last names, and phone numbers for all customers with any account.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "What are the distinct first names, last names, and phone numbers for customers with accounts?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts", "answer": "Show customer ids who don't have an account.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts", "answer": "What are the customer ids for customers who do not have an account?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*), customer_id FROM Accounts GROUP BY customer_id", "answer": "How many accounts does each customer have? List the number and customer id.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*), customer_id FROM Accounts GROUP BY customer_id", "answer": "Count the number of accounts corresponding to each customer id.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "What is the customer id, first and last name with most number of accounts.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "Return the id and full name of the customer with the most accounts.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "Show id, first name and last name for all customers and the number of accounts.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "What are the the full names and ids for all customers, and how many accounts does each have?\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "Show first name and id for all customers with at least 2 accounts.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "What are the first names and ids for customers who have two or more accounts?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*) FROM Customers", "answer": "Show the number of customers.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*) FROM Customers", "answer": "Count the number of customers.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT gender, COUNT(*) FROM Customers GROUP BY gender", "answer": "Show the number of customers for each gender.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT gender, COUNT(*) FROM Customers GROUP BY gender", "answer": "How many customers are there of each gender?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*) FROM Financial_transactions", "answer": "How many transactions do we have?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*) FROM Financial_transactions", "answer": "Count the number of transactions.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*), account_id FROM Financial_transactions", "answer": "How many transaction does each account have? Show the number and account id.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*), account_id FROM Financial_transactions", "answer": "Count the number of financial transactions that correspond to each account id.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = '337'", "answer": "How many transaction does account with name 337 have?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = '337'", "answer": "Count the number of financial transactions that the account with the name 337 has.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT AVG(transaction_amount), MIN(transaction_amount), MAX(transaction_amount), SUM(transaction_amount) FROM Financial_transactions", "answer": "What is the average, minimum, maximum, and total transaction amount?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT AVG(transaction_amount), MIN(transaction_amount), MAX(transaction_amount), SUM(transaction_amount) FROM Financial_transactions", "answer": "Return the average, minimum, maximum, and total transaction amounts.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT AVG(transaction_amount) FROM Financial_transactions)", "answer": "Show ids for all transactions whose amounts are greater than the average.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT AVG(transaction_amount) FROM Financial_transactions)", "answer": "What are the ids for transactions that have an amount greater than the average amount of a transaction?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT transaction_type, SUM(transaction_amount) FROM Financial_transactions GROUP BY transaction_type", "answer": "Show the transaction types and the total amount of transactions.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT transaction_type, SUM(transaction_amount) FROM Financial_transactions GROUP BY transaction_type", "answer": "What are total transaction amounts for each transaction type?\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "Show the account name, id and the number of transactions for each account.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "Return the names and ids of each account, as well as the number of transactions.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the account id with most number of transactions.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id of the account with the most transactions?\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "Show the account id and name with at least 4 transactions.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "What are the ids and names of accounts with 4 or more transactions?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT DISTINCT product_size FROM Products", "answer": "Show all product sizes.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT DISTINCT product_size FROM Products", "answer": "What are the different product sizes?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT DISTINCT product_color FROM Products", "answer": "Show all product colors.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT DISTINCT product_color FROM Products", "answer": "What are the different product colors?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT invoice_number, COUNT(*) FROM Financial_transactions GROUP BY invoice_number", "answer": "Show the invoice number and the number of transactions for each invoice.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT invoice_number, COUNT(*) FROM Financial_transactions GROUP BY invoice_number", "answer": "How many transactions correspond to each invoice number?\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "What is the invoice number and invoice date for the invoice with most number of transactions?\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*) FROM Invoices", "answer": "How many invoices do we have?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*) FROM Invoices", "answer": "Count the number of invoices.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "Show invoice dates and order id and details for all invoices.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "What are the invoice dates, order ids, and order details for all invoices?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT order_id, COUNT(*) FROM Invoices GROUP BY order_id", "answer": "Show the order ids and the number of invoices for each order.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT order_id, COUNT(*) FROM Invoices GROUP BY order_id", "answer": "How many invoices correspond to each order id?\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "What is the order id and order details for the order more than two invoices.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "Return the order ids and details for orderes with two or more invoices.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "What is the customer last name, id and phone number with most number of orders?\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "Return the last name, id and phone number of the customer who has made the greatest number of orders.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "Show all product names without an order.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "What are the names of products that have never been ordered?\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "Show all product names and the total quantity ordered for each product name.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "What are the different product names, and what is the sum of quantity ordered for each product?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT order_id, COUNT(*) FROM Order_items GROUP BY order_id", "answer": "Show the order ids and the number of items in each order.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT order_id, COUNT(*) FROM Order_items GROUP BY order_id", "answer": "How many order items correspond to each order id?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT product_id, COUNT(DISTINCT order_id) FROM Order_items GROUP BY product_id", "answer": "Show the product ids and the number of unique orders containing each product.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT product_id, COUNT(DISTINCT order_id) FROM Order_items GROUP BY product_id", "answer": "How many distinct order ids correspond to each product?\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "Show all product names and the number of customers having an order on each product.\nAdditional table information: table: customers_and_invoices"} -{"question": "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", "answer": "What are teh names of the different products, as well as the number of customers who have ordered each product.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT order_id, COUNT(DISTINCT product_id) FROM Order_items GROUP BY order_id", "answer": "Show order ids and the number of products in each order.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT order_id, COUNT(DISTINCT product_id) FROM Order_items GROUP BY order_id", "answer": "How many different products correspond to each order id?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT order_id, SUM(product_quantity) FROM Order_items GROUP BY order_id", "answer": "Show order ids and the total quantity in each order.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT order_id, SUM(product_quantity) FROM Order_items GROUP BY order_id", "answer": "Give the order ids for all orders, as well as the total product quantity in each.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*) FROM products WHERE NOT product_id IN (SELECT product_id FROM Order_items)", "answer": "How many products were not included in any order?\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*) FROM products WHERE NOT product_id IN (SELECT product_id FROM Order_items)", "answer": "Count the number of products that were never ordered.\nAdditional table information: table: customers_and_invoices"} -{"question": "SELECT COUNT(*) FROM Church WHERE Open_Date < 1850", "answer": "How many churches opened before 1850 are there?\nAdditional table information: table: wedding"} -{"question": "SELECT name, open_date, organized_by FROM Church", "answer": "Show the name, open date, and organizer for all churches.\nAdditional table information: table: wedding"} -{"question": "SELECT name FROM church ORDER BY open_date DESC", "answer": "List all church names in descending order of opening date.\nAdditional table information: table: wedding"} -{"question": "SELECT open_date FROM church GROUP BY open_date HAVING COUNT(*) >= 2", "answer": "Show the opening year in whcih at least two churches opened.\nAdditional table information: table: wedding"} -{"question": "SELECT organized_by, name FROM church WHERE open_date BETWEEN 1830 AND 1840", "answer": "Show the organizer and name for churches that opened between 1830 and 1840.\nAdditional table information: table: wedding"} -{"question": "SELECT open_date, COUNT(*) FROM church GROUP BY open_date", "answer": "Show all opening years and the number of churches that opened in that year.\nAdditional table information: table: wedding"} -{"question": "SELECT name, open_date FROM church ORDER BY open_date DESC LIMIT 3", "answer": "Show the name and opening year for three churches that opened most recently.\nAdditional table information: table: wedding"} -{"question": "SELECT COUNT(*) FROM people WHERE is_male = 'F' AND age > 30", "answer": "How many female people are older than 30 in our record?\nAdditional table information: table: wedding"} -{"question": "SELECT country FROM people WHERE age < 25 INTERSECT SELECT country FROM people WHERE age > 30", "answer": "Show the country where people older than 30 and younger than 25 are from.\nAdditional table information: table: wedding"} -{"question": "SELECT MIN(age), MAX(age), AVG(age) FROM people", "answer": "Show the minimum, maximum, and average age for all people.\nAdditional table information: table: wedding"} -{"question": "SELECT name, country FROM people WHERE age < (SELECT AVG(age) FROM people)", "answer": "Show the name and country for all people whose age is smaller than the average.\nAdditional table information: table: wedding"} -{"question": "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", "answer": "Show the pair of male and female names in all weddings after year 2014\nAdditional table information: table: wedding"} -{"question": "SELECT name, age FROM people WHERE is_male = 'T' AND NOT people_id IN (SELECT male_id FROM wedding)", "answer": "Show the name and age for all male people who don't have a wedding.\nAdditional table information: table: wedding"} -{"question": "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", "answer": "Show all church names except for those that had a wedding in year 2015.\nAdditional table information: table: wedding"} -{"question": "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", "answer": "Show all church names that have hosted least two weddings.\nAdditional table information: table: wedding"} -{"question": "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'", "answer": "Show the names for all females from Canada having a wedding in year 2016.\nAdditional table information: table: wedding"} -{"question": "SELECT COUNT(*) FROM wedding WHERE YEAR = 2016", "answer": "How many weddings are there in year 2016?\nAdditional table information: table: wedding"} -{"question": "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", "answer": "Show the church names for the weddings of all people older than 30.\nAdditional table information: table: wedding"} -{"question": "SELECT country, COUNT(*) FROM people GROUP BY country", "answer": "Show all countries and the number of people from each country.\nAdditional table information: table: wedding"} -{"question": "SELECT COUNT(DISTINCT church_id) FROM wedding WHERE YEAR = 2016", "answer": "How many churches have a wedding in year 2016?\nAdditional table information: table: wedding"} -{"question": "SELECT COUNT(*) FROM artist", "answer": "How many artists do we have?\nAdditional table information: table: theme_gallery"} -{"question": "SELECT COUNT(*) FROM artist", "answer": "Count the number of artists.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT name, age, country FROM artist ORDER BY Year_Join NULLS FIRST", "answer": "Show all artist name, age, and country ordered by the yeared they joined.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT name, age, country FROM artist ORDER BY Year_Join NULLS FIRST", "answer": "What are the names, ages, and countries of artists, sorted by the year they joined?\nAdditional table information: table: theme_gallery"} -{"question": "SELECT DISTINCT country FROM artist", "answer": "What are all distinct country for artists?\nAdditional table information: table: theme_gallery"} -{"question": "SELECT DISTINCT country FROM artist", "answer": "Return the different countries for artists.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT name, year_join FROM artist WHERE country <> 'United States'", "answer": "Show all artist names and the year joined who are not from United States.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT name, year_join FROM artist WHERE country <> 'United States'", "answer": "What are the names and year of joining for artists that do not have the country 'United States'?\nAdditional table information: table: theme_gallery"} -{"question": "SELECT COUNT(*) FROM artist WHERE age > 46 AND year_join > 1990", "answer": "How many artists are above age 46 and joined after 1990?\nAdditional table information: table: theme_gallery"} -{"question": "SELECT COUNT(*) FROM artist WHERE age > 46 AND year_join > 1990", "answer": "Count the number of artists who are older than 46 and joined after 1990.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT AVG(age), MIN(age) FROM artist WHERE country = 'United States'", "answer": "What is the average and minimum age of all artists from United States.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT AVG(age), MIN(age) FROM artist WHERE country = 'United States'", "answer": "Return the average and minimum ages across artists from the United States.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT name FROM artist ORDER BY year_join DESC LIMIT 1", "answer": "What is the name of the artist who joined latest?\nAdditional table information: table: theme_gallery"} -{"question": "SELECT name FROM artist ORDER BY year_join DESC LIMIT 1", "answer": "Return the name of the artist who has the latest join year.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT COUNT(*) FROM exhibition WHERE YEAR >= 2005", "answer": "How many exhibition are there in year 2005 or after?\nAdditional table information: table: theme_gallery"} -{"question": "SELECT COUNT(*) FROM exhibition WHERE YEAR >= 2005", "answer": "Count the number of exhibitions that happened in or after 2005.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT theme, YEAR FROM exhibition WHERE ticket_price < 15", "answer": "Show theme and year for all exhibitions with ticket prices lower than 15.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT theme, YEAR FROM exhibition WHERE ticket_price < 15", "answer": "What are the theme and year for all exhibitions that have a ticket price under 15?\nAdditional table information: table: theme_gallery"} -{"question": "SELECT T2.name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id", "answer": "Show all artist names and the number of exhibitions for each artist.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT T2.name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id", "answer": "How many exhibitions has each artist had?\nAdditional table information: table: theme_gallery"} -{"question": "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", "answer": "What is the name and country for the artist with most number of exhibitions?\nAdditional table information: table: theme_gallery"} -{"question": "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", "answer": "Return the name and country corresponding to the artist who has had the most exhibitions.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT name FROM artist WHERE NOT artist_id IN (SELECT artist_id FROM exhibition)", "answer": "Show names for artists without any exhibition.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT name FROM artist WHERE NOT artist_id IN (SELECT artist_id FROM exhibition)", "answer": "What are the names of artists that have not had any exhibitions?\nAdditional table information: table: theme_gallery"} -{"question": "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)", "answer": "What is the theme and artist name for the exhibition with a ticket price higher than the average?\nAdditional table information: table: theme_gallery"} -{"question": "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)", "answer": "Return the names of artists and the themes of their exhibitions that had a ticket price higher than average.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT AVG(ticket_price), MIN(ticket_price), MAX(ticket_price) FROM exhibition WHERE YEAR < 2009", "answer": "Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT AVG(ticket_price), MIN(ticket_price), MAX(ticket_price) FROM exhibition WHERE YEAR < 2009", "answer": "What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009?\nAdditional table information: table: theme_gallery"} -{"question": "SELECT theme, YEAR FROM exhibition ORDER BY ticket_price DESC", "answer": "Show theme and year for all exhibitions in an descending order of ticket price.\nAdditional table information: table: theme_gallery"} -{"question": "SELECT theme, YEAR FROM exhibition ORDER BY ticket_price DESC", "answer": "What are the themes and years for exhibitions, sorted by ticket price descending?\nAdditional table information: table: theme_gallery"} -{"question": "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", "answer": "What is the theme, date, and attendance for the exhibition in year 2004?\nAdditional table information: table: theme_gallery"} -{"question": "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", "answer": "Return the themes, dates, and attendance for exhibitions that happened in 2004.\nAdditional table information: table: theme_gallery"} -{"question": "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", "answer": "Show all artist names who didn't have an exhibition in 2004.\nAdditional table information: table: theme_gallery"} -{"question": "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", "answer": "What are the names of artists who did not have an exhibition in 2004?\nAdditional table information: table: theme_gallery"} -{"question": "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", "answer": "Show the theme for exhibitions with both records of an attendance below 100 and above 500.\nAdditional table information: table: theme_gallery"} -{"question": "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", "answer": "Which themes have had corresponding exhibitions that have had attendance both below 100 and above 500?\nAdditional table information: table: theme_gallery"} -{"question": "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", "answer": "How many exhibitions have a attendance more than 100 or have a ticket price below 10?\nAdditional table information: table: theme_gallery"} -{"question": "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", "answer": "Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10.\nAdditional table information: table: theme_gallery"} -{"question": "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", "answer": "Show all artist names with an average exhibition attendance over 200.\nAdditional table information: table: theme_gallery"} -{"question": "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", "answer": "What are the names of artist whose exhibitions draw over 200 attendees on average?\nAdditional table information: table: theme_gallery"} -{"question": "SELECT i_id FROM item WHERE title = 'orange'", "answer": "Find the id of the item whose title is 'orange'.\nAdditional table information: table: epinions_1"} -{"question": "SELECT * FROM item", "answer": "List all information in the item table.\nAdditional table information: table: epinions_1"} -{"question": "SELECT COUNT(*) FROM review", "answer": "Find the number of reviews.\nAdditional table information: table: epinions_1"} -{"question": "SELECT COUNT(*) FROM useracct", "answer": "How many users are there?\nAdditional table information: table: epinions_1"} -{"question": "SELECT AVG(rating), MAX(rating) FROM review", "answer": "Find the average and maximum rating of all reviews.\nAdditional table information: table: epinions_1"} -{"question": "SELECT MIN(rank) FROM review", "answer": "Find the highest rank of all reviews.\nAdditional table information: table: epinions_1"} -{"question": "SELECT COUNT(DISTINCT u_id) FROM review", "answer": "How many different users wrote some reviews?\nAdditional table information: table: epinions_1"} -{"question": "SELECT COUNT(DISTINCT i_id) FROM review", "answer": "How many different items were reviewed by some users?\nAdditional table information: table: epinions_1"} -{"question": "SELECT COUNT(*) FROM item WHERE NOT i_id IN (SELECT i_id FROM review)", "answer": "Find the number of items that did not receive any review.\nAdditional table information: table: epinions_1"} -{"question": "SELECT name FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review)", "answer": "Find the names of users who did not leave any review.\nAdditional table information: table: epinions_1"} -{"question": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating = 10", "answer": "Find the names of goods that receive a rating of 10.\nAdditional table information: table: epinions_1"} -{"question": "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)", "answer": "Find the titles of items whose rating is higher than the average review rating of all items.\nAdditional table information: table: epinions_1"} -{"question": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5", "answer": "Find the titles of items that received any rating below 5.\nAdditional table information: table: epinions_1"} -{"question": "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", "answer": "Find the titles of items that received both a rating higher than 8 and a rating below 5.\nAdditional table information: table: epinions_1"} -{"question": "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", "answer": "Find the names of items whose rank is higher than 3 and whose average rating is above 5.\nAdditional table information: table: epinions_1"} -{"question": "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) NULLS FIRST LIMIT 1", "answer": "Find the name of the item with the lowest average rating.\nAdditional table information: table: epinions_1"} -{"question": "SELECT title FROM item ORDER BY title NULLS FIRST", "answer": "List the titles of all items in alphabetic order .\nAdditional table information: table: epinions_1"} -{"question": "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", "answer": "Find the name of the user who gives the most reviews.\nAdditional table information: table: epinions_1"} -{"question": "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", "answer": "Find the name and id of the item with the highest average rating.\nAdditional table information: table: epinions_1"} -{"question": "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", "answer": "Find the name and id of the good with the highest average rank.\nAdditional table information: table: epinions_1"} -{"question": "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", "answer": "For each user, return the name and the average rating of reviews given by them.\nAdditional table information: table: epinions_1"} -{"question": "SELECT T1.name, COUNT(*) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id", "answer": "For each user, find their name and the number of reviews written by them.\nAdditional table information: table: epinions_1"} -{"question": "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", "answer": "Find the name of the user who gave the highest rating.\nAdditional table information: table: epinions_1"} -{"question": "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", "answer": "Find the name of the source user with the highest average trust score.\nAdditional table information: table: epinions_1"} -{"question": "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", "answer": "Find each target user's name and average trust score.\nAdditional table information: table: epinions_1"} -{"question": "SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id ORDER BY trust NULLS FIRST LIMIT 1", "answer": "Find the name of the target user with the lowest trust score.\nAdditional table information: table: epinions_1"} -{"question": "SELECT title FROM item WHERE NOT i_id IN (SELECT i_id FROM review)", "answer": "Find the names of the items that did not receive any review.\nAdditional table information: table: epinions_1"} -{"question": "SELECT name FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review)", "answer": "Find the names of users who did not leave any review.\nAdditional table information: table: epinions_1"} -{"question": "SELECT COUNT(*) FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review)", "answer": "Find the number of users who did not write any review.\nAdditional table information: table: epinions_1"} -{"question": "SELECT COUNT(*) FROM item WHERE NOT i_id IN (SELECT i_id FROM review)", "answer": "Find the number of items without any review.\nAdditional table information: table: epinions_1"} -{"question": "SELECT COUNT(*) FROM player", "answer": "How many players are there?\nAdditional table information: table: riding_club"} -{"question": "SELECT Player_name FROM player ORDER BY Votes ASC NULLS FIRST", "answer": "List the names of players in ascending order of votes.\nAdditional table information: table: riding_club"} -{"question": "SELECT Gender, Occupation FROM player", "answer": "What are the gender and occupation of players?\nAdditional table information: table: riding_club"} -{"question": "SELECT Player_name, residence FROM player WHERE Occupation <> 'Researcher'", "answer": "List the name and residence for players whose occupation is not 'Researcher'.\nAdditional table information: table: riding_club"} -{"question": "SELECT Sponsor_name FROM player WHERE Residence = 'Brandon' OR Residence = 'Birtle'", "answer": "Show the names of sponsors of players whose residence is either 'Brandon' or 'Birtle'.\nAdditional table information: table: riding_club"} -{"question": "SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1", "answer": "What is the name of the player with the largest number of votes?\nAdditional table information: table: riding_club"} -{"question": "SELECT Occupation, COUNT(*) FROM player GROUP BY Occupation", "answer": "Show different occupations along with the number of players in each occupation.\nAdditional table information: table: riding_club"} -{"question": "SELECT Occupation FROM player GROUP BY Occupation ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the most common occupation of players.\nAdditional table information: table: riding_club"} -{"question": "SELECT Residence FROM player GROUP BY Residence HAVING COUNT(*) >= 2", "answer": "Show the residences that have at least two players.\nAdditional table information: table: riding_club"} -{"question": "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", "answer": "Show the names of players and names of their coaches.\nAdditional table information: table: riding_club"} -{"question": "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", "answer": "Show the names of players coached by the rank 1 coach.\nAdditional table information: table: riding_club"} -{"question": "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", "answer": "Show the names and genders of players with a coach starting after 2011.\nAdditional table information: table: riding_club"} -{"question": "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", "answer": "Show the names of players and names of their coaches in descending order of the votes of players.\nAdditional table information: table: riding_club"} -{"question": "SELECT Player_name FROM player WHERE NOT Player_ID IN (SELECT Player_ID FROM player_coach)", "answer": "List the names of players that do not have coaches.\nAdditional table information: table: riding_club"} -{"question": "SELECT Residence FROM player WHERE gender = 'M' INTERSECT SELECT Residence FROM player WHERE gender = 'F'", "answer": "Show the residences that have both a player of gender 'M' and a player of gender 'F'.\nAdditional table information: table: riding_club"} -{"question": "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", "answer": "How many coaches does each club has? List the club id, name and the number of coaches.\nAdditional table information: table: riding_club"} -{"question": "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", "answer": "How many gold medals has the club with the most coaches won?\nAdditional table information: table: riding_club"} -{"question": "SELECT COUNT(*) FROM gymnast", "answer": "How many gymnasts are there?\nAdditional table information: table: gymnast"} -{"question": "SELECT COUNT(*) FROM gymnast", "answer": "Count the number of gymnasts.\nAdditional table information: table: gymnast"} -{"question": "SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC", "answer": "List the total points of gymnasts in descending order.\nAdditional table information: table: gymnast"} -{"question": "SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC", "answer": "What are the total points for all gymnasts, ordered by total points descending?\nAdditional table information: table: gymnast"} -{"question": "SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC", "answer": "List the total points of gymnasts in descending order of floor exercise points.\nAdditional table information: table: gymnast"} -{"question": "SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC", "answer": "What are the total points of gymnasts, ordered by their floor exercise points descending?\nAdditional table information: table: gymnast"} -{"question": "SELECT AVG(Horizontal_Bar_Points) FROM gymnast", "answer": "What is the average horizontal bar points for all gymnasts?\nAdditional table information: table: gymnast"} -{"question": "SELECT AVG(Horizontal_Bar_Points) FROM gymnast", "answer": "Return the average horizontal bar points across all gymnasts.\nAdditional table information: table: gymnast"} -{"question": "SELECT Name FROM People ORDER BY Name ASC NULLS FIRST", "answer": "What are the names of people in ascending alphabetical order?\nAdditional table information: table: gymnast"} -{"question": "SELECT Name FROM People ORDER BY Name ASC NULLS FIRST", "answer": "Return the names of people, ordered alphabetically.\nAdditional table information: table: gymnast"} -{"question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "answer": "What are the names of gymnasts?\nAdditional table information: table: gymnast"} -{"question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "answer": "Return the names of the gymnasts.\nAdditional table information: table: gymnast"} -{"question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown <> 'Santo Domingo'", "answer": "What are the names of gymnasts whose hometown is not 'Santo Domingo'?\nAdditional table information: table: gymnast"} -{"question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown <> 'Santo Domingo'", "answer": "Return the names of gymnasts who did not grow up in Santo Domingo.\nAdditional table information: table: gymnast"} -{"question": "SELECT Age FROM people ORDER BY Height DESC LIMIT 1", "answer": "What is the age of the tallest person?\nAdditional table information: table: gymnast"} -{"question": "SELECT Age FROM people ORDER BY Height DESC LIMIT 1", "answer": "Return the age of the person with the greatest height.\nAdditional table information: table: gymnast"} -{"question": "SELECT Name FROM People ORDER BY Age DESC LIMIT 5", "answer": "List the names of the top 5 oldest people.\nAdditional table information: table: gymnast"} -{"question": "SELECT Name FROM People ORDER BY Age DESC LIMIT 5", "answer": "What are the names of the five oldest people?\nAdditional table information: table: gymnast"} -{"question": "SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC NULLS FIRST LIMIT 1", "answer": "What is the total point count of the youngest gymnast?\nAdditional table information: table: gymnast"} -{"question": "SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC NULLS FIRST LIMIT 1", "answer": "Return the total points of the gymnast with the lowest age.\nAdditional table information: table: gymnast"} -{"question": "SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "answer": "What is the average age of all gymnasts?\nAdditional table information: table: gymnast"} -{"question": "SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "answer": "Return the average age across all gymnasts.\nAdditional table information: table: gymnast"} -{"question": "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", "answer": "What are the distinct hometowns of gymnasts with total points more than 57.5?\nAdditional table information: table: gymnast"} -{"question": "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", "answer": "Give the different hometowns of gymnasts that have a total point score of above 57.5.\nAdditional table information: table: gymnast"} -{"question": "SELECT T2.Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown", "answer": "What are the hometowns of gymnasts and the corresponding number of gymnasts?\nAdditional table information: table: gymnast"} -{"question": "SELECT T2.Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown", "answer": "How many gymnasts are from each hometown?\nAdditional table information: table: gymnast"} -{"question": "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", "answer": "What is the most common hometown of gymnasts?\nAdditional table information: table: gymnast"} -{"question": "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", "answer": "Return the hometown that is most common among gymnasts.\nAdditional table information: table: gymnast"} -{"question": "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", "answer": "What are the hometowns that are shared by at least two gymnasts?\nAdditional table information: table: gymnast"} -{"question": "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", "answer": "Give the hometowns from which two or more gymnasts are from.\nAdditional table information: table: gymnast"} -{"question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC NULLS FIRST", "answer": "List the names of gymnasts in ascending order by their heights.\nAdditional table information: table: gymnast"} -{"question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC NULLS FIRST", "answer": "What are the names of gymnasts, ordered by their heights ascending?\nAdditional table information: table: gymnast"} -{"question": "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", "answer": "List the distinct hometowns that are not associated with any gymnast.\nAdditional table information: table: gymnast"} -{"question": "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", "answer": "From which hometowns did no gymnasts come from?\nAdditional table information: table: gymnast"} -{"question": "SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20", "answer": "Show the hometowns shared by people older than 23 and younger than 20.\nAdditional table information: table: gymnast"} -{"question": "SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20", "answer": "From which hometowns did both people older than 23 and younger than 20 come from?\nAdditional table information: table: gymnast"} -{"question": "SELECT COUNT(DISTINCT Hometown) FROM people", "answer": "How many distinct hometowns did these people have?\nAdditional table information: table: gymnast"} -{"question": "SELECT COUNT(DISTINCT Hometown) FROM people", "answer": "Count the number of different hometowns of these people.\nAdditional table information: table: gymnast"} -{"question": "SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC", "answer": "Show the ages of gymnasts in descending order of total points.\nAdditional table information: table: gymnast"} -{"question": "SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC", "answer": "What are the ages of the gymnasts, ordered descending by their total points?\nAdditional table information: table: gymnast"} -{"question": "SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown'", "answer": "Find the total savings balance of all accounts except the account with name \u2018Brown\u2019.\nAdditional table information: table: small_bank_1"} -{"question": "SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown'", "answer": "What is the total balance of savings accounts not belonging to someone with the name Brown?\nAdditional table information: table: small_bank_1"} -{"question": "SELECT COUNT(*) FROM accounts", "answer": "How many accounts are there in total?\nAdditional table information: table: small_bank_1"} -{"question": "SELECT COUNT(*) FROM accounts", "answer": "Count the number of accounts.\nAdditional table information: table: small_bank_1"} -{"question": "SELECT SUM(balance) FROM checking", "answer": "What is the total checking balance in all accounts?\nAdditional table information: table: small_bank_1"} -{"question": "SELECT SUM(balance) FROM checking", "answer": "Find the total balance across checking accounts.\nAdditional table information: table: small_bank_1"} -{"question": "SELECT AVG(balance) FROM checking", "answer": "Find the average checking balance.\nAdditional table information: table: small_bank_1"} -{"question": "SELECT AVG(balance) FROM checking", "answer": "What is the average balance in checking accounts?\nAdditional table information: table: small_bank_1"} -{"question": "SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings)", "answer": "How many accounts have a savings balance above the average savings balance?\nAdditional table information: table: small_bank_1"} -{"question": "SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings)", "answer": "Find the number of accounts with a savings balance that is higher than the average savings balance.\nAdditional table information: table: small_bank_1"} -{"question": "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)", "answer": "Find the name and id of accounts whose checking balance is below the maximum checking balance.\nAdditional table information: table: small_bank_1"} -{"question": "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)", "answer": "What are the customer id and name corresponding to accounts with a checking balance less than the largest checking balance?\nAdditional table information: table: small_bank_1"} -{"question": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%'", "answer": "What is the checking balance of the account whose owner\u2019s name contains the substring \u2018ee\u2019?\nAdditional table information: table: small_bank_1"} -{"question": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%'", "answer": "Find the balance of the checking account belonging to an owner whose name contains 'ee'.\nAdditional table information: table: small_bank_1"} -{"question": "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'", "answer": "Find the checking balance and saving balance in the Brown\u2019s account.\nAdditional table information: table: small_bank_1"} -{"question": "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'", "answer": "What are the checking and savings balances in accounts belonging to Brown?\nAdditional table information: table: small_bank_1"} -{"question": "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)", "answer": "Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance.\nAdditional table information: table: small_bank_1"} -{"question": "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)", "answer": "What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance?\nAdditional table information: table: small_bank_1"} -{"question": "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))", "answer": "Find the checking balance of the accounts whose savings balance is higher than the average savings balance.\nAdditional table information: table: small_bank_1"} -{"question": "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))", "answer": "What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance?\nAdditional table information: table: small_bank_1"} -{"question": "SELECT name FROM accounts ORDER BY name NULLS FIRST", "answer": "List all customers\u2019 names in the alphabetical order.\nAdditional table information: table: small_bank_1"} -{"question": "SELECT name FROM accounts ORDER BY name NULLS FIRST", "answer": "What are the names of all the customers in alphabetical order?\nAdditional table information: table: small_bank_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Find the name of account that has the lowest total checking and saving balance.\nAdditional table information: table: small_bank_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the name corresponding to the accoung with the lowest sum of checking and savings balances?\nAdditional table information: table: small_bank_1"} -{"question": "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)", "answer": "Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.\nAdditional table information: table: small_bank_1"} -{"question": "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)", "answer": "What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance?\nAdditional table information: table: small_bank_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Find the name and checking balance of the account with the lowest savings balance.\nAdditional table information: table: small_bank_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What are the names and balances of checking accounts belonging to the customer with the lowest savings balance?\nAdditional table information: table: small_bank_1"} -{"question": "SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name", "answer": "Find the number of checking accounts for each account name.\nAdditional table information: table: small_bank_1"} -{"question": "SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name", "answer": "What are the names of customers with accounts, and how many checking accounts do each of them have?\nAdditional table information: table: small_bank_1"} -{"question": "SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name", "answer": "Find the total saving balance for each account name.\nAdditional table information: table: small_bank_1"} -{"question": "SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name", "answer": "What are the names of customers with accounts, and what are the total savings balances for each?\nAdditional table information: table: small_bank_1"} -{"question": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking)", "answer": "Find the name of accounts whose checking balance is below the average checking balance.\nAdditional table information: table: small_bank_1"} -{"question": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking)", "answer": "What are the names of customers with checking balances lower than the average checking balance?\nAdditional table information: table: small_bank_1"} -{"question": "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", "answer": "Find the saving balance of the account with the highest checking balance.\nAdditional table information: table: small_bank_1"} -{"question": "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", "answer": "What is the savings balance of the account belonging to the customer with the highest checking balance?\nAdditional table information: table: small_bank_1"} -{"question": "SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance NULLS FIRST", "answer": "Find the total checking and saving balance of all accounts sorted by the total balance in ascending order.\nAdditional table information: table: small_bank_1"} -{"question": "SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance NULLS FIRST", "answer": "What is the sum of checking and savings balances for all customers, ordered by the total balance?\nAdditional table information: table: small_bank_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Find the name and checking balance of the account with the lowest saving balance.\nAdditional table information: table: small_bank_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the name and checking balance of the account which has the lowest savings balance?\nAdditional table information: table: small_bank_1"} -{"question": "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", "answer": "Find the name, checking balance and saving balance of all accounts in the bank.\nAdditional table information: table: small_bank_1"} -{"question": "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", "answer": "What are the names, checking balances, and savings balances for all customers?\nAdditional table information: table: small_bank_1"} -{"question": "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", "answer": "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.\nAdditional table information: table: small_bank_1"} -{"question": "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", "answer": "What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending?\nAdditional table information: table: small_bank_1"} -{"question": "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", "answer": "Find the name of accounts whose checking balance is higher than corresponding saving balance.\nAdditional table information: table: small_bank_1"} -{"question": "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", "answer": "What are the names of customers with a higher checking balance than savings balance?\nAdditional table information: table: small_bank_1"} -{"question": "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", "answer": "Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.\nAdditional table information: table: small_bank_1"} -{"question": "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", "answer": "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?\nAdditional table information: table: small_bank_1"} -{"question": "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", "answer": "Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.\nAdditional table information: table: small_bank_1"} -{"question": "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", "answer": "What are names and savings balances of the three accounts with the highest savings balances?\nAdditional table information: table: small_bank_1"} -{"question": "SELECT COUNT(*) FROM browser WHERE market_share >= 5", "answer": "How many main stream browsers whose market share is at least 5 exist?\nAdditional table information: table: browser_web"} -{"question": "SELECT name FROM browser ORDER BY market_share DESC", "answer": "List the name of browsers in descending order by market share.\nAdditional table information: table: browser_web"} -{"question": "SELECT id, name, market_share FROM browser", "answer": "List the ids, names and market shares of all browsers.\nAdditional table information: table: browser_web"} -{"question": "SELECT MAX(market_share), MIN(market_share), AVG(market_share) FROM browser", "answer": "What is the maximum, minimum and average market share of the listed browsers?\nAdditional table information: table: browser_web"} -{"question": "SELECT id, market_share FROM browser WHERE name = 'Safari'", "answer": "What is the id and market share of the browser Safari?\nAdditional table information: table: browser_web"} -{"question": "SELECT name, operating_system FROM web_client_accelerator WHERE CONNECTION <> 'Broadband'", "answer": "What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?\nAdditional table information: table: browser_web"} -{"question": "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", "answer": "What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?\nAdditional table information: table: browser_web"} -{"question": "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", "answer": "What are the ids and names of the web accelerators that are compatible with two or more browsers?\nAdditional table information: table: browser_web"} -{"question": "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", "answer": "What is the id and name of the browser that is compatible with the most web accelerators?\nAdditional table information: table: browser_web"} -{"question": "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'", "answer": "When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?\nAdditional table information: table: browser_web"} -{"question": "SELECT COUNT(DISTINCT client) FROM web_client_accelerator", "answer": "How many different kinds of clients are supported by the web clients accelerators?\nAdditional table information: table: browser_web"} -{"question": "SELECT COUNT(*) FROM web_client_accelerator WHERE NOT id IN (SELECT accelerator_id FROM accelerator_compatible_browser)", "answer": "How many accelerators are not compatible with the browsers listed ?\nAdditional table information: table: browser_web"} -{"question": "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", "answer": "What distinct accelerator names are compatible with the browswers that have market share higher than 15?\nAdditional table information: table: browser_web"} -{"question": "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'", "answer": "List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.\nAdditional table information: table: browser_web"} -{"question": "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'", "answer": "Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'.\nAdditional table information: table: browser_web"} -{"question": "SELECT name FROM web_client_accelerator WHERE name LIKE '%Opera%'", "answer": "Which accelerator name contains substring 'Opera'?\nAdditional table information: table: browser_web"} -{"question": "SELECT Operating_system, COUNT(*) FROM web_client_accelerator GROUP BY Operating_system", "answer": "Find the number of web accelerators used for each Operating system.\nAdditional table information: table: browser_web"} -{"question": "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", "answer": "give me names of all compatible browsers and accelerators in the descending order of compatible year\nAdditional table information: table: browser_web"} -{"question": "SELECT COUNT(*) FROM wrestler", "answer": "How many wrestlers are there?\nAdditional table information: table: wrestler"} -{"question": "SELECT COUNT(*) FROM wrestler", "answer": "Count the number of wrestlers.\nAdditional table information: table: wrestler"} -{"question": "SELECT Name FROM wrestler ORDER BY Days_held DESC", "answer": "List the names of wrestlers in descending order of days held.\nAdditional table information: table: wrestler"} -{"question": "SELECT Name FROM wrestler ORDER BY Days_held DESC", "answer": "What are the names of the wrestlers, ordered descending by days held?\nAdditional table information: table: wrestler"} -{"question": "SELECT Name FROM wrestler ORDER BY Days_held ASC NULLS FIRST LIMIT 1", "answer": "What is the name of the wrestler with the fewest days held?\nAdditional table information: table: wrestler"} -{"question": "SELECT Name FROM wrestler ORDER BY Days_held ASC NULLS FIRST LIMIT 1", "answer": "Return the name of the wrestler who had the lowest number of days held.\nAdditional table information: table: wrestler"} -{"question": "SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> 'Tokyo , Japan'", "answer": "What are the distinct reigns of wrestlers whose location is not 'Tokyo,Japan' ?\nAdditional table information: table: wrestler"} -{"question": "SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> 'Tokyo , Japan'", "answer": "Give the different reigns of wrestlers who are not located in Tokyo, Japan.\nAdditional table information: table: wrestler"} -{"question": "SELECT Name, LOCATION FROM wrestler", "answer": "What are the names and location of the wrestlers?\nAdditional table information: table: wrestler"} -{"question": "SELECT Name, LOCATION FROM wrestler", "answer": "Give the names and locations of all wrestlers.\nAdditional table information: table: wrestler"} -{"question": "SELECT Elimination_Move FROM Elimination WHERE Team = 'Team Orton'", "answer": "What are the elimination moves of wrestlers whose team is 'Team Orton'?\nAdditional table information: table: wrestler"} -{"question": "SELECT Elimination_Move FROM Elimination WHERE Team = 'Team Orton'", "answer": "Return the elimination movies of wrestlers on Team Orton.\nAdditional table information: table: wrestler"} -{"question": "SELECT T2.Name, T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID", "answer": "What are the names of wrestlers and the elimination moves?\nAdditional table information: table: wrestler"} -{"question": "SELECT T2.Name, T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID", "answer": "Give the names of wrestlers and their elimination moves.\nAdditional table information: table: wrestler"} -{"question": "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", "answer": "List the names of wrestlers and the teams in elimination in descending order of days held.\nAdditional table information: table: wrestler"} -{"question": "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", "answer": "What are the names of wrestlers and their teams in elimination, ordered descending by days held?\nAdditional table information: table: wrestler"} -{"question": "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", "answer": "List the time of elimination of the wrestlers with largest days held.\nAdditional table information: table: wrestler"} -{"question": "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", "answer": "What is the time of elimination for the wrestler with the most days held?\nAdditional table information: table: wrestler"} -{"question": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50", "answer": "Show times of elimination of wrestlers with days held more than 50.\nAdditional table information: table: wrestler"} -{"question": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50", "answer": "What are the times of elimination for wrestlers with over 50 days held?\nAdditional table information: table: wrestler"} -{"question": "SELECT Team, COUNT(*) FROM elimination GROUP BY Team", "answer": "Show different teams in eliminations and the number of eliminations from each team.\nAdditional table information: table: wrestler"} -{"question": "SELECT Team, COUNT(*) FROM elimination GROUP BY Team", "answer": "How many eliminations did each team have?\nAdditional table information: table: wrestler"} -{"question": "SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3", "answer": "Show teams that have suffered more than three eliminations.\nAdditional table information: table: wrestler"} -{"question": "SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3", "answer": "Which teams had more than 3 eliminations?\nAdditional table information: table: wrestler"} -{"question": "SELECT Reign, Days_held FROM wrestler", "answer": "Show the reign and days held of wrestlers.\nAdditional table information: table: wrestler"} -{"question": "SELECT Reign, Days_held FROM wrestler", "answer": "What are the reigns and days held of all wrestlers?\nAdditional table information: table: wrestler"} -{"question": "SELECT Name FROM wrestler WHERE Days_held < 100", "answer": "What are the names of wrestlers days held less than 100?\nAdditional table information: table: wrestler"} -{"question": "SELECT Name FROM wrestler WHERE Days_held < 100", "answer": "Return the names of wrestlers with fewer than 100 days held.\nAdditional table information: table: wrestler"} -{"question": "SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the most common reigns of wrestlers.\nAdditional table information: table: wrestler"} -{"question": "SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which reign is the most common among wrestlers?\nAdditional table information: table: wrestler"} -{"question": "SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2", "answer": "List the locations that are shared by more than two wrestlers.\nAdditional table information: table: wrestler"} -{"question": "SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2", "answer": "Which locations are shared by more than two wrestlers?\nAdditional table information: table: wrestler"} -{"question": "SELECT Name FROM wrestler WHERE NOT Wrestler_ID IN (SELECT Wrestler_ID FROM elimination)", "answer": "List the names of wrestlers that have not been eliminated.\nAdditional table information: table: wrestler"} -{"question": "SELECT Name FROM wrestler WHERE NOT Wrestler_ID IN (SELECT Wrestler_ID FROM elimination)", "answer": "What are the names of wrestlers who have never been eliminated?\nAdditional table information: table: wrestler"} -{"question": "SELECT Team FROM Elimination WHERE Eliminated_By = 'Orton' INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = 'Benjamin'", "answer": "Show the teams that have both wrestlers eliminated by 'Orton' and wrestlers eliminated by 'Benjamin'.\nAdditional table information: table: wrestler"} -{"question": "SELECT Team FROM Elimination WHERE Eliminated_By = 'Orton' INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = 'Benjamin'", "answer": "What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin?\nAdditional table information: table: wrestler"} -{"question": "SELECT COUNT(DISTINCT team) FROM elimination", "answer": "What is the number of distinct teams that suffer elimination?\nAdditional table information: table: wrestler"} -{"question": "SELECT COUNT(DISTINCT team) FROM elimination", "answer": "How many different teams have had eliminated wrestlers?\nAdditional table information: table: wrestler"} -{"question": "SELECT TIME FROM elimination WHERE Eliminated_By = 'Punk' OR Eliminated_By = 'Orton'", "answer": "Show the times of elimination by 'Punk' or 'Orton'.\nAdditional table information: table: wrestler"} -{"question": "SELECT TIME FROM elimination WHERE Eliminated_By = 'Punk' OR Eliminated_By = 'Orton'", "answer": "What are the times of elimination for any instances in which the elimination was done by Punk or Orton?\nAdditional table information: table: wrestler"} -{"question": "SELECT COUNT(*) FROM school", "answer": "How many schools are there?\nAdditional table information: table: school_finance"} -{"question": "SELECT COUNT(*) FROM school", "answer": "Count the number of schools.\nAdditional table information: table: school_finance"} -{"question": "SELECT school_name FROM school ORDER BY school_name NULLS FIRST", "answer": "Show all school names in alphabetical order.\nAdditional table information: table: school_finance"} -{"question": "SELECT school_name, LOCATION, mascot FROM school", "answer": "List the name, location, mascot for all schools.\nAdditional table information: table: school_finance"} -{"question": "SELECT SUM(enrollment), AVG(enrollment) FROM school", "answer": "What are the total and average enrollment of all schools?\nAdditional table information: table: school_finance"} -{"question": "SELECT mascot FROM school WHERE enrollment > (SELECT AVG(enrollment) FROM school)", "answer": "What are the mascots for schools with enrollments above the average?\nAdditional table information: table: school_finance"} -{"question": "SELECT school_name FROM school ORDER BY enrollment NULLS FIRST LIMIT 1", "answer": "List the name of the school with the smallest enrollment.\nAdditional table information: table: school_finance"} -{"question": "SELECT AVG(enrollment), MAX(enrollment), MIN(enrollment) FROM school", "answer": "Show the average, maximum, minimum enrollment of all schools.\nAdditional table information: table: school_finance"} -{"question": "SELECT county, COUNT(*), SUM(enrollment) FROM school GROUP BY county", "answer": "Show each county along with the number of schools and total enrollment in each county.\nAdditional table information: table: school_finance"} -{"question": "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'", "answer": "How many donors have endowment for school named 'Glenn'?\nAdditional table information: table: school_finance"} -{"question": "SELECT donator_name, SUM(amount) FROM endowment GROUP BY donator_name ORDER BY SUM(amount) DESC", "answer": "List each donator name and the amount of endowment in descending order of the amount of endowment.\nAdditional table information: table: school_finance"} -{"question": "SELECT school_name FROM school WHERE NOT school_id IN (SELECT school_id FROM endowment)", "answer": "List the names of the schools without any endowment.\nAdditional table information: table: school_finance"} -{"question": "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", "answer": "List all the names of schools with an endowment amount smaller than or equal to 10.\nAdditional table information: table: school_finance"} -{"question": "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'", "answer": "Show the names of donors who donated to both school 'Glenn' and 'Triton.'\nAdditional table information: table: school_finance"} -{"question": "SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount < 9", "answer": "Show the names of all the donors except those whose donation amount less than 9.\nAdditional table information: table: school_finance"} -{"question": "SELECT amount, donator_name FROM endowment ORDER BY amount DESC LIMIT 1", "answer": "List the amount and donor name for the largest amount of donation.\nAdditional table information: table: school_finance"} -{"question": "SELECT COUNT(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001", "answer": "How many budgets are above 3000 in year 2001 or before?\nAdditional table information: table: school_finance"} -{"question": "SELECT COUNT(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001", "answer": "Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000\nAdditional table information: table: school_finance"} -{"question": "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", "answer": "Show each school name, its budgeted amount, and invested amount in year 2002 or after.\nAdditional table information: table: school_finance"} -{"question": "SELECT DISTINCT donator_name FROM endowment", "answer": "Show all donor names.\nAdditional table information: table: school_finance"} -{"question": "SELECT COUNT(*) FROM budget WHERE budgeted < invested", "answer": "How many budget record has a budget amount smaller than the invested amount?\nAdditional table information: table: school_finance"} -{"question": "SELECT SUM(T1.budgeted) FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn'", "answer": "What is the total budget amount for school 'Glenn' in all years?\nAdditional table information: table: school_finance"} -{"question": "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", "answer": "Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10.\nAdditional table information: table: school_finance"} -{"question": "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", "answer": "Find the names of schools that have more than one donator with donation amount above 8.5.\nAdditional table information: table: school_finance"} -{"question": "SELECT COUNT(*) FROM (SELECT * FROM endowment WHERE amount > 8.5 GROUP BY school_id HAVING COUNT(*) > 1)", "answer": "Find the number of schools that have more than one donator whose donation amount is less than 8.5.\nAdditional table information: table: school_finance"} -{"question": "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 NULLS FIRST, T2.total_budget_percent_budgeted NULLS FIRST", "answer": "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.\nAdditional table information: table: school_finance"} -{"question": "SELECT COUNT(*) FROM building", "answer": "How many buildings are there?\nAdditional table information: table: protein_institute"} -{"question": "SELECT name, street_address, floors FROM building ORDER BY floors NULLS FIRST", "answer": "Show the name, street address, and number of floors for all buildings ordered by the number of floors.\nAdditional table information: table: protein_institute"} -{"question": "SELECT name FROM building ORDER BY height_feet DESC LIMIT 1", "answer": "What is the name of the tallest building?\nAdditional table information: table: protein_institute"} -{"question": "SELECT AVG(floors), MAX(floors), MIN(floors) FROM building", "answer": "What are the average, maximum, and minimum number of floors for all buildings?\nAdditional table information: table: protein_institute"} -{"question": "SELECT COUNT(*) FROM building WHERE height_feet > (SELECT AVG(height_feet) FROM building) OR floors > (SELECT AVG(floors) FROM building)", "answer": "Show the number of buildings with a height above the average or a number of floors above the average.\nAdditional table information: table: protein_institute"} -{"question": "SELECT name FROM building WHERE height_feet >= 200 AND floors >= 20", "answer": "List the names of buildings with at least 200 feet of height and with at least 20 floors.\nAdditional table information: table: protein_institute"} -{"question": "SELECT institution, LOCATION FROM institution WHERE founded > 1990 AND TYPE = 'Private'", "answer": "Show the names and locations of institutions that are founded after 1990 and have the type 'Private'.\nAdditional table information: table: protein_institute"} -{"question": "SELECT TYPE, COUNT(*), SUM(enrollment) FROM institution GROUP BY TYPE", "answer": "Show institution types, along with the number of institutions and total enrollment for each type.\nAdditional table information: table: protein_institute"} -{"question": "SELECT TYPE FROM institution GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the institution type with the largest number of institutions.\nAdditional table information: table: protein_institute"} -{"question": "SELECT TYPE FROM institution WHERE founded > 1990 AND enrollment >= 1000", "answer": "Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment.\nAdditional table information: table: protein_institute"} -{"question": "SELECT name FROM building WHERE NOT building_id IN (SELECT building_id FROM institution)", "answer": "Show the name of buildings that do not have any institution.\nAdditional table information: table: protein_institute"} -{"question": "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", "answer": "Show the names of buildings except for those having an institution founded in 2003.\nAdditional table information: table: protein_institute"} -{"question": "SELECT T1.name, COUNT(*) FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id GROUP BY T1.building_id", "answer": "For each building, show the name of the building and the number of institutions in it.\nAdditional table information: table: protein_institute"} -{"question": "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", "answer": "Show the names and heights of buildings with at least two institutions founded after 1880.\nAdditional table information: table: protein_institute"} -{"question": "SELECT DISTINCT TYPE FROM institution", "answer": "Show all the distinct institution types.\nAdditional table information: table: protein_institute"} -{"question": "SELECT T1.institution, COUNT(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id GROUP BY T1.institution_id", "answer": "Show institution names along with the number of proteins for each institution.\nAdditional table information: table: protein_institute"} -{"question": "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'", "answer": "How many proteins are associated with an institution founded after 1880 or an institution with type 'Private'?\nAdditional table information: table: protein_institute"} -{"question": "SELECT T2.protein_name, T1.institution FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id", "answer": "Show the protein name and the institution name.\nAdditional table information: table: protein_institute"} -{"question": "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", "answer": "How many proteins are associated with an institution in a building with at least 20 floors?\nAdditional table information: table: protein_institute"} -{"question": "SELECT COUNT(*) FROM institution WHERE NOT institution_id IN (SELECT institution_id FROM protein)", "answer": "How many institutions do not have an associated protein in our record?\nAdditional table information: table: protein_institute"} -{"question": "SELECT LOCATION FROM cinema EXCEPT SELECT LOCATION FROM cinema WHERE capacity > 800", "answer": "Show all the locations where no cinema has capacity over 800.\nAdditional table information: table: cinema"} -{"question": "SELECT LOCATION FROM cinema WHERE openning_year = 2010 INTERSECT SELECT LOCATION FROM cinema WHERE openning_year = 2011", "answer": "Show all the locations where some cinemas were opened in both year 2010 and year 2011.\nAdditional table information: table: cinema"} -{"question": "SELECT COUNT(*) FROM cinema", "answer": "How many cinema do we have?\nAdditional table information: table: cinema"} -{"question": "SELECT COUNT(*) FROM cinema", "answer": "Count the number of cinemas.\nAdditional table information: table: cinema"} -{"question": "SELECT name, openning_year, capacity FROM cinema", "answer": "Show name, opening year, and capacity for each cinema.\nAdditional table information: table: cinema"} -{"question": "SELECT name, LOCATION FROM cinema WHERE capacity > (SELECT AVG(capacity) FROM cinema)", "answer": "Show the cinema name and location for cinemas with capacity above average.\nAdditional table information: table: cinema"} -{"question": "SELECT DISTINCT LOCATION FROM cinema", "answer": "What are all the locations with a cinema?\nAdditional table information: table: cinema"} -{"question": "SELECT DISTINCT LOCATION FROM cinema", "answer": "Find the distinct locations that has a cinema.\nAdditional table information: table: cinema"} -{"question": "SELECT name, openning_year FROM cinema ORDER BY openning_year DESC", "answer": "Show all the cinema names and opening years in descending order of opening year.\nAdditional table information: table: cinema"} -{"question": "SELECT name, LOCATION FROM cinema ORDER BY capacity DESC LIMIT 1", "answer": "What are the name and location of the cinema with the largest capacity?\nAdditional table information: table: cinema"} -{"question": "SELECT AVG(capacity), MIN(capacity), MAX(capacity) FROM cinema WHERE openning_year >= 2011", "answer": "Show the average, minimum, and maximum capacity for all the cinemas opened in year 2011 or later.\nAdditional table information: table: cinema"} -{"question": "SELECT LOCATION, COUNT(*) FROM cinema GROUP BY LOCATION", "answer": "Show each location and the number of cinemas there.\nAdditional table information: table: cinema"} -{"question": "SELECT LOCATION FROM cinema WHERE openning_year >= 2010 GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the location with the most cinemas opened in year 2010 or later?\nAdditional table information: table: cinema"} -{"question": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) >= 2", "answer": "Show all the locations with at least two cinemas with capacity above 300.\nAdditional table information: table: cinema"} -{"question": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) >= 2", "answer": "Which locations have 2 or more cinemas with capacity over 300?\nAdditional table information: table: cinema"} -{"question": "SELECT title, directed_by FROM film", "answer": "Show the title and director for all films.\nAdditional table information: table: cinema"} -{"question": "SELECT title, directed_by FROM film", "answer": "What are the title and director of each film?\nAdditional table information: table: cinema"} -{"question": "SELECT DISTINCT directed_by FROM film", "answer": "Show all directors.\nAdditional table information: table: cinema"} -{"question": "SELECT DISTINCT directed_by FROM film", "answer": "Who are all the directors?\nAdditional table information: table: cinema"} -{"question": "SELECT directed_by, COUNT(*) FROM film GROUP BY directed_by", "answer": "List all directors along with the number of films directed by each director.\nAdditional table information: table: cinema"} -{"question": "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", "answer": "What is total number of show times per dat for each cinema?\nAdditional table information: table: cinema"} -{"question": "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", "answer": "What are the title and maximum price of each film?\nAdditional table information: table: cinema"} -{"question": "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", "answer": "Give me the title and highest price for each film.\nAdditional table information: table: cinema"} -{"question": "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", "answer": "Show cinema name, film title, date, and price for each record in schedule.\nAdditional table information: table: cinema"} -{"question": "SELECT title, directed_by FROM film WHERE NOT film_id IN (SELECT film_id FROM schedule)", "answer": "What are the title and director of the films without any schedule?\nAdditional table information: table: cinema"} -{"question": "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", "answer": "Show director with the largest number of show times in total.\nAdditional table information: table: cinema"} -{"question": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) > 1", "answer": "Find the locations that have more than one movie theater with capacity above 300.\nAdditional table information: table: cinema"} -{"question": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) > 1", "answer": "In which locations are there more than one movie theater with capacity above 300?\nAdditional table information: table: cinema"} -{"question": "SELECT COUNT(*) FROM film WHERE title LIKE '%Dummy%'", "answer": "How many films have the word 'Dummy' in their titles?\nAdditional table information: table: cinema"} -{"question": "SELECT COUNT(*) FROM film WHERE title LIKE '%Dummy%'", "answer": "Count the number of films whose title contains the word 'Dummy'.\nAdditional table information: table: cinema"} -{"question": "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", "answer": "Are the customers holding coupons with amount 500 bad or good?\nAdditional table information: table: products_for_hire"} -{"question": "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", "answer": "How many bookings did each customer make? List the customer id, first name, and the count.\nAdditional table information: table: products_for_hire"} -{"question": "SELECT customer_id, SUM(amount_paid) FROM Payments GROUP BY customer_id ORDER BY SUM(amount_paid) DESC LIMIT 1", "answer": "What is the maximum total amount paid by a customer? List the customer id and amount.\nAdditional table information: table: products_for_hire"} -{"question": "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", "answer": "What are the id and the amount of refund of the booking that incurred the most times of payments?\nAdditional table information: table: products_for_hire"} -{"question": "SELECT product_id FROM products_booked GROUP BY product_id HAVING COUNT(*) = 3", "answer": "What is the id of the product that is booked for 3 times?\nAdditional table information: table: products_for_hire"} -{"question": "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", "answer": "What is the product description of the product booked with an amount of 102.76?\nAdditional table information: table: products_for_hire"} -{"question": "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'", "answer": "What are the start date and end date of the booking that has booked the product named 'Book collection A'?\nAdditional table information: table: products_for_hire"} -{"question": "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", "answer": "What are the names of products whose availability equals to 1?\nAdditional table information: table: products_for_hire"} -{"question": "SELECT COUNT(DISTINCT product_type_code) FROM products_for_hire", "answer": "How many different product types are there?\nAdditional table information: table: products_for_hire"} -{"question": "SELECT first_name, last_name, gender_mf FROM customers WHERE good_or_bad_customer = 'good' ORDER BY last_name NULLS FIRST", "answer": "What are the first name, last name, and gender of all the good customers? Order by their last name.\nAdditional table information: table: products_for_hire"} -{"question": "SELECT AVG(amount_due) FROM payments", "answer": "What is the average amount due for all the payments?\nAdditional table information: table: products_for_hire"} -{"question": "SELECT MAX(booked_count), MIN(booked_count), AVG(booked_count) FROM products_booked", "answer": "What are the maximum, minimum, and average booked count for the products booked?\nAdditional table information: table: products_for_hire"} -{"question": "SELECT DISTINCT payment_type_code FROM payments", "answer": "What are all the distinct payment types?\nAdditional table information: table: products_for_hire"} -{"question": "SELECT daily_hire_cost FROM Products_for_hire WHERE product_name LIKE '%Book%'", "answer": "What are the daily hire costs for the products with substring 'Book' in its name?\nAdditional table information: table: products_for_hire"} -{"question": "SELECT COUNT(*) FROM Products_for_hire WHERE NOT product_id IN (SELECT product_id FROM products_booked WHERE booked_amount > 200)", "answer": "How many products are never booked with amount higher than 200?\nAdditional table information: table: products_for_hire"} -{"question": "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'", "answer": "What are the coupon amount of the coupons owned by both good and bad customers?\nAdditional table information: table: products_for_hire"} -{"question": "SELECT payment_date FROM payments WHERE amount_paid > 300 OR payment_type_code = 'Check'", "answer": "What are the payment date of the payment with amount paid higher than 300 or with payment type is 'Check'\nAdditional table information: table: products_for_hire"} -{"question": "SELECT product_name, product_description FROM products_for_hire WHERE product_type_code = 'Cutlery' AND daily_hire_cost < 20", "answer": "What are the names and descriptions of the products that are of 'Cutlery' type and have daily hire cost lower than 20?\nAdditional table information: table: products_for_hire"} -{"question": "SELECT COUNT(*) FROM phone", "answer": "How many phones are there?\nAdditional table information: table: phone_market"} -{"question": "SELECT Name FROM phone ORDER BY Price ASC NULLS FIRST", "answer": "List the names of phones in ascending order of price.\nAdditional table information: table: phone_market"} -{"question": "SELECT Memory_in_G, Carrier FROM phone", "answer": "What are the memories and carriers of phones?\nAdditional table information: table: phone_market"} -{"question": "SELECT DISTINCT Carrier FROM phone WHERE Memory_in_G > 32", "answer": "List the distinct carriers of phones with memories bigger than 32.\nAdditional table information: table: phone_market"} -{"question": "SELECT Name FROM phone WHERE Carrier = 'Sprint' OR Carrier = 'TMobile'", "answer": "Show the names of phones with carrier either 'Sprint' or 'TMobile'.\nAdditional table information: table: phone_market"} -{"question": "SELECT Carrier FROM phone ORDER BY Price DESC LIMIT 1", "answer": "What is the carrier of the most expensive phone?\nAdditional table information: table: phone_market"} -{"question": "SELECT Carrier, COUNT(*) FROM phone GROUP BY Carrier", "answer": "Show different carriers of phones together with the number of phones with each carrier.\nAdditional table information: table: phone_market"} -{"question": "SELECT Carrier FROM phone GROUP BY Carrier ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most frequently used carrier of the phones.\nAdditional table information: table: phone_market"} -{"question": "SELECT Carrier FROM phone WHERE Memory_in_G < 32 INTERSECT SELECT Carrier FROM phone WHERE Memory_in_G > 64", "answer": "Show the carriers that have both phones with memory smaller than 32 and phones with memory bigger than 64.\nAdditional table information: table: phone_market"} -{"question": "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", "answer": "Show the names of phones and the districts of markets they are on.\nAdditional table information: table: phone_market"} -{"question": "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 NULLS FIRST", "answer": "Show the names of phones and the districts of markets they are on, in ascending order of the ranking of the market.\nAdditional table information: table: phone_market"} -{"question": "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", "answer": "Show the names of phones that are on market with number of shops greater than 50.\nAdditional table information: table: phone_market"} -{"question": "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", "answer": "For each phone, show its names and total number of stocks.\nAdditional table information: table: phone_market"} -{"question": "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", "answer": "Show the names of phones that have total number of stocks bigger than 2000, in descending order of the total number of stocks.\nAdditional table information: table: phone_market"} -{"question": "SELECT Name FROM phone WHERE NOT Phone_id IN (SELECT Phone_ID FROM phone_market)", "answer": "List the names of phones that are not on any market.\nAdditional table information: table: phone_market"} -{"question": "SELECT COUNT(*) FROM company", "answer": "How many gas companies are there?\nAdditional table information: table: gas_company"} -{"question": "SELECT COUNT(*) FROM company", "answer": "What is the total number of companies?\nAdditional table information: table: gas_company"} -{"question": "SELECT company, rank FROM company ORDER BY Sales_billion DESC", "answer": "List the company name and rank for all companies in the decreasing order of their sales.\nAdditional table information: table: gas_company"} -{"question": "SELECT company, rank FROM company ORDER BY Sales_billion DESC", "answer": "What is the name and rank of every company ordered by descending number of sales?\nAdditional table information: table: gas_company"} -{"question": "SELECT company, main_industry FROM company WHERE headquarters <> 'USA'", "answer": "Show the company name and the main industry for all companies whose headquarters are not from USA.\nAdditional table information: table: gas_company"} -{"question": "SELECT company, main_industry FROM company WHERE headquarters <> 'USA'", "answer": "What are the companies and main industries of all companies that are not headquartered in the United States?\nAdditional table information: table: gas_company"} -{"question": "SELECT company, headquarters FROM company ORDER BY market_value DESC", "answer": "Show all company names and headquarters in the descending order of market value.\nAdditional table information: table: gas_company"} -{"question": "SELECT company, headquarters FROM company ORDER BY market_value DESC", "answer": "What are the names and headquarters of all companies ordered by descending market value?\nAdditional table information: table: gas_company"} -{"question": "SELECT MIN(market_value), MAX(market_value), AVG(market_value) FROM company", "answer": "Show minimum, maximum, and average market value for all companies.\nAdditional table information: table: gas_company"} -{"question": "SELECT MIN(market_value), MAX(market_value), AVG(market_value) FROM company", "answer": "What is the minimum, maximum, and average market value for every company?\nAdditional table information: table: gas_company"} -{"question": "SELECT DISTINCT main_industry FROM company", "answer": "Show all main industry for all companies.\nAdditional table information: table: gas_company"} -{"question": "SELECT DISTINCT main_industry FROM company", "answer": "What are the different main industries for all companies?\nAdditional table information: table: gas_company"} -{"question": "SELECT headquarters, COUNT(*) FROM company GROUP BY headquarters", "answer": "List all headquarters and the number of companies in each headquarter.\nAdditional table information: table: gas_company"} -{"question": "SELECT headquarters, COUNT(*) FROM company GROUP BY headquarters", "answer": "For each headquarter, what are the headquarter and how many companies are centered there?\nAdditional table information: table: gas_company"} -{"question": "SELECT main_industry, SUM(market_value) FROM company GROUP BY main_industry", "answer": "Show all main industry and total market value in each industry.\nAdditional table information: table: gas_company"} -{"question": "SELECT main_industry, SUM(market_value) FROM company GROUP BY main_industry", "answer": "What are the main indstries and total market value for each industry?\nAdditional table information: table: gas_company"} -{"question": "SELECT main_industry, COUNT(*) FROM company GROUP BY main_industry ORDER BY SUM(market_value) DESC LIMIT 1", "answer": "List the main industry with highest total market value and its number of companies.\nAdditional table information: table: gas_company"} -{"question": "SELECT main_industry, COUNT(*) FROM company GROUP BY main_industry ORDER BY SUM(market_value) DESC LIMIT 1", "answer": "For each main industry, what is the total number of companies for the industry with the highest total market value?\nAdditional table information: table: gas_company"} -{"question": "SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING COUNT(*) >= 2", "answer": "Show headquarters with at least two companies in the banking industry.\nAdditional table information: table: gas_company"} -{"question": "SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING COUNT(*) >= 2", "answer": "What are the headquarters with at least two companies in the banking industry?\nAdditional table information: table: gas_company"} -{"question": "SELECT station_id, LOCATION, manager_name FROM gas_station ORDER BY open_year NULLS FIRST", "answer": "Show gas station id, location, and manager_name for all gas stations ordered by open year.\nAdditional table information: table: gas_company"} -{"question": "SELECT station_id, LOCATION, manager_name FROM gas_station ORDER BY open_year NULLS FIRST", "answer": "What are the gas station ids, locations, and manager names for the gas stations ordered by opening year?\nAdditional table information: table: gas_company"} -{"question": "SELECT COUNT(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005", "answer": "How many gas station are opened between 2000 and 2005?\nAdditional table information: table: gas_company"} -{"question": "SELECT COUNT(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005", "answer": "What is the total number of gas stations that opened between 2000 and 2005?\nAdditional table information: table: gas_company"} -{"question": "SELECT LOCATION, COUNT(*) FROM gas_station GROUP BY LOCATION ORDER BY COUNT(*) NULLS FIRST", "answer": "Show all locations and the number of gas stations in each location ordered by the count.\nAdditional table information: table: gas_company"} -{"question": "SELECT LOCATION, COUNT(*) FROM gas_station GROUP BY LOCATION ORDER BY COUNT(*) NULLS FIRST", "answer": "For each location, how many gas stations are there in order?\nAdditional table information: table: gas_company"} -{"question": "SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'", "answer": "Show all headquarters with both a company in banking industry and a company in Oil and gas.\nAdditional table information: table: gas_company"} -{"question": "SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'", "answer": "What are the headquarters that have both a company in the banking and 'oil and gas' industries?\nAdditional table information: table: gas_company"} -{"question": "SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'", "answer": "Show all headquarters without a company in banking industry.\nAdditional table information: table: gas_company"} -{"question": "SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'", "answer": "What are the headquarters without companies that are in the banking industry?\nAdditional table information: table: gas_company"} -{"question": "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", "answer": "Show the company name with the number of gas station.\nAdditional table information: table: gas_company"} -{"question": "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", "answer": "For each company id, what are the companies and how many gas stations does each one operate?\nAdditional table information: table: gas_company"} -{"question": "SELECT company, main_industry FROM company WHERE NOT company_id IN (SELECT company_id FROM station_company)", "answer": "Show company name and main industry without a gas station.\nAdditional table information: table: gas_company"} -{"question": "SELECT company, main_industry FROM company WHERE NOT company_id IN (SELECT company_id FROM station_company)", "answer": "What are the main industries of the companies without gas stations and what are the companies?\nAdditional table information: table: gas_company"} -{"question": "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'", "answer": "Show the manager name for gas stations belonging to the ExxonMobil company.\nAdditional table information: table: gas_company"} -{"question": "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'", "answer": "What are the names of the managers for gas stations that are operated by the ExxonMobil company?\nAdditional table information: table: gas_company"} -{"question": "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", "answer": "Show all locations where a gas station for company with market value greater than 100 is located.\nAdditional table information: table: gas_company"} -{"question": "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", "answer": "What are the locations that have gas stations owned by a company with a market value greater than 100?\nAdditional table information: table: gas_company"} -{"question": "SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the manager name with most number of gas stations opened after 2000.\nAdditional table information: table: gas_company"} -{"question": "SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the manager with the most gas stations that opened after 2000?\nAdditional table information: table: gas_company"} -{"question": "SELECT LOCATION FROM gas_station ORDER BY open_year NULLS FIRST", "answer": "order all gas station locations by the opening year.\nAdditional table information: table: gas_company"} -{"question": "SELECT LOCATION FROM gas_station ORDER BY open_year NULLS FIRST", "answer": "What are the locations of all the gas stations ordered by opening year?\nAdditional table information: table: gas_company"} -{"question": "SELECT rank, company, market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion NULLS FIRST, profits_billion NULLS FIRST", "answer": "find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion.\nAdditional table information: table: gas_company"} -{"question": "SELECT rank, company, market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion NULLS FIRST, profits_billion NULLS FIRST", "answer": "What is the rank, company, and market value of every comapny in the banking industry ordered by sales and profits?\nAdditional table information: table: gas_company"} -{"question": "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", "answer": "find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts.\nAdditional table information: table: gas_company"} -{"question": "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", "answer": "What are the locations and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets?\nAdditional table information: table: gas_company"} -{"question": "SELECT COUNT(*) FROM region", "answer": "How many regions do we have?\nAdditional table information: table: party_people"} -{"question": "SELECT COUNT(*) FROM region", "answer": "Count the number of regions.\nAdditional table information: table: party_people"} -{"question": "SELECT DISTINCT region_name FROM region ORDER BY Label NULLS FIRST", "answer": "Show all distinct region names ordered by their labels.\nAdditional table information: table: party_people"} -{"question": "SELECT DISTINCT region_name FROM region ORDER BY Label NULLS FIRST", "answer": "What are the different region names, ordered by labels?\nAdditional table information: table: party_people"} -{"question": "SELECT COUNT(DISTINCT party_name) FROM party", "answer": "How many parties do we have?\nAdditional table information: table: party_people"} -{"question": "SELECT COUNT(DISTINCT party_name) FROM party", "answer": "Count the number of different parties.\nAdditional table information: table: party_people"} -{"question": "SELECT minister, took_office, left_office FROM party ORDER BY left_office NULLS FIRST", "answer": "Show the ministers and the time they took and left office, listed by the time they left office.\nAdditional table information: table: party_people"} -{"question": "SELECT minister, took_office, left_office FROM party ORDER BY left_office NULLS FIRST", "answer": "Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office?\nAdditional table information: table: party_people"} -{"question": "SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959", "answer": "Show the minister who took office after 1961 or before 1959.\nAdditional table information: table: party_people"} -{"question": "SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959", "answer": "Who are the ministers who took office after 1961 or before 1959?\nAdditional table information: table: party_people"} -{"question": "SELECT minister FROM party WHERE party_name <> 'Progress Party'", "answer": "Show all ministers who do not belong to Progress Party.\nAdditional table information: table: party_people"} -{"question": "SELECT minister FROM party WHERE party_name <> 'Progress Party'", "answer": "Which ministers are not a part of the Progress Party?\nAdditional table information: table: party_people"} -{"question": "SELECT minister, party_name FROM party ORDER BY took_office DESC", "answer": "Show all ministers and parties they belong to in descending order of the time they took office.\nAdditional table information: table: party_people"} -{"question": "SELECT minister, party_name FROM party ORDER BY took_office DESC", "answer": "Who are the ministers and what parties do they belong to, listed descending by the times they took office?\nAdditional table information: table: party_people"} -{"question": "SELECT minister FROM party ORDER BY left_office DESC LIMIT 1", "answer": "Return the minister who left office at the latest time.\nAdditional table information: table: party_people"} -{"question": "SELECT minister FROM party ORDER BY left_office DESC LIMIT 1", "answer": "Which minister left office the latest?\nAdditional table information: table: party_people"} -{"question": "SELECT T1.member_name, T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id", "answer": "List member names and their party names.\nAdditional table information: table: party_people"} -{"question": "SELECT T1.member_name, T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id", "answer": "What are the names of members and their corresponding parties?\nAdditional table information: table: party_people"} -{"question": "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", "answer": "Show all party names and the number of members in each party.\nAdditional table information: table: party_people"} -{"question": "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", "answer": "How many members are in each party?\nAdditional table information: table: party_people"} -{"question": "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", "answer": "What is the name of party with most number of members?\nAdditional table information: table: party_people"} -{"question": "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", "answer": "Return the name of the party with the most members.\nAdditional table information: table: party_people"} -{"question": "SELECT T1.party_name, T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id", "answer": "Show all party names and their region names.\nAdditional table information: table: party_people"} -{"question": "SELECT T1.party_name, T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id", "answer": "What are the names of parties and their respective regions?\nAdditional table information: table: party_people"} -{"question": "SELECT party_name FROM party WHERE NOT party_id IN (SELECT party_id FROM Member)", "answer": "Show names of parties that does not have any members.\nAdditional table information: table: party_people"} -{"question": "SELECT party_name FROM party WHERE NOT party_id IN (SELECT party_id FROM Member)", "answer": "What are the names of parties that have no members?\nAdditional table information: table: party_people"} -{"question": "SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1", "answer": "Show the member names which are in both the party with id 3 and the party with id 1.\nAdditional table information: table: party_people"} -{"question": "SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1", "answer": "Which member names are shared among members in the party with the id 3 and the party with the id 1?\nAdditional table information: table: party_people"} -{"question": "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'", "answer": "Show member names that are not in the Progress Party.\nAdditional table information: table: party_people"} -{"question": "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'", "answer": "Which member names corresponding to members who are not in the Progress Party?\nAdditional table information: table: party_people"} -{"question": "SELECT COUNT(*) FROM party_events", "answer": "How many party events do we have?\nAdditional table information: table: party_people"} -{"question": "SELECT COUNT(*) FROM party_events", "answer": "Count the number of party events.\nAdditional table information: table: party_people"} -{"question": "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", "answer": "Show party names and the number of events for each party.\nAdditional table information: table: party_people"} -{"question": "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", "answer": "How many events are there for each party?\nAdditional table information: table: party_people"} -{"question": "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", "answer": "Show all member names who are not in charge of any event.\nAdditional table information: table: party_people"} -{"question": "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", "answer": "What are the names of members who are not in charge of any events?\nAdditional table information: table: party_people"} -{"question": "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", "answer": "What are the names of parties with at least 2 events?\nAdditional table information: table: party_people"} -{"question": "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", "answer": "Return the names of parties that have two or more events.\nAdditional table information: table: party_people"} -{"question": "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", "answer": "What is the name of member in charge of greatest number of events?\nAdditional table information: table: party_people"} -{"question": "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", "answer": "Return the name of the member who is in charge of the most events.\nAdditional table information: table: party_people"} -{"question": "SELECT event_name FROM party_events GROUP BY event_name HAVING COUNT(*) > 2", "answer": "find the event names that have more than 2 records.\nAdditional table information: table: party_people"} -{"question": "SELECT event_name FROM party_events GROUP BY event_name HAVING COUNT(*) > 2", "answer": "Which event names were used more than twice for party events?\nAdditional table information: table: party_people"} -{"question": "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'", "answer": "How many Annual Meeting events happened in the United Kingdom region?\nAdditional table information: table: party_people"} -{"question": "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'", "answer": "Count the number of Annual Meeting events that took place in the region of the United Kingdom.\nAdditional table information: table: party_people"} -{"question": "SELECT COUNT(*) FROM pilot", "answer": "How many pilots are there?\nAdditional table information: table: pilot_record"} -{"question": "SELECT Pilot_name FROM pilot ORDER BY Rank ASC NULLS FIRST", "answer": "List the names of pilots in ascending order of rank.\nAdditional table information: table: pilot_record"} -{"question": "SELECT POSITION, Team FROM pilot", "answer": "What are the positions and teams of pilots?\nAdditional table information: table: pilot_record"} -{"question": "SELECT DISTINCT POSITION FROM pilot WHERE Age > 30", "answer": "List the distinct positions of pilots older than 30.\nAdditional table information: table: pilot_record"} -{"question": "SELECT Pilot_name FROM pilot WHERE Team = 'Bradley' OR Team = 'Fordham'", "answer": "Show the names of pilots from team 'Bradley' or 'Fordham'.\nAdditional table information: table: pilot_record"} -{"question": "SELECT Join_Year FROM pilot ORDER BY Rank ASC NULLS FIRST LIMIT 1", "answer": "What is the joined year of the pilot of the highest rank?\nAdditional table information: table: pilot_record"} -{"question": "SELECT Nationality, COUNT(*) FROM pilot GROUP BY Nationality", "answer": "What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality.\nAdditional table information: table: pilot_record"} -{"question": "SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common nationality of pilots.\nAdditional table information: table: pilot_record"} -{"question": "SELECT POSITION FROM pilot WHERE Join_Year < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year > 2005", "answer": "Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000.\nAdditional table information: table: pilot_record"} -{"question": "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", "answer": "Show the names of pilots and models of aircrafts they have flied with.\nAdditional table information: table: pilot_record"} -{"question": "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 NULLS FIRST", "answer": "Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot.\nAdditional table information: table: pilot_record"} -{"question": "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", "answer": "Show the fleet series of the aircrafts flied by pilots younger than 34\nAdditional table information: table: pilot_record"} -{"question": "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", "answer": "Show the names of pilots and the number of records they have.\nAdditional table information: table: pilot_record"} -{"question": "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", "answer": "Show names of pilots that have more than one record.\nAdditional table information: table: pilot_record"} -{"question": "SELECT Pilot_name FROM pilot WHERE NOT Pilot_ID IN (SELECT Pilot_ID FROM pilot_record)", "answer": "List the names of pilots that do not have any record.\nAdditional table information: table: pilot_record"} -{"question": "SELECT document_status_code FROM Ref_Document_Status", "answer": "What document status codes do we have?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT document_status_description FROM Ref_Document_Status WHERE document_status_code = 'working'", "answer": "What is the description of document status code 'working'?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT document_type_code FROM Ref_Document_Types", "answer": "What document type codes do we have?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = 'Paper'", "answer": "What is the description of document type 'Paper'?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT shipping_agent_name FROM Ref_Shipping_Agents", "answer": "What are the shipping agent names?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = 'UPS'", "answer": "What is the shipping agent code of shipping agent UPS?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT role_code FROM ROLES", "answer": "What are all role codes?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT role_description FROM ROLES WHERE role_code = 'ED'", "answer": "What is the description of role code ED?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT COUNT(*) FROM Employees", "answer": "How many employees do we have?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = 'Koby'", "answer": "What is the role of the employee named Koby?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT document_id, receipt_date FROM Documents", "answer": "List all document ids and receipt dates of documents.\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "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", "answer": "How many employees does each role have? List role description, id and number of employees.\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT Roles.role_description, COUNT(Employees.employee_id) FROM ROLES JOIN Employees ON Employees.role_code = Roles.role_code GROUP BY Employees.role_code HAVING COUNT(Employees.employee_id) > 1", "answer": "List roles that have more than one employee. List the role description and number of employees.\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "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", "answer": "What is the document status description of the document with id 1?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT COUNT(*) FROM Documents WHERE document_status_code = 'done'", "answer": "How many documents have the status code done?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT document_type_code FROM Documents WHERE document_id = 2", "answer": "List the document type code for the document with the id 2.\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT document_id FROM Documents WHERE document_status_code = 'done' AND document_type_code = 'Paper'", "answer": "List the document ids for any documents with the status code done and the type code paper.\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "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", "answer": "What is the name of the shipping agent of the document with id 2?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "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'", "answer": "How many documents were shipped by USPS?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT Ref_Shipping_Agents.shipping_agent_name, COUNT(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(Documents.document_id) DESC LIMIT 1", "answer": "Which shipping agent shipped the most documents? List the shipping agent name and the number of documents.\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT receipt_date FROM Documents WHERE document_id = 3", "answer": "What is the receipt date of the document with id 3?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT Addresses.address_details FROM Addresses JOIN Documents_Mailed ON Documents_Mailed.mailed_to_address_id = Addresses.address_id WHERE document_id = 4", "answer": "What address was the document with id 4 mailed to?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7", "answer": "What is the mail date of the document with id 7?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "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'", "answer": "List the document ids of documents with the status done and type Paper, which not shipped by the shipping agent named USPS.\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "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'", "answer": "List document id of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS.\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT draft_details FROM Document_Drafts WHERE document_id = 7", "answer": "What is draft detail of the document with id 7?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT COUNT(*) FROM Draft_Copies WHERE document_id = 2", "answer": "How many draft copies does the document with id 2 have?\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT document_id, COUNT(copy_number) FROM Draft_Copies GROUP BY document_id ORDER BY COUNT(copy_number) DESC LIMIT 1", "answer": "Which document has the most draft copies? List its document id and number of draft copies.\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT document_id, COUNT(*) FROM Draft_Copies GROUP BY document_id HAVING COUNT(*) > 1", "answer": "Which documents have more than 1 draft copies? List document id and number of draft copies.\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id WHERE Circulation_History.document_id = 1", "answer": "List all employees in the circulation history of the document with id 1. List the employee's name.\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT employee_name FROM Employees EXCEPT SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id", "answer": "List the employees who have not showed up in any circulation history of documents. List the employee's name.\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "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", "answer": "Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies.\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT document_id, COUNT(DISTINCT employee_id) FROM Circulation_History GROUP BY document_id", "answer": "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.\nAdditional table information: table: cre_Doc_Control_Systems"} -{"question": "SELECT dname FROM department ORDER BY mgr_start_date NULLS FIRST", "answer": "List all department names ordered by their starting date.\nAdditional table information: table: company_1"} -{"question": "SELECT Dependent_name FROM dependent WHERE relationship = 'Spouse'", "answer": "find all dependent names who have a spouse relation with some employee.\nAdditional table information: table: company_1"} -{"question": "SELECT COUNT(*) FROM dependent WHERE sex = 'F'", "answer": "how many female dependents are there?\nAdditional table information: table: company_1"} -{"question": "SELECT t1.dname FROM department AS t1 JOIN dept_locations AS t2 ON t1.dnumber = t2.dnumber WHERE t2.dlocation = 'Houston'", "answer": "Find the names of departments that are located in Houston.\nAdditional table information: table: company_1"} -{"question": "SELECT fname, lname FROM employee WHERE salary > 30000", "answer": "Return the first names and last names of employees who earn more than 30000 in salary.\nAdditional table information: table: company_1"} -{"question": "SELECT COUNT(*), sex FROM employee WHERE salary < 50000 GROUP BY sex", "answer": "Find the number of employees of each gender whose salary is lower than 50000.\nAdditional table information: table: company_1"} -{"question": "SELECT fname, lname, address FROM employee ORDER BY Bdate NULLS FIRST", "answer": "list the first and last names, and the addresses of all employees in the ascending order of their birth date.\nAdditional table information: table: company_1"} -{"question": "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'", "answer": "what are the event details of the services that have the type code 'Marriage'?\nAdditional table information: table: local_govt_in_alabama"} -{"question": "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", "answer": "What are the ids and details of events that have more than one participants?\nAdditional table information: table: local_govt_in_alabama"} -{"question": "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", "answer": "How many events have each participants attended? List the participant id, type and the number.\nAdditional table information: table: local_govt_in_alabama"} -{"question": "SELECT Participant_ID, Participant_Type_Code, Participant_Details FROM Participants", "answer": "What are all the the participant ids, type code and details?\nAdditional table information: table: local_govt_in_alabama"} -{"question": "SELECT COUNT(*) FROM participants WHERE participant_type_code = 'Organizer'", "answer": "How many participants belong to the type 'Organizer'?\nAdditional table information: table: local_govt_in_alabama"} -{"question": "SELECT service_type_code FROM services ORDER BY service_type_code NULLS FIRST", "answer": "List the type of the services in alphabetical order.\nAdditional table information: table: local_govt_in_alabama"} -{"question": "SELECT service_id, event_details FROM EVENTS", "answer": "List the service id and details for the events.\nAdditional table information: table: local_govt_in_alabama"} -{"question": "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.%'", "answer": "How many events had participants whose details had the substring 'Dr.'\nAdditional table information: table: local_govt_in_alabama"} -{"question": "SELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common participant type?\nAdditional table information: table: local_govt_in_alabama"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Which service id and type has the least number of participants?\nAdditional table information: table: local_govt_in_alabama"} -{"question": "SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id of the event with the most participants?\nAdditional table information: table: local_govt_in_alabama"} -{"question": "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'", "answer": "Which events id does not have any participant with detail 'Kenyatta Kuhn'?\nAdditional table information: table: local_govt_in_alabama"} -{"question": "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'", "answer": "Which services type had both successful and failure event details?\nAdditional table information: table: local_govt_in_alabama"} -{"question": "SELECT COUNT(*) FROM EVENTS WHERE NOT event_id IN (SELECT event_id FROM Participants_in_Events)", "answer": "How many events did not have any participants?\nAdditional table information: table: local_govt_in_alabama"} -{"question": "SELECT COUNT(DISTINCT participant_id) FROM participants_in_Events", "answer": "What are all the distinct participant ids who attended any events?\nAdditional table information: table: local_govt_in_alabama"} -{"question": "SELECT name FROM races ORDER BY date DESC LIMIT 1", "answer": "What is the name of the race held most recently?\nAdditional table information: table: formula_1"} -{"question": "SELECT name FROM races ORDER BY date DESC LIMIT 1", "answer": "What is the name of the race that occurred most recently?\nAdditional table information: table: formula_1"} -{"question": "SELECT name, date FROM races ORDER BY date DESC LIMIT 1", "answer": "What is the name and date of the most recent race?\nAdditional table information: table: formula_1"} -{"question": "SELECT name, date FROM races ORDER BY date DESC LIMIT 1", "answer": "What is the name and date of the race that occurred most recently?\nAdditional table information: table: formula_1"} -{"question": "SELECT name FROM races WHERE YEAR = 2017", "answer": "Find the names of all races held in 2017.\nAdditional table information: table: formula_1"} -{"question": "SELECT name FROM races WHERE YEAR = 2017", "answer": "What are the names of all the races that occurred in the year 2017?\nAdditional table information: table: formula_1"} -{"question": "SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017", "answer": "Find the distinct names of all races held between 2014 and 2017?\nAdditional table information: table: formula_1"} -{"question": "SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017", "answer": "What are the unique names of all race held between 2014 and 2017?\nAdditional table information: table: formula_1"} -{"question": "SELECT DISTINCT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000", "answer": "List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds?\nAdditional table information: table: formula_1"} -{"question": "SELECT DISTINCT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000", "answer": "What are the forenames and surnames of all unique drivers who had a lap time of less than 93000 milliseconds?\nAdditional table information: table: formula_1"} -{"question": "SELECT DISTINCT T1.driverid, T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000", "answer": "Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds?\nAdditional table information: table: formula_1"} -{"question": "SELECT DISTINCT T1.driverid, T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000", "answer": "What are the different driver ids and nationalities of all drivers who had a laptime of more than 100000 milliseconds?\nAdditional table information: table: formula_1"} -{"question": "SELECT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds NULLS FIRST LIMIT 1", "answer": "What are the forename and surname of the driver who has the smallest laptime?\nAdditional table information: table: formula_1"} -{"question": "SELECT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds NULLS FIRST LIMIT 1", "answer": "What is the forename and surname of the driver with the shortest laptime?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What is the id and family name of the driver who has the longest laptime?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What is the id and last name of the driver with the longest laptime?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What is the id, forname and surname of the driver who had the first position in terms of laptime at least twice?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What is the id, first name, and last name of the driver who was in the first position for laptime at least twice?\nAdditional table information: table: formula_1"} -{"question": "SELECT COUNT(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = 'Australian Grand Prix' AND YEAR = 2009", "answer": "How many drivers participated in the race Australian Grand Prix held in 2009?\nAdditional table information: table: formula_1"} -{"question": "SELECT COUNT(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = 'Australian Grand Prix' AND YEAR = 2009", "answer": "How many drivers were in the Australian Grand Prix held in 2009?\nAdditional table information: table: formula_1"} -{"question": "SELECT COUNT(DISTINCT driverId) FROM results WHERE NOT raceId IN (SELECT raceId FROM races WHERE YEAR <> 2009)", "answer": "How many drivers did not participate in the races held in 2009?\nAdditional table information: table: formula_1"} -{"question": "SELECT COUNT(DISTINCT driverId) FROM results WHERE NOT raceId IN (SELECT raceId FROM races WHERE YEAR <> 2009)", "answer": "How many drivers did not race in 2009?\nAdditional table information: table: formula_1"} -{"question": "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'", "answer": "Give me a list of names and years of races that had any driver whose forename is Lewis?\nAdditional table information: table: formula_1"} -{"question": "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'", "answer": "What are the names and years of all races that had a driver with the last name Lewis?\nAdditional table information: table: formula_1"} -{"question": "SELECT forename, surname FROM drivers WHERE nationality = 'German'", "answer": "Find the forename and surname of drivers whose nationality is German?\nAdditional table information: table: formula_1"} -{"question": "SELECT forename, surname FROM drivers WHERE nationality = 'German'", "answer": "What is the first and last name of all the German drivers?\nAdditional table information: table: formula_1"} -{"question": "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'", "answer": "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?\nAdditional table information: table: formula_1"} -{"question": "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'", "answer": "What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix?\nAdditional table information: table: formula_1"} -{"question": "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'", "answer": "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?\nAdditional table information: table: formula_1"} -{"question": "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'", "answer": "What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "Find all the forenames of distinct drivers who was in position 1 as standing and won?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What are all the different first names of the drivers who are in position as standing and won?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points?\nAdditional table information: table: formula_1"} -{"question": "SELECT COUNT(*), nationality FROM constructors GROUP BY nationality", "answer": "What are the numbers of constructors for different nationalities?\nAdditional table information: table: formula_1"} -{"question": "SELECT COUNT(*), nationality FROM constructors GROUP BY nationality", "answer": "For each nationality, how many different constructors are there?\nAdditional table information: table: formula_1"} -{"question": "SELECT COUNT(*), constructorid FROM constructorStandings GROUP BY constructorid", "answer": "What are the numbers of races for each constructor id?\nAdditional table information: table: formula_1"} -{"question": "SELECT COUNT(*), constructorid FROM constructorStandings GROUP BY constructorid", "answer": "For each constructor id, how many races are there?\nAdditional table information: table: formula_1"} -{"question": "SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2017", "answer": "What are the names of races that were held after 2017 and the circuits were in the country of Spain?\nAdditional table information: table: formula_1"} -{"question": "SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2017", "answer": "What are the names of the races held after 2017 in Spain?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What are the unique names of races that held after 2000 and the circuits were in Spain?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What are the names of all races held after 2000 in Spain?\nAdditional table information: table: formula_1"} -{"question": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration < (SELECT MAX(duration) FROM pitstops WHERE raceid = 841)", "answer": "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.\nAdditional table information: table: formula_1"} -{"question": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration < (SELECT MAX(duration) FROM pitstops WHERE raceid = 841)", "answer": "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?\nAdditional table information: table: formula_1"} -{"question": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration > (SELECT MIN(duration) FROM pitstops WHERE raceid = 841)", "answer": "Find the distinct driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841?\nAdditional table information: table: formula_1"} -{"question": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration > (SELECT MIN(duration) FROM pitstops WHERE raceid = 841)", "answer": "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?\nAdditional table information: table: formula_1"} -{"question": "SELECT DISTINCT forename FROM drivers ORDER BY forename ASC NULLS FIRST", "answer": "List the forenames of all distinct drivers in alphabetical order?\nAdditional table information: table: formula_1"} -{"question": "SELECT DISTINCT forename FROM drivers ORDER BY forename ASC NULLS FIRST", "answer": "What are the first names of all the different drivers in alphabetical order?\nAdditional table information: table: formula_1"} -{"question": "SELECT DISTINCT name FROM races ORDER BY name DESC", "answer": "List the names of all distinct races in reversed lexicographic order?\nAdditional table information: table: formula_1"} -{"question": "SELECT DISTINCT name FROM races ORDER BY name DESC", "answer": "What are the different names of all the races in reverse alphabetical order?\nAdditional table information: table: formula_1"} -{"question": "SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011", "answer": "What are the names of races held between 2009 and 2011?\nAdditional table information: table: formula_1"} -{"question": "SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011", "answer": "What are the names of all races held between 2009 and 2011?\nAdditional table information: table: formula_1"} -{"question": "SELECT name FROM races WHERE TIME > '12:00:00' OR TIME < '09:00:00'", "answer": "What are the names of races held after 12:00:00 or before 09:00:00?\nAdditional table information: table: formula_1"} -{"question": "SELECT name FROM races WHERE TIME > '12:00:00' OR TIME < '09:00:00'", "answer": "What are the names of all races that occurred after 12:00:00 or before 09:00:00?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "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?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What is the id and last name of the driver who participated in the most races after 2010?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What is the id and last name of the driver who participated in the most races after 2010?\nAdditional table information: table: formula_1"} -{"question": "SELECT name FROM circuits WHERE country = 'UK' OR country = 'Malaysia'", "answer": "What are the names of circuits that belong to UK or Malaysia?\nAdditional table information: table: formula_1"} -{"question": "SELECT name FROM circuits WHERE country = 'UK' OR country = 'Malaysia'", "answer": "What are the names of all the circuits that are in the UK or Malaysia?\nAdditional table information: table: formula_1"} -{"question": "SELECT circuitid, LOCATION FROM circuits WHERE country = 'France' OR country = 'Belgium'", "answer": "Find the id and location of circuits that belong to France or Belgium?\nAdditional table information: table: formula_1"} -{"question": "SELECT circuitid, LOCATION FROM circuits WHERE country = 'France' OR country = 'Belgium'", "answer": "What are the ids and locations of all circuits in France or Belgium?\nAdditional table information: table: formula_1"} -{"question": "SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = 'Japanese' AND T2.points > 5", "answer": "Find the names of Japanese constructors that have once earned more than 5 points?\nAdditional table information: table: formula_1"} -{"question": "SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = 'Japanese' AND T2.points > 5", "answer": "What are the names of all the Japanese constructors that have earned more than 5 points?\nAdditional table information: table: formula_1"} -{"question": "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'", "answer": "What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?\nAdditional table information: table: formula_1"} -{"question": "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'", "answer": "What is the average fastest lap speed for the Monaco Grand Prix in 2008?\nAdditional table information: table: formula_1"} -{"question": "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'", "answer": "What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?\nAdditional table information: table: formula_1"} -{"question": "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'", "answer": "What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?\nAdditional table information: table: formula_1"} -{"question": "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 NULLS FIRST", "answer": "What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?\nAdditional table information: table: formula_1"} -{"question": "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 NULLS FIRST", "answer": "For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year?\nAdditional table information: table: formula_1"} -{"question": "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 NULLS FIRST", "answer": "What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?\nAdditional table information: table: formula_1"} -{"question": "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 NULLS FIRST", "answer": "What is the average fastest lap speed for races held after 2004, for each race, ordered by year?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "Find the id, forename and number of races of all drivers who have at least participated in two races?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What is the id, forename, and number of races for all drivers that have participated in at least 2 races?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "Find the driver id and number of races of all drivers who have at most participated in 30 races?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "For each id of a driver who participated in at most 30 races, how many races did they participate in?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "Find the id and surname of the driver who participated the most number of races?\nAdditional table information: table: formula_1"} -{"question": "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", "answer": "What are the ids and last names of all drivers who participated in the most races?\nAdditional table information: table: formula_1"} -{"question": "SELECT COUNT(*) FROM technician", "answer": "How many technicians are there?\nAdditional table information: table: machine_repair"} -{"question": "SELECT COUNT(*) FROM technician", "answer": "What is the number of technicians?\nAdditional table information: table: machine_repair"} -{"question": "SELECT Name FROM technician ORDER BY Age ASC NULLS FIRST", "answer": "List the names of technicians in ascending order of age.\nAdditional table information: table: machine_repair"} -{"question": "SELECT Name FROM technician ORDER BY Age ASC NULLS FIRST", "answer": "What are the names of the technicians by ascending order of age?\nAdditional table information: table: machine_repair"} -{"question": "SELECT Team, Starting_Year FROM technician", "answer": "What are the team and starting year of technicians?\nAdditional table information: table: machine_repair"} -{"question": "SELECT Team, Starting_Year FROM technician", "answer": "What is the team and starting year for each technician?\nAdditional table information: table: machine_repair"} -{"question": "SELECT Name FROM technician WHERE Team <> 'NYY'", "answer": "List the name of technicians whose team is not 'NYY'.\nAdditional table information: table: machine_repair"} -{"question": "SELECT Name FROM technician WHERE Team <> 'NYY'", "answer": "What is the name of the technician whose team is not 'NYY'?\nAdditional table information: table: machine_repair"} -{"question": "SELECT Name FROM technician WHERE Age = 36 OR Age = 37", "answer": "Show the name of technicians aged either 36 or 37\nAdditional table information: table: machine_repair"} -{"question": "SELECT Name FROM technician WHERE Age = 36 OR Age = 37", "answer": "What are the names of the technicians aged either 36 or 37?\nAdditional table information: table: machine_repair"} -{"question": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1", "answer": "What is the starting year of the oldest technicians?\nAdditional table information: table: machine_repair"} -{"question": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1", "answer": "What is the starting year for the oldest technician?\nAdditional table information: table: machine_repair"} -{"question": "SELECT Team, COUNT(*) FROM technician GROUP BY Team", "answer": "Show different teams of technicians and the number of technicians in each team.\nAdditional table information: table: machine_repair"} -{"question": "SELECT Team, COUNT(*) FROM technician GROUP BY Team", "answer": "For each team, how many technicians are there?\nAdditional table information: table: machine_repair"} -{"question": "SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the team that has the most number of technicians.\nAdditional table information: table: machine_repair"} -{"question": "SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the teams with the most technicians?\nAdditional table information: table: machine_repair"} -{"question": "SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2", "answer": "Show the team that have at least two technicians.\nAdditional table information: table: machine_repair"} -{"question": "SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2", "answer": "What is the team with at least 2 technicians?\nAdditional table information: table: machine_repair"} -{"question": "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", "answer": "Show names of technicians and series of machines they are assigned to repair.\nAdditional table information: table: machine_repair"} -{"question": "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", "answer": "What are the names of technicians and the machine series that they repair?\nAdditional table information: table: machine_repair"} -{"question": "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 NULLS FIRST", "answer": "Show names of technicians in ascending order of quality rank of the machine they are assigned.\nAdditional table information: table: machine_repair"} -{"question": "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 NULLS FIRST", "answer": "What are the names of the technicians by ascending order of quality rank for the machine they are assigned?\nAdditional table information: table: machine_repair"} -{"question": "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", "answer": "Show names of technicians who are assigned to repair machines with value point more than 70.\nAdditional table information: table: machine_repair"} -{"question": "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", "answer": "What are the names of the technicians that are assigned to repair machines with more point values than 70?\nAdditional table information: table: machine_repair"} -{"question": "SELECT T2.Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name", "answer": "Show names of technicians and the number of machines they are assigned to repair.\nAdditional table information: table: machine_repair"} -{"question": "SELECT T2.Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name", "answer": "What are the names of the technicians and how many machines are they assigned to repair?\nAdditional table information: table: machine_repair"} -{"question": "SELECT Name FROM technician WHERE NOT technician_id IN (SELECT technician_id FROM repair_assignment)", "answer": "List the names of technicians who have not been assigned to repair machines.\nAdditional table information: table: machine_repair"} -{"question": "SELECT Name FROM technician WHERE NOT technician_id IN (SELECT technician_id FROM repair_assignment)", "answer": "What are the names of the technicians that have not been assigned to repair machines?\nAdditional table information: table: machine_repair"} -{"question": "SELECT Starting_Year FROM technician WHERE Team = 'CLE' INTERSECT SELECT Starting_Year FROM technician WHERE Team = 'CWS'", "answer": "Show the starting years shared by technicians from team 'CLE' and 'CWS'.\nAdditional table information: table: machine_repair"} -{"question": "SELECT Starting_Year FROM technician WHERE Team = 'CLE' INTERSECT SELECT Starting_Year FROM technician WHERE Team = 'CWS'", "answer": "What are the starting years shared by the technicians from the team 'CLE' or 'CWS'?\nAdditional table information: table: machine_repair"} -{"question": "SELECT COUNT(*) FROM entrepreneur", "answer": "How many entrepreneurs are there?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT COUNT(*) FROM entrepreneur", "answer": "Count the number of entrepreneurs.\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC", "answer": "List the companies of entrepreneurs in descending order of money requested.\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC", "answer": "What are the companies of entrepreneurs, ordered descending by amount of money requested?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Company, Investor FROM entrepreneur", "answer": "List the companies and the investors of entrepreneurs.\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Company, Investor FROM entrepreneur", "answer": "What are the companies and investors that correspond to each entrepreneur?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT AVG(Money_Requested) FROM entrepreneur", "answer": "What is the average money requested by all entrepreneurs?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT AVG(Money_Requested) FROM entrepreneur", "answer": "Return the average money requested across all entrepreneurs.\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Name FROM People ORDER BY Weight ASC NULLS FIRST", "answer": "What are the names of people in ascending order of weight?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Name FROM People ORDER BY Weight ASC NULLS FIRST", "answer": "Return the names of people, ordered by weight ascending.\nAdditional table information: table: entrepreneur"} -{"question": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID", "answer": "What are the names of entrepreneurs?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID", "answer": "Return the names of entrepreneurs.\nAdditional table information: table: entrepreneur"} -{"question": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor <> 'Rachel Elnaugh'", "answer": "What are the names of entrepreneurs whose investor is not 'Rachel Elnaugh'?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor <> 'Rachel Elnaugh'", "answer": "Return the names of entrepreneurs do no not have the investor Rachel Elnaugh.\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Weight FROM people ORDER BY Height ASC NULLS FIRST LIMIT 1", "answer": "What is the weight of the shortest person?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Weight FROM people ORDER BY Height ASC NULLS FIRST LIMIT 1", "answer": "Return the weight of the shortest person.\nAdditional table information: table: entrepreneur"} -{"question": "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", "answer": "What is the name of the entrepreneur with the greatest weight?\nAdditional table information: table: entrepreneur"} -{"question": "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", "answer": "Return the name of the heaviest entrepreneur.\nAdditional table information: table: entrepreneur"} -{"question": "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", "answer": "What is the total money requested by entrepreneurs with height more than 1.85?\nAdditional table information: table: entrepreneur"} -{"question": "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", "answer": "Give the total money requested by entrepreneurs who are taller than 1.85.\nAdditional table information: table: entrepreneur"} -{"question": "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'", "answer": "What are the dates of birth of entrepreneurs with investor 'Simon Woodroffe' or 'Peter Jones'?\nAdditional table information: table: entrepreneur"} -{"question": "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'", "answer": "Return the dates of birth for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones.\nAdditional table information: table: entrepreneur"} -{"question": "SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC", "answer": "What are the weights of entrepreneurs in descending order of money requested?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC", "answer": "Return the weights of entrepreneurs, ordered descending by amount of money requested.\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor", "answer": "What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor", "answer": "How many entrepreneurs correspond to each investor?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the investor that has invested in the most number of entrepreneurs?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the investor who have invested in the greatest number of entrepreneurs.\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2", "answer": "What are the investors that have invested in at least two entrepreneurs?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2", "answer": "Return the investors who have invested in two or more entrepreneurs.\nAdditional table information: table: entrepreneur"} -{"question": "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 NULLS FIRST", "answer": "List the names of entrepreneurs and their companies in descending order of money requested?\nAdditional table information: table: entrepreneur"} -{"question": "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 NULLS FIRST", "answer": "What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM entrepreneur)", "answer": "List the names of people that are not entrepreneurs.\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM entrepreneur)", "answer": "What are the names of people who are not entrepreneurs?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000", "answer": "Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000.\nAdditional table information: table: entrepreneur"} -{"question": "SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000", "answer": "What are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT COUNT(DISTINCT Company) FROM entrepreneur", "answer": "How many distinct companies are there?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT COUNT(DISTINCT Company) FROM entrepreneur", "answer": "Count the number of different companies.\nAdditional table information: table: entrepreneur"} -{"question": "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", "answer": "Show the company of the tallest entrepreneur.\nAdditional table information: table: entrepreneur"} -{"question": "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", "answer": "Which company was started by the entrepreneur with the greatest height?\nAdditional table information: table: entrepreneur"} -{"question": "SELECT COUNT(*) FROM perpetrator", "answer": "How many perpetrators are there?\nAdditional table information: table: perpetrator"} -{"question": "SELECT Date FROM perpetrator ORDER BY Killed DESC", "answer": "List the date of perpetrators in descending order of the number of people killed.\nAdditional table information: table: perpetrator"} -{"question": "SELECT Injured FROM perpetrator ORDER BY Injured ASC NULLS FIRST", "answer": "List the number of people injured by perpetrators in ascending order.\nAdditional table information: table: perpetrator"} -{"question": "SELECT AVG(Injured) FROM perpetrator", "answer": "What is the average number of people injured by all perpetrators?\nAdditional table information: table: perpetrator"} -{"question": "SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1", "answer": "What is the location of the perpetrator with the largest kills.\nAdditional table information: table: perpetrator"} -{"question": "SELECT Name FROM People ORDER BY Height ASC NULLS FIRST", "answer": "What are the names of people in ascending order of height?\nAdditional table information: table: perpetrator"} -{"question": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID", "answer": "What are the names of perpetrators?\nAdditional table information: table: perpetrator"} -{"question": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country <> 'China'", "answer": "What are the names of perpetrators whose country is not 'China'?\nAdditional table information: table: perpetrator"} -{"question": "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", "answer": "What is the name of the perpetrator with the biggest weight.\nAdditional table information: table: perpetrator"} -{"question": "SELECT SUM(T2.Killed) FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 1.84", "answer": "What is the total kills of the perpetrators with height more than 1.84.\nAdditional table information: table: perpetrator"} -{"question": "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'", "answer": "What are the names of perpetrators in country 'China' or 'Japan'?\nAdditional table information: table: perpetrator"} -{"question": "SELECT T1.Height FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Injured DESC", "answer": "What are the heights of perpetrators in descending order of the number of people they injured?\nAdditional table information: table: perpetrator"} -{"question": "SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country", "answer": "What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.\nAdditional table information: table: perpetrator"} -{"question": "SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the country that has the most perpetrators?\nAdditional table information: table: perpetrator"} -{"question": "SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country HAVING COUNT(*) >= 2", "answer": "What are the countries that have at least two perpetrators?\nAdditional table information: table: perpetrator"} -{"question": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Year DESC", "answer": "List the names of perpetrators in descending order of the year.\nAdditional table information: table: perpetrator"} -{"question": "SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM perpetrator)", "answer": "List the names of people that are not perpetrators.\nAdditional table information: table: perpetrator"} -{"question": "SELECT Country FROM perpetrator WHERE Injured > 50 INTERSECT SELECT Country FROM perpetrator WHERE Injured < 20", "answer": "Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.\nAdditional table information: table: perpetrator"} -{"question": "SELECT COUNT(DISTINCT LOCATION) FROM perpetrator", "answer": "How many distinct locations of perpetrators are there?\nAdditional table information: table: perpetrator"} -{"question": "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", "answer": "Show the date of the tallest perpetrator.\nAdditional table information: table: perpetrator"} -{"question": "SELECT MAX(YEAR) FROM perpetrator", "answer": "In which year did the most recent crime happen?\nAdditional table information: table: perpetrator"} -{"question": "SELECT campus FROM campuses WHERE county = 'Los Angeles'", "answer": "Report the name of all campuses in Los Angeles county.\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE county = 'Los Angeles'", "answer": "What campuses are located in the county of Los Angeles?\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE LOCATION = 'Chico'", "answer": "What are the names of all campuses located at Chico?\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE LOCATION = 'Chico'", "answer": "What campuses are located in Chico?\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE YEAR = 1958", "answer": "Find all the campuses opened in 1958.\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE YEAR = 1958", "answer": "What are the campuses that opened in 1958?\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE YEAR < 1800", "answer": "Find the name of the campuses opened before 1800.\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE YEAR < 1800", "answer": "What campuses opened before 1800?\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939", "answer": "Which campus was opened between 1935 and 1939?\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939", "answer": "What campuses opened between 1935 and 1939?\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE LOCATION = 'Northridge' AND county = 'Los Angeles' UNION SELECT campus FROM campuses WHERE LOCATION = 'San Francisco' AND county = 'San Francisco'", "answer": "Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco.\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE LOCATION = 'Northridge' AND county = 'Los Angeles' UNION SELECT campus FROM campuses WHERE LOCATION = 'San Francisco' AND county = 'San Francisco'", "answer": "What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "What is the campus fee of 'San Jose State University' in year 1996?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "What is the campus fee for San Jose State University in 1996?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "What is the campus fee of 'San Francisco State University' in year 1996?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "What is the campus fee for San Francisco State University in 1996?\nAdditional table information: table: csu_1"} -{"question": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees)", "answer": "Find the count of universities whose campus fee is greater than the average campus fee.\nAdditional table information: table: csu_1"} -{"question": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees)", "answer": "How many universities have a campus fee higher than average?\nAdditional table information: table: csu_1"} -{"question": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees)", "answer": "Find the count of universities whose campus fee is greater than the average campus fee.\nAdditional table information: table: csu_1"} -{"question": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees)", "answer": "How many universities have a campus fee greater than the average?\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE county = 'Los Angeles' AND YEAR > 1950", "answer": "Which university is in Los Angeles county and opened after 1950?\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE county = 'Los Angeles' AND YEAR > 1950", "answer": "What campuses are located in Los Angeles county and opened after 1950?\nAdditional table information: table: csu_1"} -{"question": "SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY SUM(degrees) DESC LIMIT 1", "answer": "Which year has the most degrees conferred?\nAdditional table information: table: csu_1"} -{"question": "SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY SUM(degrees) DESC LIMIT 1", "answer": "In what year was the most degrees conferred?\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM degrees GROUP BY campus ORDER BY SUM(degrees) DESC LIMIT 1", "answer": "Which campus has the most degrees conferred in all times?\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM degrees GROUP BY campus ORDER BY SUM(degrees) DESC LIMIT 1", "answer": "What campus has the most degrees conferrred over its entire existence?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "Which campus has the most faculties in year 2003?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "What campus has the most faculties in 2003?\nAdditional table information: table: csu_1"} -{"question": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 1996", "answer": "Find the average fee on a CSU campus in 1996\nAdditional table information: table: csu_1"} -{"question": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 1996", "answer": "What is the average fee for a CSU campus in the year of 1996?\nAdditional table information: table: csu_1"} -{"question": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 2005", "answer": "What is the average fee on a CSU campus in 2005?\nAdditional table information: table: csu_1"} -{"question": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 2005", "answer": "What is the average fee for a CSU campus in the year of 2005?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "report the total number of degrees granted between 1998 and 2002.\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "how many degrees were conferred between 1998 and 2002?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "For each Orange county campus, report the number of degrees granted after 2000.\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "What is the total number of degrees granted after 2000 for each Orange county campus?\nAdditional table information: table: csu_1"} -{"question": "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')", "answer": "Find the names of the campus which has more faculties in 2002 than every campus in Orange county.\nAdditional table information: table: csu_1"} -{"question": "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')", "answer": "What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "What campus started in year 1956, has more than 200 full time students, and more than 400 students enrolled?\nAdditional table information: table: csu_1"} -{"question": "SELECT COUNT(*) FROM campuses WHERE county = 'Los Angeles'", "answer": "How many campuses are there in Los Angeles county?\nAdditional table information: table: csu_1"} -{"question": "SELECT COUNT(*) FROM campuses WHERE county = 'Los Angeles'", "answer": "How many campuses exist are in the county of LA?\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE county = 'Los Angeles'", "answer": "List the campuses in Los Angeles county.\nAdditional table information: table: csu_1"} -{"question": "SELECT campus FROM campuses WHERE county = 'Los Angeles'", "answer": "What campuses are in Los Angeles county?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "How many degrees were conferred in 'San Jose State University' in 2000?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "How many degrees were conferred at San Jose State University in 2000?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "What are the degrees conferred in 'San Francisco State University' in 2001.\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "What degrees were conferred in San Francisco State University in the year 2001?\nAdditional table information: table: csu_1"} -{"question": "SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002", "answer": "How many faculty is there in total in the year of 2002?\nAdditional table information: table: csu_1"} -{"question": "SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002", "answer": "How many faculty, in total, are there in the year 2002?\nAdditional table information: table: csu_1"} -{"question": "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'", "answer": "What is the number of faculty lines in campus 'Long Beach State University' in 2002?\nAdditional table information: table: csu_1"} -{"question": "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'", "answer": "What is the number of faculty at Long Beach State University in 2002?\nAdditional table information: table: csu_1"} -{"question": "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'", "answer": "How many faculty lines are there in 'San Francisco State University' in year 2004?\nAdditional table information: table: csu_1"} -{"question": "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'", "answer": "How many faculty lines are there at San Francisco State University in 2004?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "List the campus that have between 600 and 1000 faculty lines in year 2004.\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "What are the campuses that had between 600 and 1000 faculty members in 2004?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "How many faculty lines are there in the university that conferred the most number of degrees in year 2002?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "How many faculty members did the university that conferred the most degrees in 2002 have?\nAdditional table information: table: csu_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "How many faculty lines are there in the university that conferred the least number of degrees in year 2001?\nAdditional table information: table: csu_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "How many faculty members are at the university that gave the least number of degrees in 2001?\nAdditional table information: table: csu_1"} -{"question": "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'", "answer": "How many undergraduates are there in 'San Jose State University' in year 2004?\nAdditional table information: table: csu_1"} -{"question": "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'", "answer": "How many undergraduates are there at San Jose State\nAdditional table information: table: csu_1"} -{"question": "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'", "answer": "What is the number of graduates in 'San Francisco State University' in year 2004?\nAdditional table information: table: csu_1"} -{"question": "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'", "answer": "How many people graduated from San Francisco State University in 2004?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "What is the campus fee of 'San Francisco State University' in year 2000?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "In the year 2000, what is the campus fee for San Francisco State University?\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "Find the campus fee of 'San Jose State University' in year 2000.\nAdditional table information: table: csu_1"} -{"question": "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", "answer": "What is the campus fee in the year 2000 for San Jose State University?\nAdditional table information: table: csu_1"} -{"question": "SELECT COUNT(*) FROM campuses", "answer": "How many CSU campuses are there?\nAdditional table information: table: csu_1"} -{"question": "SELECT COUNT(*) FROM campuses", "answer": "What is the total number of campuses?\nAdditional table information: table: csu_1"} -{"question": "SELECT COUNT(*) FROM candidate", "answer": "How many candidates are there?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT COUNT(*) FROM candidate", "answer": "Count the number of candidates.\nAdditional table information: table: candidate_poll"} -{"question": "SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which poll resource provided the most number of candidate information?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the poll resource associated with the most candidates.\nAdditional table information: table: candidate_poll"} -{"question": "SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3", "answer": "what are the top 3 highest support rates?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3", "answer": "Return the top 3 greatest support rates.\nAdditional table information: table: candidate_poll"} -{"question": "SELECT Candidate_ID FROM candidate ORDER BY oppose_rate NULLS FIRST LIMIT 1", "answer": "Find the id of the candidate who got the lowest oppose rate.\nAdditional table information: table: candidate_poll"} -{"question": "SELECT Candidate_ID FROM candidate ORDER BY oppose_rate NULLS FIRST LIMIT 1", "answer": "What is the id of the candidate with the lowest oppose rate?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT Support_rate, Consider_rate, Oppose_rate FROM candidate ORDER BY unsure_rate NULLS FIRST", "answer": "Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.\nAdditional table information: table: candidate_poll"} -{"question": "SELECT Support_rate, Consider_rate, Oppose_rate FROM candidate ORDER BY unsure_rate NULLS FIRST", "answer": "What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1", "answer": "which poll source does the highest oppose rate come from?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1", "answer": "Return the poll source corresponding to the candidate who has the oppose rate.\nAdditional table information: table: candidate_poll"} -{"question": "SELECT name FROM people ORDER BY date_of_birth NULLS FIRST", "answer": "List all people names in the order of their date of birth from old to young.\nAdditional table information: table: candidate_poll"} -{"question": "SELECT name FROM people ORDER BY date_of_birth NULLS FIRST", "answer": "What are the names of all people, ordered by their date of birth?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT AVG(height), AVG(weight) FROM people WHERE sex = 'M'", "answer": "Find the average height and weight for all males (sex is M).\nAdditional table information: table: candidate_poll"} -{"question": "SELECT AVG(height), AVG(weight) FROM people WHERE sex = 'M'", "answer": "What are the average height and weight across males (sex is M)?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT name FROM people WHERE height > 200 OR height < 190", "answer": "find the names of people who are taller than 200 or lower than 190.\nAdditional table information: table: candidate_poll"} -{"question": "SELECT name FROM people WHERE height > 200 OR height < 190", "answer": "What are the names of people who have a height greater than 200 or less than 190?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT AVG(weight), MIN(weight), sex FROM people GROUP BY sex", "answer": "Find the average and minimum weight for each gender.\nAdditional table information: table: candidate_poll"} -{"question": "SELECT AVG(weight), MIN(weight), sex FROM people GROUP BY sex", "answer": "What are the average and minimum weights for people of each sex?\nAdditional table information: table: candidate_poll"} -{"question": "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", "answer": "Find the name and gender of the candidate who got the highest support rate.\nAdditional table information: table: candidate_poll"} -{"question": "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", "answer": "What is the name and sex of the candidate with the highest support rate?\nAdditional table information: table: candidate_poll"} -{"question": "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", "answer": "Find the name of the candidates whose oppose percentage is the lowest for each sex.\nAdditional table information: table: candidate_poll"} -{"question": "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", "answer": "For each sex, what is the name and sex of the candidate with the oppose rate for their sex?\nAdditional table information: table: candidate_poll"} -{"question": "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", "answer": "which gender got the highest average uncertain ratio.\nAdditional table information: table: candidate_poll"} -{"question": "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", "answer": "What is the sex of the candidate who had the highest unsure rate?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT name FROM people WHERE NOT people_id IN (SELECT people_id FROM candidate)", "answer": "what are the names of people who did not participate in the candidate election.\nAdditional table information: table: candidate_poll"} -{"question": "SELECT name FROM people WHERE NOT people_id IN (SELECT people_id FROM candidate)", "answer": "Give the names of people who did not participate in the candidate election.\nAdditional table information: table: candidate_poll"} -{"question": "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", "answer": "Find the names of the candidates whose support percentage is lower than their oppose rate.\nAdditional table information: table: candidate_poll"} -{"question": "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", "answer": "What are the names of candidates who have a lower support rate than oppose rate?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT COUNT(*), sex FROM people WHERE weight > 85 GROUP BY sex", "answer": "how many people are there whose weight is higher than 85 for each gender?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT COUNT(*), sex FROM people WHERE weight > 85 GROUP BY sex", "answer": "Count the number of people of each sex who have a weight higher than 85.\nAdditional table information: table: candidate_poll"} -{"question": "SELECT MAX(support_rate), MIN(consider_rate), MIN(oppose_rate) FROM candidate", "answer": "find the highest support percentage, lowest consider rate and oppose rate of all candidates.\nAdditional table information: table: candidate_poll"} -{"question": "SELECT MAX(support_rate), MIN(consider_rate), MIN(oppose_rate) FROM candidate", "answer": "Return the maximum support rate, minimum consider rate, and minimum oppose rate across all candidates?\nAdditional table information: table: candidate_poll"} -{"question": "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 NULLS FIRST", "answer": "list all female (sex is F) candidate names in the alphabetical order.\nAdditional table information: table: candidate_poll"} -{"question": "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 NULLS FIRST", "answer": "What are the names of all female candidates in alphabetical order (sex is F)?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT name FROM people WHERE height < (SELECT AVG(height) FROM people)", "answer": "find the name of people whose height is lower than the average.\nAdditional table information: table: candidate_poll"} -{"question": "SELECT name FROM people WHERE height < (SELECT AVG(height) FROM people)", "answer": "What are the names of people who are shorter than average?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT * FROM people", "answer": "List all info about all people.\nAdditional table information: table: candidate_poll"} -{"question": "SELECT * FROM people", "answer": "What is all the information about all people?\nAdditional table information: table: candidate_poll"} -{"question": "SELECT title FROM Movie WHERE director = 'Steven Spielberg'", "answer": "Find the titles of all movies directed by steven spielberg.\nAdditional table information: table: movie_1"} -{"question": "SELECT title FROM Movie WHERE director = 'Steven Spielberg'", "answer": "What are the names of all movies directed by Steven Spielberg?\nAdditional table information: table: movie_1"} -{"question": "SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000", "answer": "What is the name of the movie produced after 2000 and directed by James Cameron?\nAdditional table information: table: movie_1"} -{"question": "SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000", "answer": "What are the titles of all movies that James Cameron directed after 2000?\nAdditional table information: table: movie_1"} -{"question": "SELECT COUNT(*) FROM Movie WHERE YEAR < 2000", "answer": "How many movies were made before 2000?\nAdditional table information: table: movie_1"} -{"question": "SELECT COUNT(*) FROM Movie WHERE YEAR < 2000", "answer": "How many movies were made before 2000?\nAdditional table information: table: movie_1"} -{"question": "SELECT director FROM Movie WHERE title = 'Avatar'", "answer": "Who is the director of movie Avatar?\nAdditional table information: table: movie_1"} -{"question": "SELECT director FROM Movie WHERE title = 'Avatar'", "answer": "Who directed Avatar?\nAdditional table information: table: movie_1"} -{"question": "SELECT COUNT(*) FROM Reviewer", "answer": "How many reviewers listed?\nAdditional table information: table: movie_1"} -{"question": "SELECT COUNT(*) FROM Reviewer", "answer": "How many reviewers are there?\nAdditional table information: table: movie_1"} -{"question": "SELECT rID FROM Reviewer WHERE name LIKE '%Mike%'", "answer": "What is the id of the reviewer whose name has substring \u201cMike\u201d?\nAdditional table information: table: movie_1"} -{"question": "SELECT rID FROM Reviewer WHERE name LIKE '%Mike%'", "answer": "What is the id of the reviewer whose name includes the word 'Mike'?\nAdditional table information: table: movie_1"} -{"question": "SELECT rID FROM Reviewer WHERE name = 'Daniel Lewis'", "answer": "What is the reviewer id of Daniel Lewis?\nAdditional table information: table: movie_1"} -{"question": "SELECT rID FROM Reviewer WHERE name = 'Daniel Lewis'", "answer": "What is the id of the reviewer named Daniel Lewis?\nAdditional table information: table: movie_1"} -{"question": "SELECT COUNT(*) FROM Rating WHERE stars > 3", "answer": "What is the total number of ratings that has more than 3 stars?\nAdditional table information: table: movie_1"} -{"question": "SELECT COUNT(*) FROM Rating WHERE stars > 3", "answer": "How many movie ratings have more than 3 stars?\nAdditional table information: table: movie_1"} -{"question": "SELECT MAX(stars), MIN(stars) FROM Rating", "answer": "What is the lowest and highest rating star?\nAdditional table information: table: movie_1"} -{"question": "SELECT MAX(stars), MIN(stars) FROM Rating", "answer": "What is the maximum and mininum number of stars a rating can receive?\nAdditional table information: table: movie_1"} -{"question": "SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year NULLS FIRST", "answer": "Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.\nAdditional table information: table: movie_1"} -{"question": "SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year NULLS FIRST", "answer": "In what years did a movie receive a 4 or 5 star rating, and list the years from oldest to most recently?\nAdditional table information: table: movie_1"} -{"question": "SELECT T1.director, T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5", "answer": "What are the names of directors who directed movies with 5 star rating? Also return the title of these movies.\nAdditional table information: table: movie_1"} -{"question": "SELECT T1.director, T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5", "answer": "What are the names of the directors who created a movie with a 5 star rating, and what was the name of those movies?\nAdditional table information: table: movie_1"} -{"question": "SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name", "answer": "What is the average rating star for each reviewer?\nAdditional table information: table: movie_1"} -{"question": "SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name", "answer": "What is the average number of stars that each reviewer awards for a movie?\nAdditional table information: table: movie_1"} -{"question": "SELECT title FROM Movie WHERE NOT mID IN (SELECT mID FROM Rating)", "answer": "Find the titles of all movies that have no ratings.\nAdditional table information: table: movie_1"} -{"question": "SELECT title FROM Movie WHERE NOT mID IN (SELECT mID FROM Rating)", "answer": "What are the titles of all movies that have not been rated?\nAdditional table information: table: movie_1"} -{"question": "SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = 'null'", "answer": "Find the names of all reviewers who have ratings with a NULL value for the date.\nAdditional table information: table: movie_1"} -{"question": "SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = 'null'", "answer": "What are the different names of all reviewers whose ratings do not have a date field?\nAdditional table information: table: movie_1"} -{"question": "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)", "answer": "What is the average rating stars and title for the oldest movie?\nAdditional table information: table: movie_1"} -{"question": "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)", "answer": "For the oldest movie listed, what is its average rating and title?\nAdditional table information: table: movie_1"} -{"question": "SELECT title FROM Movie WHERE YEAR = (SELECT MAX(YEAR) FROM Movie)", "answer": "What is the name of the most recent movie?\nAdditional table information: table: movie_1"} -{"question": "SELECT title FROM Movie WHERE YEAR = (SELECT MAX(YEAR) FROM Movie)", "answer": "What is the title of the newest movie?\nAdditional table information: table: movie_1"} -{"question": "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)", "answer": "What is the maximum stars and year for the most recent movie?\nAdditional table information: table: movie_1"} -{"question": "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)", "answer": "What is highest rating for the most recent movie and when was it released?\nAdditional table information: table: movie_1"} -{"question": "SELECT title FROM Movie WHERE YEAR > (SELECT MAX(YEAR) FROM Movie WHERE director = 'Steven Spielberg')", "answer": "What is the names of movies whose created year is after all movies directed by Steven Spielberg?\nAdditional table information: table: movie_1"} -{"question": "SELECT title FROM Movie WHERE YEAR > (SELECT MAX(YEAR) FROM Movie WHERE director = 'Steven Spielberg')", "answer": "What are the names of all movies that were created after the most recent Steven Spielberg film?\nAdditional table information: table: movie_1"} -{"question": "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')", "answer": "What are the titles and directors of the movies whose star is greater than the average stars of the movies directed by James Cameron?\nAdditional table information: table: movie_1"} -{"question": "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')", "answer": "What are the titles and directors of all movies that have a rating higher than the average James Cameron film rating?\nAdditional table information: table: movie_1"} -{"question": "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 NULLS FIRST, T2.title NULLS FIRST, T1.stars NULLS FIRST", "answer": "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.\nAdditional table information: table: movie_1"} -{"question": "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 NULLS FIRST, T2.title NULLS FIRST, T1.stars NULLS FIRST", "answer": "What is the reviewer name, film title, movie rating, and rating date for every movie ordered by reviewer name, movie title, then finally rating?\nAdditional table information: table: movie_1"} -{"question": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3", "answer": "Find the names of all reviewers who have contributed three or more ratings.\nAdditional table information: table: movie_1"} -{"question": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3", "answer": "What are the names of all reviewers that have rated 3 or more movies?\nAdditional table information: table: movie_1"} -{"question": "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'", "answer": "Find the names of all reviewers who rated Gone with the Wind.\nAdditional table information: table: movie_1"} -{"question": "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'", "answer": "What are the names of all the different reviewers who rates Gone with the Wind?\nAdditional table information: table: movie_1"} -{"question": "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'", "answer": "Find the names of all directors whose movies are rated by Sarah Martinez.\nAdditional table information: table: movie_1"} -{"question": "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'", "answer": "What are the names of all directors whose movies have been reviewed by Sarah Martinez?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "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.\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "What are the different reviewer names, movie titles, and stars for every rating where the reviewer had the same name as the director?\nAdditional table information: table: movie_1"} -{"question": "SELECT name FROM Reviewer UNION SELECT title FROM Movie", "answer": "Return all reviewer names and movie names together in a single list.\nAdditional table information: table: movie_1"} -{"question": "SELECT name FROM Reviewer UNION SELECT title FROM Movie", "answer": "What are the names of all the reviewers and movie names?\nAdditional table information: table: movie_1"} -{"question": "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'", "answer": "Find the titles of all movies not reviewed by Chris Jackson.\nAdditional table information: table: movie_1"} -{"question": "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'", "answer": "What are the titles of all movies that were not reviewed by Chris Jackson?\nAdditional table information: table: movie_1"} -{"question": "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 NULLS FIRST, T1.title NULLS FIRST", "answer": "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.\nAdditional table information: table: movie_1"} -{"question": "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 NULLS FIRST, T1.title NULLS FIRST", "answer": "For all directors who have directed more than one movie, what movies have they directed and what are their names?\nAdditional table information: table: movie_1"} -{"question": "SELECT T1.title, T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title", "answer": "For directors who had more than one movie, return the titles and produced years of all movies directed by them.\nAdditional table information: table: movie_1"} -{"question": "SELECT T1.title, T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title", "answer": "For each director who directed more than one movie, what are the titles and dates of release for all those movies?\nAdditional table information: table: movie_1"} -{"question": "SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1", "answer": "What are the names of the directors who made exactly one movie?\nAdditional table information: table: movie_1"} -{"question": "SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1", "answer": "What are the names of all directors who made one movie?\nAdditional table information: table: movie_1"} -{"question": "SELECT director FROM Movie WHERE director <> 'null' GROUP BY director HAVING COUNT(*) = 1", "answer": "What are the names of the directors who made exactly one movie excluding director NULL?\nAdditional table information: table: movie_1"} -{"question": "SELECT director FROM Movie WHERE director <> 'null' GROUP BY director HAVING COUNT(*) = 1", "answer": "What are the names of all directors who have made one movie except for the director named NULL?\nAdditional table information: table: movie_1"} -{"question": "SELECT COUNT(*), T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director", "answer": "How many movie reviews does each director get?\nAdditional table information: table: movie_1"} -{"question": "SELECT COUNT(*), T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director", "answer": "For each director, how many reviews have they received?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "Find the movies with the highest average rating. Return the movie titles and average rating.\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "What are the movie titles with the highest average rating and what are those ratings?\nAdditional table information: table: movie_1"} -{"question": "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) NULLS FIRST LIMIT 1", "answer": "What are the movie titles and average rating of the movies with the lowest average rating?\nAdditional table information: table: movie_1"} -{"question": "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) NULLS FIRST LIMIT 1", "answer": "What are the titles and average ratings for all movies that have the lowest average rating?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "What are the names and years of the movies that has the top 3 highest rating star?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "What are the names and years released for the movies with the top 3 highest ratings?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "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.\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "For each director, what are the titles and ratings for all the movies they reviewed?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "Find the title and star rating of the movie that got the least rating star for each reviewer.\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "For each reviewer id, what is the title and rating for the movie with the smallest rating?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "Find the title and score of the movie with the lowest rating among all movies directed by each director.\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "For each director, what is the title and score of their most poorly rated movie?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "What is the name of the movie that is rated by most of times?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "What is the name of the movie that has been reviewed the most?\nAdditional table information: table: movie_1"} -{"question": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5", "answer": "What are the titles of all movies that have rating star is between 3 and 5?\nAdditional table information: table: movie_1"} -{"question": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5", "answer": "What are the titles of all movies that have between 3 and 5 stars?\nAdditional table information: table: movie_1"} -{"question": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3", "answer": "Find the names of reviewers who had given higher than 3 star ratings.\nAdditional table information: table: movie_1"} -{"question": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3", "answer": "What are the names of the reviewers who have rated a movie more than 3 stars before?\nAdditional table information: table: movie_1"} -{"question": "SELECT mID, AVG(stars) FROM Rating WHERE NOT mID 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", "answer": "Find the average rating star for each movie that are not reviewed by Brittany Harris.\nAdditional table information: table: movie_1"} -{"question": "SELECT mID, AVG(stars) FROM Rating WHERE NOT mID 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", "answer": "What is the average rating for each movie that has never been reviewed by Brittany Harris?\nAdditional table information: table: movie_1"} -{"question": "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'", "answer": "What are the ids of the movies that are not reviewed by Brittany Harris.\nAdditional table information: table: movie_1"} -{"question": "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'", "answer": "What are the ids of all moviest hat have not been reviewed by Britanny Harris?\nAdditional table information: table: movie_1"} -{"question": "SELECT mID, AVG(stars) FROM Rating GROUP BY mID HAVING COUNT(*) >= 2", "answer": "Find the average rating star for each movie that received at least 2 ratings.\nAdditional table information: table: movie_1"} -{"question": "SELECT mID, AVG(stars) FROM Rating GROUP BY mID HAVING COUNT(*) >= 2", "answer": "For each movie that received more than 3 reviews, what is the average rating?\nAdditional table information: table: movie_1"} -{"question": "SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4", "answer": "find the ids of reviewers who did not give 4 star.\nAdditional table information: table: movie_1"} -{"question": "SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4", "answer": "What are the ids of all reviewers who did not give 4 stars?\nAdditional table information: table: movie_1"} -{"question": "SELECT rID FROM Rating WHERE stars <> 4", "answer": "Find the ids of reviewers who didn't only give 4 star.\nAdditional table information: table: movie_1"} -{"question": "SELECT rID FROM Rating WHERE stars <> 4", "answer": "What are the ids of all reviewers who have not given 4 stars at least once?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "What are names of the movies that are either made after 2000 or reviewed by Brittany Harris?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "What are the names of all movies that were made after 2000 or reviewed by Brittany Harris?\nAdditional table information: table: movie_1"} -{"question": "SELECT title FROM Movie WHERE director = 'James Cameron' OR YEAR < 1980", "answer": "What are names of the movies that are either made before 1980 or directed by James Cameron?\nAdditional table information: table: movie_1"} -{"question": "SELECT title FROM Movie WHERE director = 'James Cameron' OR YEAR < 1980", "answer": "What are the names of all movies made before 1980 or had James Cameron as the director?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "What are the names of reviewers who had rated 3 star and 4 star?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "What are the names of all reviewers that have given 3 or 4 stars for reviews?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "What are the names of movies that get 3 star and 4 star?\nAdditional table information: table: movie_1"} -{"question": "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", "answer": "What are the names of all movies that received 3 or 4 stars?\nAdditional table information: table: movie_1"} -{"question": "SELECT COUNT(*) FROM county_public_safety", "answer": "How many counties are there?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT COUNT(*) FROM county_public_safety", "answer": "Count the number of countries.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Name FROM county_public_safety ORDER BY Population DESC", "answer": "List the names of counties in descending order of population.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Name FROM county_public_safety ORDER BY Population DESC", "answer": "What are the names of the counties of public safety, ordered by population descending?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> 'East'", "answer": "List the distinct police forces of counties whose location is not on east side.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> 'East'", "answer": "What are the different police forces of counties that are not located in the East?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT MIN(Crime_rate), MAX(Crime_rate) FROM county_public_safety", "answer": "What are the minimum and maximum crime rate of counties?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT MIN(Crime_rate), MAX(Crime_rate) FROM county_public_safety", "answer": "Return the minimum and maximum crime rates across all counties.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC NULLS FIRST", "answer": "Show the crime rates of counties in ascending order of number of police officers.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC NULLS FIRST", "answer": "What are the crime rates of counties sorted by number of offices ascending?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Name FROM city ORDER BY Name ASC NULLS FIRST", "answer": "What are the names of cities in ascending alphabetical order?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Name FROM city ORDER BY Name ASC NULLS FIRST", "answer": "Return the names of cities, ordered alphabetically.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Hispanic FROM city WHERE Black > 10", "answer": "What are the percentage of hispanics in cities with the black percentage higher than 10?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Hispanic FROM city WHERE Black > 10", "answer": "Return the hispanic percentage for cities in which the black percentage is greater than 10.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1", "answer": "List the name of the county with the largest population.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1", "answer": "What is the name of the county with the greatest population?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Name FROM city ORDER BY White DESC LIMIT 5", "answer": "List the names of the city with the top 5 white percentages.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Name FROM city ORDER BY White DESC LIMIT 5", "answer": "What are the names of the five cities with the greatest proportion of white people?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT T1.Name, T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "answer": "Show names of cities and names of counties they are in.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT T1.Name, T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "answer": "What are the names of cities, as well as the names of the counties they correspond to?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT T1.White, T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "answer": "Show white percentages of cities and the crime rates of counties they are in.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT T1.White, T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "answer": "What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)", "answer": "Show the name of cities in the county that has the largest number of police officers.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)", "answer": "What are the names of cities that are in the county with the most police officers?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT COUNT(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000)", "answer": "Show the number of cities in counties that have a population more than 20000.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT COUNT(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000)", "answer": "How many cities are in counties that have populations of over 20000?\nAdditional table information: table: county_public_safety"} -{"question": "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", "answer": "Show the crime rate of counties with a city having white percentage more than 90.\nAdditional table information: table: county_public_safety"} -{"question": "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", "answer": "What are the crime rates of counties that contain cities that have white percentages of over 90?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force", "answer": "Please show the police forces and the number of counties with each police force.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force", "answer": "How many counties correspond to each police force?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the location shared by most counties?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which location has the most corresponding counties?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Name FROM county_public_safety WHERE NOT County_ID IN (SELECT County_ID FROM city)", "answer": "List the names of counties that do not have any cities.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Name FROM county_public_safety WHERE NOT County_ID IN (SELECT County_ID FROM city)", "answer": "What are the names of counties that do not contain any cities?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Police_force FROM county_public_safety WHERE LOCATION = 'East' INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = 'West'", "answer": "Show the police force shared by counties with location on the east and west.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Police_force FROM county_public_safety WHERE LOCATION = 'East' INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = 'West'", "answer": "Which police forces operate in both counties that are located in the East and in the West?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100)", "answer": "Show the names of cities in counties that have a crime rate less than 100.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100)", "answer": "What are the names of cities that are in counties that have a crime rate below 100?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Case_burden FROM county_public_safety ORDER BY Population DESC", "answer": "Show the case burden of counties in descending order of population.\nAdditional table information: table: county_public_safety"} -{"question": "SELECT Case_burden FROM county_public_safety ORDER BY Population DESC", "answer": "What are the case burdens of counties, ordered descending by population?\nAdditional table information: table: county_public_safety"} -{"question": "SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern'", "answer": "Find the names of all modern rooms with a base price below $160 and two beds.\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern'", "answer": "What are the names of modern rooms that have a base price lower than $160 and two beds.\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName, RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2", "answer": "Find all the rooms that have a price higher than 160 and can accommodate more than 2 people. Report room names and ids.\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName, RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2", "answer": "What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people.\nAdditional table information: table: inn_1"} -{"question": "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", "answer": "Find the most popular room in the hotel. The most popular room is the room that had seen the largest number of reservations.\nAdditional table information: table: inn_1"} -{"question": "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", "answer": "Which room has the largest number of reservations?\nAdditional table information: table: inn_1"} -{"question": "SELECT kids FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY'", "answer": "How many kids stay in the rooms reserved by ROY SWEAZY?\nAdditional table information: table: inn_1"} -{"question": "SELECT kids FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY'", "answer": "Find the number of kids staying in the rooms reserved by a person called ROY SWEAZ.\nAdditional table information: table: inn_1"} -{"question": "SELECT COUNT(*) FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY'", "answer": "How many times does ROY SWEAZY has reserved a room.\nAdditional table information: table: inn_1"} -{"question": "SELECT COUNT(*) FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY'", "answer": "Find the number of times ROY SWEAZY has reserved a room.\nAdditional table information: table: inn_1"} -{"question": "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", "answer": "Which room has the highest rate? List the room's full name, rate, check in and check out date.\nAdditional table information: table: inn_1"} -{"question": "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", "answer": "Return the name, rate, check in and check out date for the room with the highest rate.\nAdditional table information: table: inn_1"} -{"question": "SELECT Adults FROM Reservations WHERE CheckIn = '2010-10-23' AND FirstName = 'CONRAD' AND LastName = 'SELBIG'", "answer": "How many adults stay in the room CONRAD SELBIG checked in on Oct 23, 2010?\nAdditional table information: table: inn_1"} -{"question": "SELECT Adults FROM Reservations WHERE CheckIn = '2010-10-23' AND FirstName = 'CONRAD' AND LastName = 'SELBIG'", "answer": "Find the number of adults for the room reserved and checked in by CONRAD SELBIG on Oct 23, 2010.\nAdditional table information: table: inn_1"} -{"question": "SELECT Kids FROM Reservations WHERE CheckIn = '2010-09-21' AND FirstName = 'DAMIEN' AND LastName = 'TRACHSEL'", "answer": "How many kids stay in the room DAMIEN TRACHSEL checked in on Sep 21, 2010?\nAdditional table information: table: inn_1"} -{"question": "SELECT Kids FROM Reservations WHERE CheckIn = '2010-09-21' AND FirstName = 'DAMIEN' AND LastName = 'TRACHSEL'", "answer": "Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on Sep 21, 2010.\nAdditional table information: table: inn_1"} -{"question": "SELECT SUM(beds) FROM Rooms WHERE bedtype = 'King'", "answer": "How many king beds are there?\nAdditional table information: table: inn_1"} -{"question": "SELECT SUM(beds) FROM Rooms WHERE bedtype = 'King'", "answer": "Find the total number of king beds available.\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName, decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice NULLS FIRST", "answer": "List the names and decor of rooms that have a king bed. Sort the list by their price.\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName, decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice NULLS FIRST", "answer": "What are the names and decor of rooms with a king bed? Sort them by their price\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName, basePrice FROM Rooms ORDER BY basePrice ASC NULLS FIRST LIMIT 1", "answer": "Which room has cheapest base price? List the room's name and the base price.\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName, basePrice FROM Rooms ORDER BY basePrice ASC NULLS FIRST LIMIT 1", "answer": "What are the room name and base price of the room with the lowest base price?\nAdditional table information: table: inn_1"} -{"question": "SELECT decor FROM Rooms WHERE roomName = 'Recluse and defiance'", "answer": "What is the decor of room Recluse and defiance?\nAdditional table information: table: inn_1"} -{"question": "SELECT decor FROM Rooms WHERE roomName = 'Recluse and defiance'", "answer": "Return the decor of the room named 'Recluse and defiance'.\nAdditional table information: table: inn_1"} -{"question": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType", "answer": "What is the average base price of different bed type? List bed type and average base price.\nAdditional table information: table: inn_1"} -{"question": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType", "answer": "For each bed type, find the average base price of different bed type.\nAdditional table information: table: inn_1"} -{"question": "SELECT SUM(maxOccupancy) FROM Rooms WHERE decor = 'modern'", "answer": "What is the total number of people who could stay in the modern rooms in this inn?\nAdditional table information: table: inn_1"} -{"question": "SELECT SUM(maxOccupancy) FROM Rooms WHERE decor = 'modern'", "answer": "How many people in total can stay in the modern rooms of this inn?\nAdditional table information: table: inn_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What kind of decor has the least number of reservations?\nAdditional table information: table: inn_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the least popular kind of decor?\nAdditional table information: table: inn_1"} -{"question": "SELECT COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids", "answer": "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.\nAdditional table information: table: inn_1"} -{"question": "SELECT COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids", "answer": "How many times the number of adults and kids staying in a room reached the maximum capacity of the room?\nAdditional table information: table: inn_1"} -{"question": "SELECT T1.firstname, T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0", "answer": "Find the first and last names of people who payed more than the rooms' base prices.\nAdditional table information: table: inn_1"} -{"question": "SELECT T1.firstname, T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0", "answer": "What are the first and last names of people who payed more than the rooms' base prices?\nAdditional table information: table: inn_1"} -{"question": "SELECT COUNT(*) FROM Rooms", "answer": "How many rooms are there?\nAdditional table information: table: inn_1"} -{"question": "SELECT COUNT(*) FROM Rooms", "answer": "What is the total number of rooms available in this inn?\nAdditional table information: table: inn_1"} -{"question": "SELECT COUNT(*) FROM Rooms WHERE bedType = 'King'", "answer": "Find the number of rooms with a king bed.\nAdditional table information: table: inn_1"} -{"question": "SELECT COUNT(*) FROM Rooms WHERE bedType = 'King'", "answer": "How many rooms have a king bed?\nAdditional table information: table: inn_1"} -{"question": "SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType", "answer": "Find the number of rooms for each bed type.\nAdditional table information: table: inn_1"} -{"question": "SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType", "answer": "What are the number of rooms for each bed type?\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1", "answer": "Find the name of the room with the maximum occupancy.\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1", "answer": "What is the name of the room that can accommodate the most people?\nAdditional table information: table: inn_1"} -{"question": "SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1", "answer": "Find the id and name of the most expensive base price room.\nAdditional table information: table: inn_1"} -{"question": "SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1", "answer": "Which room has the highest base price?\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName, bedType FROM Rooms WHERE decor = 'traditional'", "answer": "List the type of bed and name of all traditional rooms.\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName, bedType FROM Rooms WHERE decor = 'traditional'", "answer": "What are the bed type and name of all the rooms with traditional decor?\nAdditional table information: table: inn_1"} -{"question": "SELECT decor, COUNT(*) FROM Rooms WHERE bedType = 'King' GROUP BY decor", "answer": "Find the number of rooms with king bed for each decor type.\nAdditional table information: table: inn_1"} -{"question": "SELECT decor, COUNT(*) FROM Rooms WHERE bedType = 'King' GROUP BY decor", "answer": "How many rooms have king beds? Report the number for each decor type.\nAdditional table information: table: inn_1"} -{"question": "SELECT decor, AVG(basePrice), MIN(basePrice) FROM Rooms GROUP BY decor", "answer": "Find the average and minimum price of the rooms in different decor.\nAdditional table information: table: inn_1"} -{"question": "SELECT decor, AVG(basePrice), MIN(basePrice) FROM Rooms GROUP BY decor", "answer": "What is the average minimum and price of the rooms for each different decor.\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName FROM Rooms ORDER BY basePrice NULLS FIRST", "answer": "List the name of all rooms sorted by their prices.\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName FROM Rooms ORDER BY basePrice NULLS FIRST", "answer": "Sort all the rooms according to the price. Just report the room names.\nAdditional table information: table: inn_1"} -{"question": "SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor", "answer": "Find the number of rooms with price higher than 120 for different decor.\nAdditional table information: table: inn_1"} -{"question": "SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor", "answer": "How many rooms cost more than 120, for each different decor?\nAdditional table information: table: inn_1"} -{"question": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType", "answer": "For each bed type, find the average room price.\nAdditional table information: table: inn_1"} -{"question": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType", "answer": "What is the average base price of rooms, for each bed type?\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName FROM Rooms WHERE bedType = 'King' OR bedType = 'Queen'", "answer": "List the name of rooms with king or queen bed.\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName FROM Rooms WHERE bedType = 'King' OR bedType = 'Queen'", "answer": "What are the names of rooms that have either king or queen bed?\nAdditional table information: table: inn_1"} -{"question": "SELECT COUNT(DISTINCT bedType) FROM Rooms", "answer": "How many different types of beds are there?\nAdditional table information: table: inn_1"} -{"question": "SELECT COUNT(DISTINCT bedType) FROM Rooms", "answer": "Find the number of distinct bed types available in this inn.\nAdditional table information: table: inn_1"} -{"question": "SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3", "answer": "Find the name and id of the top 3 expensive rooms.\nAdditional table information: table: inn_1"} -{"question": "SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3", "answer": "What are the name and id of the three highest priced rooms?\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName FROM Rooms WHERE basePrice > (SELECT AVG(basePrice) FROM Rooms)", "answer": "Find the name of rooms whose price is higher than the average price.\nAdditional table information: table: inn_1"} -{"question": "SELECT roomName FROM Rooms WHERE basePrice > (SELECT AVG(basePrice) FROM Rooms)", "answer": "What are the name of rooms that cost more than the average.\nAdditional table information: table: inn_1"} -{"question": "SELECT COUNT(*) FROM rooms WHERE NOT roomid IN (SELECT DISTINCT room FROM reservations)", "answer": "Find the number of rooms that do not have any reservation.\nAdditional table information: table: inn_1"} -{"question": "SELECT COUNT(*) FROM rooms WHERE NOT roomid IN (SELECT DISTINCT room FROM reservations)", "answer": "How many rooms have not had any reservation yet?\nAdditional table information: table: inn_1"} -{"question": "SELECT T2.roomName, COUNT(*), T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room", "answer": "Return the name and number of reservations made for each of the rooms.\nAdditional table information: table: inn_1"} -{"question": "SELECT T2.roomName, COUNT(*), T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room", "answer": "For each room, find its name and the number of times reservations were made for it.\nAdditional table information: table: inn_1"} -{"question": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING COUNT(*) > 60", "answer": "Find the names of rooms that have been reserved for more than 60 times.\nAdditional table information: table: inn_1"} -{"question": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING COUNT(*) > 60", "answer": "What are the names of rooms whose reservation frequency exceeds 60 times?\nAdditional table information: table: inn_1"} -{"question": "SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150", "answer": "Find the name of rooms whose base price is between 120 and 150.\nAdditional table information: table: inn_1"} -{"question": "SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150", "answer": "Which rooms cost between 120 and 150? Give me the room names.\nAdditional table information: table: inn_1"} -{"question": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'", "answer": "Find the name of rooms booked by some customers whose first name contains ROY.\nAdditional table information: table: inn_1"} -{"question": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'", "answer": "What are the name of rooms booked by customers whose first name has 'ROY' in part?\nAdditional table information: table: inn_1"} -{"question": "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'", "answer": "what are the details of the cmi masters that have the cross reference code 'Tax'?\nAdditional table information: table: local_govt_mdm"} -{"question": "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", "answer": "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.\nAdditional table information: table: local_govt_mdm"} -{"question": "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", "answer": "How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n\nAdditional table information: table: local_govt_mdm"} -{"question": "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 NULLS FIRST", "answer": "What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id.\nAdditional table information: table: local_govt_mdm"} -{"question": "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", "answer": "Wat is the tax source system code and master customer id of the taxes related to each parking fine id?\nAdditional table information: table: local_govt_mdm"} -{"question": "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'", "answer": "What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'?\nAdditional table information: table: local_govt_mdm"} -{"question": "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'", "answer": "What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'?\nAdditional table information: table: local_govt_mdm"} -{"question": "SELECT COUNT(DISTINCT source_system_code) FROM CMI_cross_references", "answer": "How many different source system code for the cmi cross references are there?\nAdditional table information: table: local_govt_mdm"} -{"question": "SELECT * FROM customer_master_index ORDER BY cmi_details DESC", "answer": "List all information about customer master index, and sort them by details in descending order.\nAdditional table information: table: local_govt_mdm"} -{"question": "SELECT council_tax_id, cmi_cross_ref_id FROM parking_fines", "answer": "List the council tax ids and their related cmi cross references of all the parking fines.\nAdditional table information: table: local_govt_mdm"} -{"question": "SELECT COUNT(*) FROM rent_arrears", "answer": "How many council taxes are collected for renting arrears ?\nAdditional table information: table: local_govt_mdm"} -{"question": "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'", "answer": "What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'?\nAdditional table information: table: local_govt_mdm"} -{"question": "SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines", "answer": "Which cmi cross reference id is not related to any parking taxes?\nAdditional table information: table: local_govt_mdm"} -{"question": "SELECT DISTINCT source_system_code FROM cmi_cross_references WHERE source_system_code LIKE '%en%'", "answer": "Which distinct source system code includes the substring 'en'?\nAdditional table information: table: local_govt_mdm"} -{"question": "SELECT COUNT(*) FROM party", "answer": "How many parties are there?\nAdditional table information: table: party_host"} -{"question": "SELECT COUNT(*) FROM party", "answer": "Count the number of parties.\nAdditional table information: table: party_host"} -{"question": "SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC NULLS FIRST", "answer": "List the themes of parties in ascending order of number of hosts.\nAdditional table information: table: party_host"} -{"question": "SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC NULLS FIRST", "answer": "What are the themes of parties ordered by the number of hosts in ascending manner?\nAdditional table information: table: party_host"} -{"question": "SELECT Party_Theme, LOCATION FROM party", "answer": "What are the themes and locations of parties?\nAdditional table information: table: party_host"} -{"question": "SELECT Party_Theme, LOCATION FROM party", "answer": "Give me the theme and location of each party.\nAdditional table information: table: party_host"} -{"question": "SELECT First_year, Last_year FROM party WHERE Party_Theme = 'Spring' OR Party_Theme = 'Teqnology'", "answer": "Show the first year and last year of parties with theme 'Spring' or 'Teqnology'.\nAdditional table information: table: party_host"} -{"question": "SELECT First_year, Last_year FROM party WHERE Party_Theme = 'Spring' OR Party_Theme = 'Teqnology'", "answer": "What are the first year and last year of the parties whose theme is 'Spring' or 'Teqnology'?\nAdditional table information: table: party_host"} -{"question": "SELECT AVG(Number_of_hosts) FROM party", "answer": "What is the average number of hosts for parties?\nAdditional table information: table: party_host"} -{"question": "SELECT AVG(Number_of_hosts) FROM party", "answer": "Compute the average number of hosts for parties.\nAdditional table information: table: party_host"} -{"question": "SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1", "answer": "What is the location of the party with the most hosts?\nAdditional table information: table: party_host"} -{"question": "SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1", "answer": "Which party had the most hosts? Give me the party location.\nAdditional table information: table: party_host"} -{"question": "SELECT Nationality, COUNT(*) FROM HOST GROUP BY Nationality", "answer": "Show different nationalities along with the number of hosts of each nationality.\nAdditional table information: table: party_host"} -{"question": "SELECT Nationality, COUNT(*) FROM HOST GROUP BY Nationality", "answer": "How many hosts does each nationality have? List the nationality and the count.\nAdditional table information: table: party_host"} -{"question": "SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common nationality of hosts.\nAdditional table information: table: party_host"} -{"question": "SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which nationality has the most hosts?\nAdditional table information: table: party_host"} -{"question": "SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35", "answer": "Show the nations that have both hosts older than 45 and hosts younger than 35.\nAdditional table information: table: party_host"} -{"question": "SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35", "answer": "Which nations have both hosts of age above 45 and hosts of age below 35?\nAdditional table information: table: party_host"} -{"question": "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", "answer": "Show the themes of parties and the names of the party hosts.\nAdditional table information: table: party_host"} -{"question": "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", "answer": "For each party, return its theme and the name of its host.\nAdditional table information: table: party_host"} -{"question": "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 NULLS FIRST", "answer": "Show the locations of parties and the names of the party hosts in ascending order of the age of the host.\nAdditional table information: table: party_host"} -{"question": "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 NULLS FIRST", "answer": "For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host.\nAdditional table information: table: party_host"} -{"question": "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", "answer": "Show the locations of parties with hosts older than 50.\nAdditional table information: table: party_host"} -{"question": "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", "answer": "Which parties have hosts of age above 50? Give me the party locations.\nAdditional table information: table: party_host"} -{"question": "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", "answer": "Show the host names for parties with number of hosts greater than 20.\nAdditional table information: table: party_host"} -{"question": "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", "answer": "Which parties have more than 20 hosts? Give me the host names for these parties.\nAdditional table information: table: party_host"} -{"question": "SELECT Name, Nationality FROM HOST ORDER BY Age DESC LIMIT 1", "answer": "Show the name and the nationality of the oldest host.\nAdditional table information: table: party_host"} -{"question": "SELECT Name, Nationality FROM HOST ORDER BY Age DESC LIMIT 1", "answer": "What are the name and the nationality of the host of the highest age?\nAdditional table information: table: party_host"} -{"question": "SELECT Name FROM HOST WHERE NOT Host_ID IN (SELECT Host_ID FROM party_host)", "answer": "List the names of hosts who did not serve as a host of any party in our record.\nAdditional table information: table: party_host"} -{"question": "SELECT Name FROM HOST WHERE NOT Host_ID IN (SELECT Host_ID FROM party_host)", "answer": "What are the names of hosts who did not host any party in our record?\nAdditional table information: table: party_host"} -{"question": "SELECT COUNT(*) FROM region", "answer": "How many regions do we have?\nAdditional table information: table: storm_record"} -{"question": "SELECT COUNT(*) FROM region", "answer": "Count the number of regions.\nAdditional table information: table: storm_record"} -{"question": "SELECT region_code, region_name FROM region ORDER BY region_code NULLS FIRST", "answer": "Show all region code and region name sorted by the codes.\nAdditional table information: table: storm_record"} -{"question": "SELECT region_code, region_name FROM region ORDER BY region_code NULLS FIRST", "answer": "What are the codes and names for all regions, sorted by codes?\nAdditional table information: table: storm_record"} -{"question": "SELECT region_name FROM region ORDER BY region_name NULLS FIRST", "answer": "List all region names in alphabetical order.\nAdditional table information: table: storm_record"} -{"question": "SELECT region_name FROM region ORDER BY region_name NULLS FIRST", "answer": "What are the names of the regions in alphabetical order?\nAdditional table information: table: storm_record"} -{"question": "SELECT region_name FROM region WHERE region_name <> 'Denmark'", "answer": "Show names for all regions except for Denmark.\nAdditional table information: table: storm_record"} -{"question": "SELECT region_name FROM region WHERE region_name <> 'Denmark'", "answer": "Return the names of all regions other than Denmark.\nAdditional table information: table: storm_record"} -{"question": "SELECT COUNT(*) FROM storm WHERE Number_Deaths > 0", "answer": "How many storms had death records?\nAdditional table information: table: storm_record"} -{"question": "SELECT COUNT(*) FROM storm WHERE Number_Deaths > 0", "answer": "Count the number of storms in which at least 1 person died.\nAdditional table information: table: storm_record"} -{"question": "SELECT name, dates_active, number_deaths FROM storm WHERE number_deaths >= 1", "answer": "List name, dates active, and number of deaths for all storms with at least 1 death.\nAdditional table information: table: storm_record"} -{"question": "SELECT name, dates_active, number_deaths FROM storm WHERE number_deaths >= 1", "answer": "What are the names, dates active, and number of deaths for storms that had 1 or more death?\nAdditional table information: table: storm_record"} -{"question": "SELECT AVG(damage_millions_USD), MAX(damage_millions_USD) FROM storm WHERE max_speed > 1000", "answer": "Show the average and maximum damage for all storms with max speed higher than 1000.\nAdditional table information: table: storm_record"} -{"question": "SELECT AVG(damage_millions_USD), MAX(damage_millions_USD) FROM storm WHERE max_speed > 1000", "answer": "What is the average and maximum damage in millions for storms that had a max speed over 1000?\nAdditional table information: table: storm_record"} -{"question": "SELECT SUM(number_deaths), SUM(damage_millions_USD) FROM storm WHERE max_speed > (SELECT AVG(max_speed) FROM storm)", "answer": "What is the total number of deaths and damage for all storms with a max speed greater than the average?\nAdditional table information: table: storm_record"} -{"question": "SELECT SUM(number_deaths), SUM(damage_millions_USD) FROM storm WHERE max_speed > (SELECT AVG(max_speed) FROM storm)", "answer": "Return the total number of deaths and total damange in millions for storms that had a max speed greater than the average.\nAdditional table information: table: storm_record"} -{"question": "SELECT name, damage_millions_USD FROM storm ORDER BY max_speed DESC", "answer": "List name and damage for all storms in a descending order of max speed.\nAdditional table information: table: storm_record"} -{"question": "SELECT name, damage_millions_USD FROM storm ORDER BY max_speed DESC", "answer": "What are the names and damage in millions for storms, ordered by their max speeds descending?\nAdditional table information: table: storm_record"} -{"question": "SELECT COUNT(DISTINCT region_id) FROM affected_region", "answer": "How many regions are affected?\nAdditional table information: table: storm_record"} -{"question": "SELECT COUNT(DISTINCT region_id) FROM affected_region", "answer": "Count the number of different affected regions.\nAdditional table information: table: storm_record"} -{"question": "SELECT region_name FROM region WHERE NOT region_id IN (SELECT region_id FROM affected_region)", "answer": "Show the name for regions not affected.\nAdditional table information: table: storm_record"} -{"question": "SELECT region_name FROM region WHERE NOT region_id IN (SELECT region_id FROM affected_region)", "answer": "What are the names of regions that were not affected?\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "Show the name for regions and the number of storms for each region.\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "How many storms occured in each region?\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "List the name for storms and the number of affected regions for each storm.\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "How many regions were affected by each storm?\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "What is the storm name and max speed which affected the greatest number of regions?\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "Return the name and max speed of the storm that affected the most regions.\nAdditional table information: table: storm_record"} -{"question": "SELECT name FROM storm WHERE NOT storm_id IN (SELECT storm_id FROM affected_region)", "answer": "Show the name of storms which don't have affected region in record.\nAdditional table information: table: storm_record"} -{"question": "SELECT name FROM storm WHERE NOT storm_id IN (SELECT storm_id FROM affected_region)", "answer": "What are the names of storms that did not affect any regions?\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "Show storm name with at least two regions and 10 cities affected.\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "What are the names of storms that both affected two or more regions and affected a total of 10 or more cities?\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "Show all storm names except for those with at least two affected regions.\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "What are the names of storms that did not affect two or more regions?\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "What are the region names affected by the storm with a number of deaths of least 10?\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "Return the names of the regions affected by storms that had a death count of at least 10.\nAdditional table information: table: storm_record"} -{"question": "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'", "answer": "Show all storm names affecting region 'Denmark'.\nAdditional table information: table: storm_record"} -{"question": "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'", "answer": "What are the names of the storms that affected Denmark?\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "Show the region name with at least two storms.\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "What are the names of regions with two or more storms?\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "Find the names of the regions which were affected by the storm that killed the greatest number of people.\nAdditional table information: table: storm_record"} -{"question": "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", "answer": "What are the names of regions that were affected by the storm in which the most people died?\nAdditional table information: table: storm_record"} -{"question": "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'", "answer": "Find the name of the storm that affected both Afghanistan and Albania regions.\nAdditional table information: table: storm_record"} -{"question": "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'", "answer": "What are the names of the storms that affected both the regions of Afghanistan and Albania?\nAdditional table information: table: storm_record"} -{"question": "SELECT COUNT(*) FROM county", "answer": "How many counties are there in total?\nAdditional table information: table: election"} -{"question": "SELECT COUNT(*) FROM county", "answer": "Count the total number of counties.\nAdditional table information: table: election"} -{"question": "SELECT County_name, Population FROM county", "answer": "Show the county name and population of all counties.\nAdditional table information: table: election"} -{"question": "SELECT County_name, Population FROM county", "answer": "What are the name and population of each county?\nAdditional table information: table: election"} -{"question": "SELECT AVG(Population) FROM county", "answer": "Show the average population of all counties.\nAdditional table information: table: election"} -{"question": "SELECT AVG(Population) FROM county", "answer": "On average how large is the population of the counties?\nAdditional table information: table: election"} -{"question": "SELECT MAX(Population), MIN(Population) FROM county", "answer": "Return the maximum and minimum population among all counties.\nAdditional table information: table: election"} -{"question": "SELECT MAX(Population), MIN(Population) FROM county", "answer": "What are the maximum and minimum population of the counties?\nAdditional table information: table: election"} -{"question": "SELECT DISTINCT District FROM election", "answer": "Show all the distinct districts for elections.\nAdditional table information: table: election"} -{"question": "SELECT DISTINCT District FROM election", "answer": "What are the distinct districts for elections?\nAdditional table information: table: election"} -{"question": "SELECT Zip_code FROM county WHERE County_name = 'Howard'", "answer": "Show the zip code of the county with name 'Howard'.\nAdditional table information: table: election"} -{"question": "SELECT Zip_code FROM county WHERE County_name = 'Howard'", "answer": "What is the zip code the county named 'Howard' is located in?\nAdditional table information: table: election"} -{"question": "SELECT Delegate FROM election WHERE District = 1", "answer": "Show the delegate from district 1 in election.\nAdditional table information: table: election"} -{"question": "SELECT Delegate FROM election WHERE District = 1", "answer": "Who is the delegate of district 1 in the elections?\nAdditional table information: table: election"} -{"question": "SELECT Delegate, Committee FROM election", "answer": "Show the delegate and committee information of elections.\nAdditional table information: table: election"} -{"question": "SELECT Delegate, Committee FROM election", "answer": "What are the delegate and committee information for each election record?\nAdditional table information: table: election"} -{"question": "SELECT COUNT(DISTINCT Governor) FROM party", "answer": "How many distinct governors are there?\nAdditional table information: table: election"} -{"question": "SELECT COUNT(DISTINCT Governor) FROM party", "answer": "Count the number of distinct governors.\nAdditional table information: table: election"} -{"question": "SELECT Lieutenant_Governor, Comptroller FROM party WHERE Party = 'Democratic'", "answer": "Show the lieutenant governor and comptroller from the democratic party.\nAdditional table information: table: election"} -{"question": "SELECT Lieutenant_Governor, Comptroller FROM party WHERE Party = 'Democratic'", "answer": "Who are the lieutenant governor and comptroller from the democratic party?\nAdditional table information: table: election"} -{"question": "SELECT DISTINCT YEAR FROM party WHERE Governor = 'Eliot Spitzer'", "answer": "In which distinct years was the governor 'Eliot Spitzer'?\nAdditional table information: table: election"} -{"question": "SELECT DISTINCT YEAR FROM party WHERE Governor = 'Eliot Spitzer'", "answer": "Find the distinct years when the governor was named 'Eliot Spitzer'.\nAdditional table information: table: election"} -{"question": "SELECT * FROM election", "answer": "Show all the information about election.\nAdditional table information: table: election"} -{"question": "SELECT * FROM election", "answer": "Return all the information for each election record.\nAdditional table information: table: election"} -{"question": "SELECT T2.Delegate, T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District", "answer": "Show the delegates and the names of county they belong to.\nAdditional table information: table: election"} -{"question": "SELECT T2.Delegate, T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District", "answer": "What are the delegate and name of the county they belong to, for each county?\nAdditional table information: table: election"} -{"question": "SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000", "answer": "Which delegates are from counties with population smaller than 100000?\nAdditional table information: table: election"} -{"question": "SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000", "answer": "Find the delegates who are from counties with population below 100000.\nAdditional table information: table: election"} -{"question": "SELECT COUNT(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000", "answer": "How many distinct delegates are from counties with population larger than 50000?\nAdditional table information: table: election"} -{"question": "SELECT COUNT(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000", "answer": "Count the number of distinct delegates who are from counties with population above 50000.\nAdditional table information: table: election"} -{"question": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = 'Appropriations'", "answer": "What are the names of the county that the delegates on 'Appropriations' committee belong to?\nAdditional table information: table: election"} -{"question": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = 'Appropriations'", "answer": "Which county do the delegates on 'Appropriations' committee belong to? Give me the county names.\nAdditional table information: table: election"} -{"question": "SELECT T1.Delegate, T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID", "answer": "Show the delegates and the names of the party they belong to.\nAdditional table information: table: election"} -{"question": "SELECT T1.Delegate, T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID", "answer": "For each delegate, find the names of the party they are part of.\nAdditional table information: table: election"} -{"question": "SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1", "answer": "Who were the governors of the parties associated with delegates from district 1?\nAdditional table information: table: election"} -{"question": "SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1", "answer": "Find the parties associated with the delegates from district 1. Who served as governors of the parties?\nAdditional table information: table: election"} -{"question": "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", "answer": "Who were the comptrollers of the parties associated with the delegates from district 1 or district 2?\nAdditional table information: table: election"} -{"question": "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", "answer": "Find the parties associated with the delegates from district 1 or 2. Who served as comptrollers of the parties?\nAdditional table information: table: election"} -{"question": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic'", "answer": "Return all the committees that have delegates from Democratic party.\nAdditional table information: table: election"} -{"question": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic'", "answer": "Which committees have delegates from the Democratic party?\nAdditional table information: table: election"} -{"question": "SELECT T1.County_name, COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id", "answer": "Show the name of each county along with the corresponding number of delegates from that county.\nAdditional table information: table: election"} -{"question": "SELECT T1.County_name, COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id", "answer": "For each county, find the name of the county and the number of delegates from that county.\nAdditional table information: table: election"} -{"question": "SELECT T2.Party, COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party", "answer": "Show the name of each party and the corresponding number of delegates from that party.\nAdditional table information: table: election"} -{"question": "SELECT T2.Party, COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party", "answer": "For each party, return the name of the party and the number of delegates from that party.\nAdditional table information: table: election"} -{"question": "SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST", "answer": "Return the names of all counties sorted by population in ascending order.\nAdditional table information: table: election"} -{"question": "SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST", "answer": "Sort the names of all counties in ascending order of population.\nAdditional table information: table: election"} -{"question": "SELECT County_name FROM county ORDER BY County_name DESC", "answer": "Return the names of all counties sorted by county name in descending alphabetical order.\nAdditional table information: table: election"} -{"question": "SELECT County_name FROM county ORDER BY County_name DESC", "answer": "Sort the names of all counties in descending alphabetical order.\nAdditional table information: table: election"} -{"question": "SELECT County_name FROM county ORDER BY Population DESC LIMIT 1", "answer": "Show the name of the county with the biggest population.\nAdditional table information: table: election"} -{"question": "SELECT County_name FROM county ORDER BY Population DESC LIMIT 1", "answer": "Which county has the largest population? Give me the name of the county.\nAdditional table information: table: election"} -{"question": "SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST LIMIT 3", "answer": "Show the 3 counties with the smallest population.\nAdditional table information: table: election"} -{"question": "SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST LIMIT 3", "answer": "What are the 3 counties that have the smallest population? Give me the county names.\nAdditional table information: table: election"} -{"question": "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", "answer": "Show the names of counties that have at least two delegates.\nAdditional table information: table: election"} -{"question": "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", "answer": "Which counties have two or more delegates? Give me the county names.\nAdditional table information: table: election"} -{"question": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2", "answer": "Show the name of the party that has at least two records.\nAdditional table information: table: election"} -{"question": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2", "answer": "Which party has two or more records?\nAdditional table information: table: election"} -{"question": "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", "answer": "Show the name of the party that has the most delegates.\nAdditional table information: table: election"} -{"question": "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", "answer": "Which party has the largest number of delegates?\nAdditional table information: table: election"} -{"question": "SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the people that have been governor the most times.\nAdditional table information: table: election"} -{"question": "SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which people severed as governor most frequently?\nAdditional table information: table: election"} -{"question": "SELECT Comptroller, COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the people that have been comptroller the most times and the corresponding number of times.\nAdditional table information: table: election"} -{"question": "SELECT Comptroller, COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which people severed as comptroller most frequently? Give me the name of the person and the frequency count.\nAdditional table information: table: election"} -{"question": "SELECT Party FROM party WHERE NOT Party_ID IN (SELECT Party FROM election)", "answer": "What are the names of parties that do not have delegates in election?\nAdditional table information: table: election"} -{"question": "SELECT Party FROM party WHERE NOT Party_ID IN (SELECT Party FROM election)", "answer": "Which parties did not have any delegates in elections?\nAdditional table information: table: election"} -{"question": "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'", "answer": "What are the names of parties that have both delegates on 'Appropriations' committee and\nAdditional table information: table: election"} -{"question": "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'", "answer": "Which parties have delegates in both the 'Appropriations' committee and the 'Economic Matters' committee?\nAdditional table information: table: election"} -{"question": "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'", "answer": "Which committees have delegates from both democratic party and liberal party?\nAdditional table information: table: election"} -{"question": "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'", "answer": "Find the committees that have delegates both from from the democratic party and the liberal party.\nAdditional table information: table: election"} -{"question": "SELECT COUNT(*) FROM journalist", "answer": "How many journalists are there?\nAdditional table information: table: news_report"} -{"question": "SELECT Name FROM journalist ORDER BY Years_working ASC NULLS FIRST", "answer": "List the names of journalists in ascending order of years working.\nAdditional table information: table: news_report"} -{"question": "SELECT Nationality, Age FROM journalist", "answer": "What are the nationalities and ages of journalists?\nAdditional table information: table: news_report"} -{"question": "SELECT Name FROM journalist WHERE Nationality = 'England' OR Nationality = 'Wales'", "answer": "Show the names of journalists from 'England' or 'Wales'.\nAdditional table information: table: news_report"} -{"question": "SELECT AVG(Years_working) FROM journalist", "answer": "What is the average number of years spent working as a journalist?\nAdditional table information: table: news_report"} -{"question": "SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1", "answer": "What is the nationality of the journalist with the largest number of years working?\nAdditional table information: table: news_report"} -{"question": "SELECT Nationality, COUNT(*) FROM journalist GROUP BY Nationality", "answer": "Show the different nationalities and the number of journalists of each nationality.\nAdditional table information: table: news_report"} -{"question": "SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common nationality for journalists.\nAdditional table information: table: news_report"} -{"question": "SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3", "answer": "Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.\nAdditional table information: table: news_report"} -{"question": "SELECT Date, Name, venue FROM event ORDER BY Event_Attendance DESC", "answer": "Show the dates, places, and names of events in descending order of the attendance.\nAdditional table information: table: news_report"} -{"question": "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", "answer": "Show the names of journalists and the dates of the events they reported.\nAdditional table information: table: news_report"} -{"question": "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 NULLS FIRST", "answer": "Show the names of journalists and the names of the events they reported in ascending order\nAdditional table information: table: news_report"} -{"question": "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", "answer": "Show the names of journalists and the number of events they reported.\nAdditional table information: table: news_report"} -{"question": "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", "answer": "Show the names of journalists that have reported more than one event.\nAdditional table information: table: news_report"} -{"question": "SELECT Name FROM journalist WHERE NOT journalist_ID IN (SELECT journalist_ID FROM news_report)", "answer": "List the names of journalists who have not reported any event.\nAdditional table information: table: news_report"} -{"question": "SELECT AVG(Event_Attendance), MAX(Event_Attendance) FROM event", "answer": "what are the average and maximum attendances of all events?\nAdditional table information: table: news_report"} -{"question": "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", "answer": "Find the average age and experience working length of journalists working on different role type.\nAdditional table information: table: news_report"} -{"question": "SELECT venue, name FROM event ORDER BY Event_Attendance DESC LIMIT 2", "answer": "List the event venues and names that have the top 2 most number of people attended.\nAdditional table information: table: news_report"} -{"question": "SELECT ResName FROM Restaurant", "answer": "Show me all the restaurants.\nAdditional table information: table: restaurant_1"} -{"question": "SELECT Address FROM Restaurant WHERE ResName = 'Subway'", "answer": "What is the address of the restaurant Subway?\nAdditional table information: table: restaurant_1"} -{"question": "SELECT Rating FROM Restaurant WHERE ResName = 'Subway'", "answer": "What is the rating of the restaurant Subway?\nAdditional table information: table: restaurant_1"} -{"question": "SELECT ResTypeName FROM Restaurant_Type", "answer": "List all restaurant types.\nAdditional table information: table: restaurant_1"} -{"question": "SELECT ResTypeDescription FROM Restaurant_Type WHERE ResTypeName = 'Sandwich'", "answer": "What is the description of the restaurant type Sandwich?\nAdditional table information: table: restaurant_1"} -{"question": "SELECT ResName, Rating FROM Restaurant ORDER BY Rating DESC LIMIT 1", "answer": "Which restaurants have highest rating? List the restaurant name and its rating.\nAdditional table information: table: restaurant_1"} -{"question": "SELECT Age FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith'", "answer": "What is the age of student Linda Smith?\nAdditional table information: table: restaurant_1"} -{"question": "SELECT Sex FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith'", "answer": "What is the gender of the student Linda Smith?\nAdditional table information: table: restaurant_1"} -{"question": "SELECT Fname, Lname FROM Student WHERE Major = 600", "answer": "List all students' first names and last names who majored in 600.\nAdditional table information: table: restaurant_1"} -{"question": "SELECT city_code FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith'", "answer": "Which city does student Linda Smith live in?\nAdditional table information: table: restaurant_1"} -{"question": "SELECT COUNT(*) FROM Student WHERE Advisor = 1121", "answer": "Advisor 1121 has how many students?\nAdditional table information: table: restaurant_1"} -{"question": "SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor ORDER BY COUNT(Advisor) DESC LIMIT 1", "answer": "Which Advisor has most of students? List advisor and the number of students.\nAdditional table information: table: restaurant_1"} -{"question": "SELECT Major, COUNT(*) FROM Student GROUP BY Major ORDER BY COUNT(Major) ASC NULLS FIRST LIMIT 1", "answer": "Which major has least number of students? List the major and the number of students.\nAdditional table information: table: restaurant_1"} -{"question": "SELECT Major, COUNT(*) FROM Student GROUP BY Major HAVING COUNT(Major) BETWEEN 2 AND 30", "answer": "Which major has between 2 and 30 number of students? List major and the number of students.\nAdditional table information: table: restaurant_1"} -{"question": "SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major = 600", "answer": "Which student's age is older than 18 and is majoring in 600? List each student's first and last name.\nAdditional table information: table: restaurant_1"} -{"question": "SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major <> 600 AND Sex = 'F'", "answer": "List all female students age is older than 18 who is not majoring in 600. List students' first name and last name.\nAdditional table information: table: restaurant_1"} -{"question": "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'", "answer": "How many restaurant is the Sandwich type restaurant?\nAdditional table information: table: restaurant_1"} -{"question": "SELECT SUM(Spent) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID WHERE Student.Fname = 'Linda' AND Student.Lname = 'Smith'", "answer": "How long does student Linda Smith spend on the restaurant in total?\nAdditional table information: table: restaurant_1"} -{"question": "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'", "answer": "How many times has the student Linda Smith visited Subway?\nAdditional table information: table: restaurant_1"} -{"question": "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'", "answer": "When did Linda Smith visit Subway?\nAdditional table information: table: restaurant_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.\nAdditional table information: table: restaurant_1"} -{"question": "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", "answer": "Which student visited restaurant most often? List student's first name and last name.\nAdditional table information: table: restaurant_1"} -{"question": "SELECT actual_order_id FROM actual_orders WHERE order_status_code = 'Success'", "answer": "Find the ids of orders whose status is 'Success'.\nAdditional table information: table: customer_deliveries"} -{"question": "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", "answer": "Find the name and price of the product that has been ordered the greatest number of times.\nAdditional table information: table: customer_deliveries"} -{"question": "SELECT COUNT(*) FROM customers", "answer": "Find the number of customers in total.\nAdditional table information: table: customer_deliveries"} -{"question": "SELECT COUNT(DISTINCT payment_method) FROM customers", "answer": "How many different payment methods are there?\nAdditional table information: table: customer_deliveries"} -{"question": "SELECT truck_details FROM trucks ORDER BY truck_licence_number NULLS FIRST", "answer": "Show the details of all trucks in the order of their license number.\nAdditional table information: table: customer_deliveries"} -{"question": "SELECT product_name FROM products ORDER BY product_price DESC LIMIT 1", "answer": "Find the name of the most expensive product.\nAdditional table information: table: customer_deliveries"} -{"question": "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'", "answer": "Find the names of customers who are not living in the state of California.\nAdditional table information: table: customer_deliveries"} -{"question": "SELECT customer_email, customer_name FROM customers WHERE payment_method = 'Visa'", "answer": "List the names and emails of customers who payed by Visa card.\nAdditional table information: table: customer_deliveries"} -{"question": "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'", "answer": "Find the names and phone numbers of customers living in California state.\nAdditional table information: table: customer_deliveries"} -{"question": "SELECT state_province_county FROM addresses WHERE NOT address_id IN (SELECT employee_address_id FROM Employees)", "answer": "Find the states which do not have any employee in their record.\nAdditional table information: table: customer_deliveries"} -{"question": "SELECT customer_name, customer_phone, customer_email FROM Customers ORDER BY date_became_customer NULLS FIRST", "answer": "List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers.\nAdditional table information: table: customer_deliveries"} -{"question": "SELECT customer_name FROM Customers ORDER BY date_became_customer NULLS FIRST LIMIT 5", "answer": "Find the name of the first 5 customers.\nAdditional table information: table: customer_deliveries"} -{"question": "SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the payment method that is used most frequently.\nAdditional table information: table: customer_deliveries"} -{"question": "SELECT route_name FROM Delivery_Routes ORDER BY route_name NULLS FIRST", "answer": "List the names of all routes in alphabetic order.\nAdditional table information: table: customer_deliveries"} -{"question": "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", "answer": "Find the name of route that has the highest number of deliveries.\nAdditional table information: table: customer_deliveries"} -{"question": "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", "answer": "List the state names and the number of customers living in each state.\nAdditional table information: table: customer_deliveries"} -{"question": "SELECT COUNT(*) FROM authors", "answer": "How many authors are there?\nAdditional table information: table: icfp_1"} -{"question": "SELECT COUNT(*) FROM authors", "answer": "Count the number of authors.\nAdditional table information: table: icfp_1"} -{"question": "SELECT COUNT(*) FROM inst", "answer": "How many institutions are there?\nAdditional table information: table: icfp_1"} -{"question": "SELECT COUNT(*) FROM inst", "answer": "Count the number of institutions.\nAdditional table information: table: icfp_1"} -{"question": "SELECT COUNT(*) FROM papers", "answer": "How many papers are published in total?\nAdditional table information: table: icfp_1"} -{"question": "SELECT COUNT(*) FROM papers", "answer": "Count the number of total papers.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "What are the titles of papers published by 'Jeremy Gibbons'?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Find the titles of all the papers written by 'Jeremy Gibbons'\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Find all the papers published by 'Aaron Turon'.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Find the titles of all the papers written by 'Aaron Turon'.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "How many papers have 'Atsushi Ohori' published?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "How many papers are 'Atsushi Ohori' the author of?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "What is the name of the institution that 'Matthias Blume' belongs to?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Which institution is the author 'Matthias Blume' belong to? Give me the name of the institution.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Which institution does 'Katsuhiro Ueno' belong to?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "What is the name of the institution the author 'Katsuhiro Ueno' belongs to?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Who belong to the institution 'University of Oxford'? Show the first names and last names.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Find the first names and last names of the authors whose institution affiliation is 'University of Oxford'.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Which authors belong to the institution 'Google'? Show the first names and last names.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Find the first names and last names of the authors whose institution affiliation is 'Google'.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "What are the last names of the author of the paper titled 'Binders Unbound'?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Who is the author of the paper titled 'Binders Unbound'? Give me the last name.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Find the first and last name of the author(s) who wrote the paper 'Nameless, Painless'.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "What are the first and last name of the author who published the paper titled 'Nameless, Painless'?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "What are the papers published under the institution 'Indiana University'?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "List the titles of the papers whose authors are from the institution 'Indiana University'.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Find all the papers published by the institution 'Google'.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Which papers were written by authors from the institution 'Google'?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "How many papers are published by the institution 'Tokohu University'?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Find the number of papers published by authors from the institution 'Tokohu University'.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Find the number of papers published by the institution 'University of Pennsylvania'.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "How many papers are written by authors from the institution 'University of Pennsylvania'?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Find the papers which have 'Olin Shivers' as an author.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Which papers did the author 'Olin Shivers' write? Give me the paper titles.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Which papers have 'Stephanie Weirich' as an author?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Find the titles of the papers the author 'Stephanie Weirich' wrote.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Which paper is published in an institution in 'USA' and have 'Turon' as its second author?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Find papers whose second author has last name 'Turon' and is affiliated with an institution in the country 'USA'.\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "Find the titles of papers whose first author is affiliated with an institution in the country 'Japan' and has last name 'Ohori'?\nAdditional table information: table: icfp_1"} -{"question": "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'", "answer": "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.\nAdditional table information: table: icfp_1"} -{"question": "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", "answer": "What is the last name of the author that has published the most papers?\nAdditional table information: table: icfp_1"} -{"question": "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", "answer": "Which author has written the most papers? Find his or her last name.\nAdditional table information: table: icfp_1"} -{"question": "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", "answer": "Retrieve the country that has published the most papers.\nAdditional table information: table: icfp_1"} -{"question": "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", "answer": "Find the country that the most papers are affiliated with.\nAdditional table information: table: icfp_1"} -{"question": "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", "answer": "Find the name of the organization that has published the largest number of papers.\nAdditional table information: table: icfp_1"} -{"question": "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", "answer": "Which institution has the most papers? Find the name of the institution.\nAdditional table information: table: icfp_1"} -{"question": "SELECT title FROM papers WHERE title LIKE '%ML%'", "answer": "Find the titles of the papers that contain the word 'ML'.\nAdditional table information: table: icfp_1"} -{"question": "SELECT title FROM papers WHERE title LIKE '%ML%'", "answer": "Which papers have the substring 'ML' in their titles? Return the titles of the papers.\nAdditional table information: table: icfp_1"} -{"question": "SELECT title FROM papers WHERE title LIKE '%Database%'", "answer": "Which paper's title contains the word 'Database'?\nAdditional table information: table: icfp_1"} -{"question": "SELECT title FROM papers WHERE title LIKE '%Database%'", "answer": "Which papers have the substring 'Database' in their titles? Show the titles of the papers.\nAdditional table information: table: icfp_1"} -{"question": "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%'", "answer": "Find the first names of all the authors who have written a paper with title containing the word 'Functional'.\nAdditional table information: table: icfp_1"} -{"question": "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%'", "answer": "Who has written a paper that has the word 'Functional' in its title? Return the first names of the authors.\nAdditional table information: table: icfp_1"} -{"question": "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%'", "answer": "Find the last names of all the authors that have written a paper with title containing the word 'Monadic'.\nAdditional table information: table: icfp_1"} -{"question": "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%'", "answer": "Which authors have written a paper with title containing the word 'Monadic'? Return their last names.\nAdditional table information: table: icfp_1"} -{"question": "SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship)", "answer": "Retrieve the title of the paper that has the largest number of authors.\nAdditional table information: table: icfp_1"} -{"question": "SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship)", "answer": "Which paper has the most authors? Give me the paper title.\nAdditional table information: table: icfp_1"} -{"question": "SELECT fname FROM authors WHERE lname = 'Ueno'", "answer": "What is the first name of the author with last name 'Ueno'?\nAdditional table information: table: icfp_1"} -{"question": "SELECT fname FROM authors WHERE lname = 'Ueno'", "answer": "Which authors have last name 'Ueno'? List their first names.\nAdditional table information: table: icfp_1"} -{"question": "SELECT lname FROM authors WHERE fname = 'Amal'", "answer": "Find the last name of the author with first name 'Amal'.\nAdditional table information: table: icfp_1"} -{"question": "SELECT lname FROM authors WHERE fname = 'Amal'", "answer": "Which authors have first name 'Amal'? List their last names.\nAdditional table information: table: icfp_1"} -{"question": "SELECT fname FROM authors ORDER BY fname NULLS FIRST", "answer": "Find the first names of all the authors ordered in alphabetical order.\nAdditional table information: table: icfp_1"} -{"question": "SELECT fname FROM authors ORDER BY fname NULLS FIRST", "answer": "Sort the first names of all the authors in alphabetical order.\nAdditional table information: table: icfp_1"} -{"question": "SELECT lname FROM authors ORDER BY lname NULLS FIRST", "answer": "Retrieve all the last names of authors in alphabetical order.\nAdditional table information: table: icfp_1"} -{"question": "SELECT lname FROM authors ORDER BY lname NULLS FIRST", "answer": "Give me a list of all the last names of authors sorted in alphabetical order\nAdditional table information: table: icfp_1"} -{"question": "SELECT fname, lname FROM authors ORDER BY lname NULLS FIRST", "answer": "Retrieve all the first and last names of authors in the alphabetical order of last names.\nAdditional table information: table: icfp_1"} -{"question": "SELECT fname, lname FROM authors ORDER BY lname NULLS FIRST", "answer": "Sort the list of all the first and last names of authors in alphabetical order of the last names.\nAdditional table information: table: icfp_1"} -{"question": "SELECT COUNT(DISTINCT last_name) FROM actor", "answer": "How many different last names do the actors and actresses have?\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(DISTINCT last_name) FROM actor", "answer": "Count the number of different last names actors have.\nAdditional table information: table: sakila_1"} -{"question": "SELECT first_name FROM actor GROUP BY first_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most popular first name of the actors?\nAdditional table information: table: sakila_1"} -{"question": "SELECT first_name FROM actor GROUP BY first_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the most common first name among all actors.\nAdditional table information: table: sakila_1"} -{"question": "SELECT first_name, last_name FROM actor GROUP BY first_name, last_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most popular full name of the actors?\nAdditional table information: table: sakila_1"} -{"question": "SELECT first_name, last_name FROM actor GROUP BY first_name, last_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the most common full name among all actors.\nAdditional table information: table: sakila_1"} -{"question": "SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2", "answer": "Which districts have at least two addresses?\nAdditional table information: table: sakila_1"} -{"question": "SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2", "answer": "Give the districts which have two or more addresses.\nAdditional table information: table: sakila_1"} -{"question": "SELECT phone, postal_code FROM address WHERE address = '1031 Daugavpils Parkway'", "answer": "What is the phone number and postal code of the address 1031 Daugavpils Parkway?\nAdditional table information: table: sakila_1"} -{"question": "SELECT phone, postal_code FROM address WHERE address = '1031 Daugavpils Parkway'", "answer": "Give the phone and postal code corresponding to the address '1031 Daugavpils Parkway'.\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "Which city has the most addresses? List the city name, number of addresses, and city id.\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "What are the city name, id, and number of addresses corresponding to the city with the most addressed?\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(*) FROM address WHERE district = 'California'", "answer": "How many addresses are in the district of California?\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(*) FROM address WHERE district = 'California'", "answer": "Count the number of addressed in the California district.\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id.\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3?\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'", "answer": "How many cities are in Australia?\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'", "answer": "Count the number of cities in Australia.\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "Which countries have at least 3 cities?\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "What are the countries that contain 3 or more cities?\nAdditional table information: table: sakila_1"} -{"question": "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'", "answer": "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.\nAdditional table information: table: sakila_1"} -{"question": "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'", "answer": "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?\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(*) FROM customer WHERE active = '1'", "answer": "How many customers have an active value of 1?\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(*) FROM customer WHERE active = '1'", "answer": "Count the number of customers who are active.\nAdditional table information: table: sakila_1"} -{"question": "SELECT title, rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1", "answer": "Which film has the highest rental rate? And what is the rate?\nAdditional table information: table: sakila_1"} -{"question": "SELECT title, rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1", "answer": "What are the title and rental rate of the film with the highest rental rate?\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "Which film has the most number of actors or actresses? List the film name, film id and description.\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "What are the title, id, and description of the movie with the greatest number of actors?\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "Which film actor (actress) starred the most films? List his or her first name, last name and actor id.\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "Return the full name and id of the actor or actress who starred in the greatest number of films.\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "What are the full names of actors who had roles in more than 30 films?\nAdditional table information: table: sakila_1"} -{"question": "SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which store owns most items?\nAdditional table information: table: sakila_1"} -{"question": "SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id of the store that has the most items in inventory?\nAdditional table information: table: sakila_1"} -{"question": "SELECT SUM(amount) FROM payment", "answer": "What is the total amount of all payments?\nAdditional table information: table: sakila_1"} -{"question": "SELECT SUM(amount) FROM payment", "answer": "Return the sum of all payment amounts.\nAdditional table information: table: sakila_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "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.\nAdditional table information: table: sakila_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the full name and id of the customer who has the lowest total amount of payment?\nAdditional table information: table: sakila_1"} -{"question": "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'", "answer": "What is the genre name of the film HUNGER ROOF?\nAdditional table information: table: sakila_1"} -{"question": "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'", "answer": "Return the name of the category to which the film 'HUNGER ROOF' belongs.\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "How many films are there in each category? List the genre name, genre id and the count.\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "What are the names and ids of the different categories, and how many films are in each?\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "Which film has the most copies in the inventory? List both title and id.\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "What is the title and id of the film that has the greatest number of copies in inventory?\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "What is the film title and inventory id of the item in the inventory which was rented most frequently?\nAdditional table information: table: sakila_1"} -{"question": "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", "answer": "Return the title and inventory id of the film that is rented most often.\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(DISTINCT language_id) FROM film", "answer": "How many languages are in these films?\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(DISTINCT language_id) FROM film", "answer": "Count the number of different languages in these films.\nAdditional table information: table: sakila_1"} -{"question": "SELECT title FROM film WHERE rating = 'R'", "answer": "What are all the movies rated as R? List the titles.\nAdditional table information: table: sakila_1"} -{"question": "SELECT title FROM film WHERE rating = 'R'", "answer": "Return the titles of any movies with an R rating.\nAdditional table information: table: sakila_1"} -{"question": "SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1", "answer": "Where is store 1 located?\nAdditional table information: table: sakila_1"} -{"question": "SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1", "answer": "Return the address of store 1.\nAdditional table information: table: sakila_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Which staff handled least number of payments? List the full name and the id.\nAdditional table information: table: sakila_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Give the full name and staff id of the staff who has handled the fewest payments.\nAdditional table information: table: sakila_1"} -{"question": "SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'", "answer": "Which language does the film AIRPORT POLLOCK use? List the language name.\nAdditional table information: table: sakila_1"} -{"question": "SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'", "answer": "What is the name of the language that the film 'AIRPORT POLLOCK' is in?\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(*) FROM store", "answer": "How many stores are there?\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(*) FROM store", "answer": "Count the number of stores.\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(DISTINCT rating) FROM film", "answer": "How many kinds of different ratings are listed?\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(DISTINCT rating) FROM film", "answer": "Count the number of different film ratings.\nAdditional table information: table: sakila_1"} -{"question": "SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'", "answer": "Which movies have 'Deleted Scenes' as a substring in the special feature?\nAdditional table information: table: sakila_1"} -{"question": "SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'", "answer": "Return the titles of films that include 'Deleted Scenes' in their special feature section.\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(*) FROM inventory WHERE store_id = 1", "answer": "How many items in inventory does store 1 have?\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(*) FROM inventory WHERE store_id = 1", "answer": "Count the number of items store 1 has in stock.\nAdditional table information: table: sakila_1"} -{"question": "SELECT payment_date FROM payment ORDER BY payment_date ASC NULLS FIRST LIMIT 1", "answer": "When did the first payment happen?\nAdditional table information: table: sakila_1"} -{"question": "SELECT payment_date FROM payment ORDER BY payment_date ASC NULLS FIRST LIMIT 1", "answer": "What was the date of the earliest payment?\nAdditional table information: table: sakila_1"} -{"question": "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'", "answer": "Where does the customer with the first name Linda live? And what is her email?\nAdditional table information: table: sakila_1"} -{"question": "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'", "answer": "Return the address and email of the customer with the first name Linda.\nAdditional table information: table: sakila_1"} -{"question": "SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200", "answer": "Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.\nAdditional table information: table: sakila_1"} -{"question": "SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200", "answer": "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?\nAdditional table information: table: sakila_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the first name and the last name of the customer who made the earliest rental?\nAdditional table information: table: sakila_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Return the full name of the customer who made the first rental.\nAdditional table information: table: sakila_1"} -{"question": "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'", "answer": "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?\nAdditional table information: table: sakila_1"} -{"question": "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'", "answer": "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.\nAdditional table information: table: sakila_1"} -{"question": "SELECT store_id FROM customer GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which store has most the customers?\nAdditional table information: table: sakila_1"} -{"question": "SELECT store_id FROM customer GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the id of the store with the most customers.\nAdditional table information: table: sakila_1"} -{"question": "SELECT amount FROM payment ORDER BY amount DESC LIMIT 1", "answer": "What is the largest payment amount?\nAdditional table information: table: sakila_1"} -{"question": "SELECT amount FROM payment ORDER BY amount DESC LIMIT 1", "answer": "Return the amount of the largest payment.\nAdditional table information: table: sakila_1"} -{"question": "SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa'", "answer": "Where does the staff member with the first name Elsa live?\nAdditional table information: table: sakila_1"} -{"question": "SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa'", "answer": "Give the address of the staff member who has the first name Elsa.\nAdditional table information: table: sakila_1"} -{"question": "SELECT first_name FROM customer WHERE NOT customer_id IN (SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01')", "answer": "What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?\nAdditional table information: table: sakila_1"} -{"question": "SELECT first_name FROM customer WHERE NOT customer_id IN (SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01')", "answer": "Return the first names of customers who did not rented a film after the date '2005-08-23 02:06:01'.\nAdditional table information: table: sakila_1"} -{"question": "SELECT COUNT(*) FROM bank", "answer": "How many bank branches are there?\nAdditional table information: table: loan_1"} -{"question": "SELECT COUNT(*) FROM bank", "answer": "Count the number of bank branches.\nAdditional table information: table: loan_1"} -{"question": "SELECT SUM(no_of_customers) FROM bank", "answer": "How many customers are there?\nAdditional table information: table: loan_1"} -{"question": "SELECT SUM(no_of_customers) FROM bank", "answer": "What is the total number of customers across banks?\nAdditional table information: table: loan_1"} -{"question": "SELECT SUM(no_of_customers) FROM bank WHERE city = 'New York City'", "answer": "Find the number of customers in the banks at New York City.\nAdditional table information: table: loan_1"} -{"question": "SELECT SUM(no_of_customers) FROM bank WHERE city = 'New York City'", "answer": "What is the total number of customers who use banks in New York City?\nAdditional table information: table: loan_1"} -{"question": "SELECT AVG(no_of_customers) FROM bank WHERE state = 'Utah'", "answer": "Find the average number of customers in all banks of Utah state.\nAdditional table information: table: loan_1"} -{"question": "SELECT AVG(no_of_customers) FROM bank WHERE state = 'Utah'", "answer": "What is the average number of customers across banks in the state of Utah?\nAdditional table information: table: loan_1"} -{"question": "SELECT AVG(no_of_customers) FROM bank", "answer": "Find the average number of customers cross all banks.\nAdditional table information: table: loan_1"} -{"question": "SELECT AVG(no_of_customers) FROM bank", "answer": "What is the average number of bank customers?\nAdditional table information: table: loan_1"} -{"question": "SELECT city, state FROM bank WHERE bname = 'morningside'", "answer": "Find the city and state of the bank branch named morningside.\nAdditional table information: table: loan_1"} -{"question": "SELECT city, state FROM bank WHERE bname = 'morningside'", "answer": "What city and state is the bank with the name morningside in?\nAdditional table information: table: loan_1"} -{"question": "SELECT bname FROM bank WHERE state = 'New York'", "answer": "Find the branch names of banks in the New York state.\nAdditional table information: table: loan_1"} -{"question": "SELECT bname FROM bank WHERE state = 'New York'", "answer": "What are the names of banks in the state of New York?\nAdditional table information: table: loan_1"} -{"question": "SELECT cust_name FROM customer ORDER BY acc_bal NULLS FIRST", "answer": "List the name of all customers sorted by their account balance in ascending order.\nAdditional table information: table: loan_1"} -{"question": "SELECT cust_name FROM customer ORDER BY acc_bal NULLS FIRST", "answer": "What are the names of all customers, ordered by account balance?\nAdditional table information: table: loan_1"} -{"question": "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) NULLS FIRST", "answer": "List the name of all different customers who have some loan sorted by their total loan amount.\nAdditional table information: table: loan_1"} -{"question": "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) NULLS FIRST", "answer": "What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken?\nAdditional table information: table: loan_1"} -{"question": "SELECT state, acc_type, credit_score FROM customer WHERE no_of_loans = 0", "answer": "Find the state, account type, and credit score of the customer whose number of loan is 0.\nAdditional table information: table: loan_1"} -{"question": "SELECT state, acc_type, credit_score FROM customer WHERE no_of_loans = 0", "answer": "What are the states, account types, and credit scores for customers who have 0 loans?\nAdditional table information: table: loan_1"} -{"question": "SELECT COUNT(DISTINCT city) FROM bank", "answer": "Find the number of different cities which banks are located at.\nAdditional table information: table: loan_1"} -{"question": "SELECT COUNT(DISTINCT city) FROM bank", "answer": "In how many different cities are banks located?\nAdditional table information: table: loan_1"} -{"question": "SELECT COUNT(DISTINCT state) FROM bank", "answer": "Find the number of different states which banks are located at.\nAdditional table information: table: loan_1"} -{"question": "SELECT COUNT(DISTINCT state) FROM bank", "answer": "In how many different states are banks located?\nAdditional table information: table: loan_1"} -{"question": "SELECT COUNT(DISTINCT acc_type) FROM customer", "answer": "How many distinct types of accounts are there?\nAdditional table information: table: loan_1"} -{"question": "SELECT COUNT(DISTINCT acc_type) FROM customer", "answer": "Count the number of different account types.\nAdditional table information: table: loan_1"} -{"question": "SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%'", "answer": "Find the name and account balance of the customer whose name includes the letter \u2018a\u2019.\nAdditional table information: table: loan_1"} -{"question": "SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%'", "answer": "What are the names and account balances of customers with the letter a in their names?\nAdditional table information: table: loan_1"} -{"question": "SELECT SUM(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas'", "answer": "Find the total account balance of each customer from Utah or Texas.\nAdditional table information: table: loan_1"} -{"question": "SELECT SUM(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas'", "answer": "What are the total account balances for each customer from Utah or Texas?\nAdditional table information: table: loan_1"} -{"question": "SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking'", "answer": "Find the name of customers who have both saving and checking account types.\nAdditional table information: table: loan_1"} -{"question": "SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking'", "answer": "What are the names of customers who have both savings and checking accounts?\nAdditional table information: table: loan_1"} -{"question": "SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving'", "answer": "Find the name of customers who do not have an saving account.\nAdditional table information: table: loan_1"} -{"question": "SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving'", "answer": "What are the names of customers who do not have saving accounts?\nAdditional table information: table: loan_1"} -{"question": "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'", "answer": "Find the name of customers who do not have a loan with a type of Mortgages.\nAdditional table information: table: loan_1"} -{"question": "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'", "answer": "What are the names of customers who have not taken a Mortage loan?\nAdditional table information: table: loan_1"} -{"question": "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'", "answer": "Find the name of customers who have loans of both Mortgages and Auto.\nAdditional table information: table: loan_1"} -{"question": "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'", "answer": "What are the names of customers who have taken both Mortgage and Auto loans?\nAdditional table information: table: loan_1"} -{"question": "SELECT cust_name FROM customer WHERE credit_score < (SELECT AVG(credit_score) FROM customer)", "answer": "Find the name of customers whose credit score is below the average credit scores of all customers.\nAdditional table information: table: loan_1"} -{"question": "SELECT cust_name FROM customer WHERE credit_score < (SELECT AVG(credit_score) FROM customer)", "answer": "What are the names of customers with credit score less than the average credit score across customers?\nAdditional table information: table: loan_1"} -{"question": "SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1", "answer": "Find the branch name of the bank that has the most number of customers.\nAdditional table information: table: loan_1"} -{"question": "SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1", "answer": "What is the name of the bank branch with the greatest number of customers?\nAdditional table information: table: loan_1"} -{"question": "SELECT cust_name FROM customer ORDER BY credit_score NULLS FIRST LIMIT 1", "answer": "Find the name of customer who has the lowest credit score.\nAdditional table information: table: loan_1"} -{"question": "SELECT cust_name FROM customer ORDER BY credit_score NULLS FIRST LIMIT 1", "answer": "What is the name of the customer with the worst credit score?\nAdditional table information: table: loan_1"} -{"question": "SELECT cust_name, acc_type, acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1", "answer": "Find the name, account type, and account balance of the customer who has the highest credit score.\nAdditional table information: table: loan_1"} -{"question": "SELECT cust_name, acc_type, acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1", "answer": "What is the name, account type, and account balance corresponding to the customer with the highest credit score?\nAdditional table information: table: loan_1"} -{"question": "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", "answer": "Find the name of customer who has the highest amount of loans.\nAdditional table information: table: loan_1"} -{"question": "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", "answer": "What is the name of the customer who has greatest total loan amount?\nAdditional table information: table: loan_1"} -{"question": "SELECT state FROM bank GROUP BY state ORDER BY SUM(no_of_customers) DESC LIMIT 1", "answer": "Find the state which has the most number of customers.\nAdditional table information: table: loan_1"} -{"question": "SELECT state FROM bank GROUP BY state ORDER BY SUM(no_of_customers) DESC LIMIT 1", "answer": "Which state has the greatest total number of bank customers?\nAdditional table information: table: loan_1"} -{"question": "SELECT AVG(acc_bal), acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type", "answer": "For each account type, find the average account balance of customers with credit score lower than 50.\nAdditional table information: table: loan_1"} -{"question": "SELECT AVG(acc_bal), acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type", "answer": "What is the average account balance of customers with credit score below 50 for the different account types?\nAdditional table information: table: loan_1"} -{"question": "SELECT SUM(acc_bal), state FROM customer WHERE credit_score > 100 GROUP BY state", "answer": "For each state, find the total account balance of customers whose credit score is above 100.\nAdditional table information: table: loan_1"} -{"question": "SELECT SUM(acc_bal), state FROM customer WHERE credit_score > 100 GROUP BY state", "answer": "What is the total account balance for customers with a credit score of above 100 for the different states?\nAdditional table information: table: loan_1"} -{"question": "SELECT SUM(amount), T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname", "answer": "Find the total amount of loans offered by each bank branch.\nAdditional table information: table: loan_1"} -{"question": "SELECT SUM(amount), T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname", "answer": "What are the names of the different bank branches, and what are their total loan amounts?\nAdditional table information: table: loan_1"} -{"question": "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", "answer": "Find the name of customers who have more than one loan.\nAdditional table information: table: loan_1"} -{"question": "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", "answer": "What are the names of customers who have taken out more than one loan?\nAdditional table information: table: loan_1"} -{"question": "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", "answer": "Find the name and account balance of the customers who have loans with a total amount of more than 5000.\nAdditional table information: table: loan_1"} -{"question": "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", "answer": "What are the names and account balances for customers who have taken a total amount of more than 5000 in loans?\nAdditional table information: table: loan_1"} -{"question": "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", "answer": "Find the name of bank branch that provided the greatest total amount of loans.\nAdditional table information: table: loan_1"} -{"question": "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", "answer": "What is the name of the bank branch that has lent the greatest amount?\nAdditional table information: table: loan_1"} -{"question": "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", "answer": "Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100.\nAdditional table information: table: loan_1"} -{"question": "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", "answer": "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?\nAdditional table information: table: loan_1"} -{"question": "SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id", "answer": "Find the name of bank branches that provided some loans.\nAdditional table information: table: loan_1"} -{"question": "SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id", "answer": "What are the names of the different banks that have provided loans?\nAdditional table information: table: loan_1"} -{"question": "SELECT DISTINCT T1.cust_name, T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id", "answer": "Find the name and credit score of the customers who have some loans.\nAdditional table information: table: loan_1"} -{"question": "SELECT DISTINCT T1.cust_name, T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id", "answer": "What are the different names and credit scores of customers who have taken a loan?\nAdditional table information: table: loan_1"} -{"question": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000", "answer": "Find the the name of the customers who have a loan with amount more than 3000.\nAdditional table information: table: loan_1"} -{"question": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000", "answer": "What are the names of customers who have a loan of more than 3000 in amount?\nAdditional table information: table: loan_1"} -{"question": "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'", "answer": "Find the city and name of bank branches that provide business loans.\nAdditional table information: table: loan_1"} -{"question": "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'", "answer": "What are the names and cities of bank branches that offer loans for business?\nAdditional table information: table: loan_1"} -{"question": "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", "answer": "Find the names of bank branches that have provided a loan to any customer whose credit score is below 100.\nAdditional table information: table: loan_1"} -{"question": "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", "answer": "What are the names of banks that have loaned money to customers with credit scores below 100?\nAdditional table information: table: loan_1"} -{"question": "SELECT SUM(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York'", "answer": "Find the total amount of loans provided by bank branches in the state of New York.\nAdditional table information: table: loan_1"} -{"question": "SELECT SUM(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York'", "answer": "What is the total amount of money loaned by banks in New York state?\nAdditional table information: table: loan_1"} -{"question": "SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)", "answer": "Find the average credit score of the customers who have some loan.\nAdditional table information: table: loan_1"} -{"question": "SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)", "answer": "What is the average credit score for customers who have taken a loan?\nAdditional table information: table: loan_1"} -{"question": "SELECT AVG(credit_score) FROM customer WHERE NOT cust_id IN (SELECT cust_id FROM loan)", "answer": "Find the average credit score of the customers who do not have any loan.\nAdditional table information: table: loan_1"} -{"question": "SELECT AVG(credit_score) FROM customer WHERE NOT cust_id IN (SELECT cust_id FROM loan)", "answer": "What is the average credit score for customers who have never taken a loan?\nAdditional table information: table: loan_1"} -{"question": "SELECT COUNT(*) FROM ASSESSMENT_NOTES", "answer": "How many assessment notes are there in total?\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT date_of_notes FROM Assessment_Notes", "answer": "What are the dates of the assessment notes?\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT COUNT(*) FROM ADDRESSES WHERE zip_postcode = '197'", "answer": "How many addresses have zip code 197?\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT COUNT(DISTINCT incident_type_code) FROM Behavior_Incident", "answer": "How many distinct incident type codes are there?\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT DISTINCT detention_type_code FROM Detention", "answer": "Return all distinct detention type codes.\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT date_incident_start, date_incident_end FROM Behavior_Incident WHERE incident_type_code = 'NOISE'", "answer": "What are the start and end dates for incidents with incident type code 'NOISE'?\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT detention_summary FROM Detention", "answer": "Return all detention summaries.\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT cell_mobile_number, email_address FROM STUDENTS", "answer": "Return the cell phone number and email address for all students.\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT email_address FROM Students WHERE first_name = 'Emma' AND last_name = 'Rohan'", "answer": "What is the email of the student with first name 'Emma' and last name 'Rohan'?\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT COUNT(DISTINCT student_id) FROM Students_in_Detention", "answer": "How many distinct students have been in detention?\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT gender FROM TEACHERS WHERE last_name = 'Medhurst'", "answer": "What is the gender of the teacher with last name 'Medhurst'?\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT incident_type_description FROM Ref_Incident_Type WHERE incident_type_code = 'VIOLENCE'", "answer": "What is the incident type description for the incident type with code 'VIOLENCE'?\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT MAX(monthly_rental), MIN(monthly_rental) FROM Student_Addresses", "answer": "Find the maximum and minimum monthly rental for all student addresses.\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT first_name FROM Teachers WHERE email_address LIKE '%man%'", "answer": "Find the first names of teachers whose email address contains the word 'man'.\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT * FROM Assessment_Notes ORDER BY date_of_notes ASC NULLS FIRST", "answer": "List all information about the assessment notes sorted by date in ascending order.\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT city FROM Addresses ORDER BY city NULLS FIRST", "answer": "List all cities of addresses in alphabetical order.\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT first_name, last_name FROM Teachers ORDER BY last_name NULLS FIRST", "answer": "Find the first names and last names of teachers in alphabetical order of last name.\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC", "answer": "Find all information about student addresses, and sort by monthly rental in descending order.\nAdditional table information: table: behavior_monitoring"} -{"question": "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", "answer": "Find the id and first name of the student that has the most number of assessment notes?\nAdditional table information: table: behavior_monitoring"} -{"question": "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", "answer": "Find the ids and first names of the 3 teachers that have the most number of assessment notes?\nAdditional table information: table: behavior_monitoring"} -{"question": "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", "answer": "Find the id and last name of the student that has the most behavior incidents?\nAdditional table information: table: behavior_monitoring"} -{"question": "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", "answer": "Find the id and last name of the teacher that has the most detentions with detention type code 'AFTER'?\nAdditional table information: table: behavior_monitoring"} -{"question": "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", "answer": "What are the id and first name of the student whose addresses have the highest average monthly rental?\nAdditional table information: table: behavior_monitoring"} -{"question": "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", "answer": "Find the id and city of the student address with the highest average monthly rental.\nAdditional table information: table: behavior_monitoring"} -{"question": "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", "answer": "What are the code and description of the most frequent behavior incident type?\nAdditional table information: table: behavior_monitoring"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What are the code and description of the least frequent detention type ?\nAdditional table information: table: behavior_monitoring"} -{"question": "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'", "answer": "Find the dates of assessment notes for students with first name 'Fanny'.\nAdditional table information: table: behavior_monitoring"} -{"question": "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'", "answer": "Find the texts of assessment notes for teachers with last name 'Schuster'.\nAdditional table information: table: behavior_monitoring"} -{"question": "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'", "answer": "Find the start and end dates of behavior incidents of students with last name 'Fahey'.\nAdditional table information: table: behavior_monitoring"} -{"question": "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'", "answer": "Find the start and end dates of detentions of teachers with last name 'Schultz'.\nAdditional table information: table: behavior_monitoring"} -{"question": "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", "answer": "What are the id and zip code of the address with the highest monthly rental?\nAdditional table information: table: behavior_monitoring"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the cell phone number of the student whose address has the lowest monthly rental?\nAdditional table information: table: behavior_monitoring"} -{"question": "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'", "answer": "What are the monthly rentals of student addresses in Texas state?\nAdditional table information: table: behavior_monitoring"} -{"question": "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'", "answer": "What are the first names and last names of students with address in Wisconsin state?\nAdditional table information: table: behavior_monitoring"} -{"question": "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", "answer": "What are the line 1 and average monthly rentals of all student addresses?\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = 'Lyla'", "answer": "What is the zip code of the address where the teacher with first name 'Lyla' lives?\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T1.zip_postcode = '918'", "answer": "What are the email addresses of teachers whose address has zip code '918'?\nAdditional table information: table: behavior_monitoring"} -{"question": "SELECT COUNT(*) FROM STUDENTS WHERE NOT student_id IN (SELECT student_id FROM Behavior_Incident)", "answer": "How many students are not involved in any behavior incident?\nAdditional table information: table: behavior_monitoring"} -{"question": "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", "answer": "Find the last names of teachers who are not involved in any detention.\nAdditional table information: table: behavior_monitoring"} -{"question": "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", "answer": "What are the line 1 of addresses shared by some students and some teachers?\nAdditional table information: table: behavior_monitoring"} -{"question": "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", "answer": "Which assets have 2 parts and have less than 2 fault logs? List the asset id and detail.\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "How many assets does each maintenance contract contain? List the number and the contract id.\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "How many assets does each third party company supply? List the count and the company id.\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name.\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers?\nAdditional table information: table: assets_maintenance"} -{"question": "SELECT T1.engineer_id, T1.first_name, T1.last_name FROM Maintenance_Engineers AS T1, Engineer_Visits AS T2 GROUP BY T1.engineer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which engineer has visited the most times? Show the engineer id, first name and last name.\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "Which parts have more than 2 faults? Show the part name and id.\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "List all every engineer's first name, last name, details and coresponding skill description.\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "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.\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "How many assets can each parts be used in? List the part name and the number.\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "What are all the fault descriptions and the fault status of all the faults recoreded in the logs?\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "How many engineer visits are required at most for a single fault log? List the number and the log entry id.\nAdditional table information: table: assets_maintenance"} -{"question": "SELECT DISTINCT last_name FROM Maintenance_Engineers", "answer": "What are all the distinct last names of all the engineers?\nAdditional table information: table: assets_maintenance"} -{"question": "SELECT DISTINCT fault_status FROM Fault_Log_Parts", "answer": "How many fault status codes are recorded in the fault log parts table?\nAdditional table information: table: assets_maintenance"} -{"question": "SELECT first_name, last_name FROM Maintenance_Engineers WHERE NOT engineer_id IN (SELECT engineer_id FROM Engineer_Visits)", "answer": "Which engineers have never visited to maintain the assets? List the engineer first name and last name.\nAdditional table information: table: assets_maintenance"} -{"question": "SELECT asset_id, asset_details, asset_make, asset_model FROM Assets", "answer": "List the asset id, details, make and model for every asset.\nAdditional table information: table: assets_maintenance"} -{"question": "SELECT asset_acquired_date FROM Assets ORDER BY asset_acquired_date ASC NULLS FIRST LIMIT 1", "answer": "When was the first asset acquired?\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "Which part fault requires the most number of skills to fix? List part id and name.\nAdditional table information: table: assets_maintenance"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Which kind of part has the least number of faults? List the part name.\nAdditional table information: table: assets_maintenance"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, first name and last name.\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "Which staff have contacted which engineers? List the staff name and the engineer first name and last name.\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "Which fault log included the most number of faulty parts? List the fault log id, description and record time.\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "Which skill is used in fixing the most number of faults? List the skill id and description.\nAdditional table information: table: assets_maintenance"} -{"question": "SELECT DISTINCT asset_model FROM Assets", "answer": "What are all the distinct asset models?\nAdditional table information: table: assets_maintenance"} -{"question": "SELECT asset_make, asset_model, asset_details FROM Assets ORDER BY asset_disposed_date ASC NULLS FIRST", "answer": "List the all the assets make, model, details by the disposed date ascendingly.\nAdditional table information: table: assets_maintenance"} -{"question": "SELECT part_id, chargeable_amount FROM Parts ORDER BY chargeable_amount ASC NULLS FIRST LIMIT 1", "answer": "Which part has the least chargeable amount? List the part id and amount.\nAdditional table information: table: assets_maintenance"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Which company started the earliest the maintenance contract? Show the company name.\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "What is the description of the type of the company who concluded its contracts most recently?\nAdditional table information: table: assets_maintenance"} -{"question": "SELECT gender FROM staff GROUP BY gender ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which gender makes up the majority of the staff?\nAdditional table information: table: assets_maintenance"} -{"question": "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", "answer": "How many engineers did each staff contact? List both the contact staff name and number of engineers contacted.\nAdditional table information: table: assets_maintenance"} -{"question": "SELECT asset_model FROM Assets WHERE NOT asset_id IN (SELECT asset_id FROM Fault_Log)", "answer": "Which assets did not incur any fault log? List the asset model.\nAdditional table information: table: assets_maintenance"} -{"question": "SELECT local_authority, services FROM station", "answer": "list the local authorities and services provided by all stations.\nAdditional table information: table: station_weather"} -{"question": "SELECT train_number, name FROM train ORDER BY TIME NULLS FIRST", "answer": "show all train numbers and names ordered by their time from early to late.\nAdditional table information: table: station_weather"} -{"question": "SELECT TIME, train_number FROM train WHERE destination = 'Chennai' ORDER BY TIME NULLS FIRST", "answer": "Give me the times and numbers of all trains that go to Chennai, ordered by time.\nAdditional table information: table: station_weather"} -{"question": "SELECT COUNT(*) FROM train WHERE name LIKE '%Express%'", "answer": "How many trains have 'Express' in their names?\nAdditional table information: table: station_weather"} -{"question": "SELECT train_number, TIME FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur'", "answer": "Find the number and time of the train that goes from Chennai to Guruvayur.\nAdditional table information: table: station_weather"} -{"question": "SELECT origin, COUNT(*) FROM train GROUP BY origin", "answer": "Find the number of trains starting from each origin.\nAdditional table information: table: station_weather"} -{"question": "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", "answer": "Find the name of the train whose route runs through greatest number of stations.\nAdditional table information: table: station_weather"} -{"question": "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", "answer": "Find the number of trains for each station, as well as the station network name and services.\nAdditional table information: table: station_weather"} -{"question": "SELECT AVG(high_temperature), day_of_week FROM weekly_weather GROUP BY day_of_week", "answer": "What is the average high temperature for each day of week?\nAdditional table information: table: station_weather"} -{"question": "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'", "answer": "Give me the maximum low temperature and average precipitation at the Amersham station.\nAdditional table information: table: station_weather"} -{"question": "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'", "answer": "Find names and times of trains that run through stations for the local authority Chiltern.\nAdditional table information: table: station_weather"} -{"question": "SELECT COUNT(DISTINCT services) FROM station", "answer": "How many different services are provided by all stations?\nAdditional table information: table: station_weather"} -{"question": "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", "answer": "Find the id and local authority of the station with has the highest average high temperature.\nAdditional table information: table: station_weather"} -{"question": "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", "answer": "Find the id and local authority of the station whose maximum precipitation is higher than 50.\nAdditional table information: table: station_weather"} -{"question": "SELECT MIN(low_temperature), MAX(wind_speed_mph) FROM weekly_weather", "answer": "show the lowest low temperature and highest wind speed in miles per hour.\nAdditional table information: table: station_weather"} -{"question": "SELECT origin FROM train GROUP BY origin HAVING COUNT(*) > 1", "answer": "Find the origins from which more than 1 train starts.\nAdditional table information: table: station_weather"} -{"question": "SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = 'Accounting'", "answer": "Find the number of professors in accounting department.\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = 'Accounting'", "answer": "How many professors are in the accounting dept?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = 'ACCT-211'", "answer": "How many professors are teaching class with code ACCT-211?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = 'ACCT-211'", "answer": "How many professors teach a class with the code ACCT-211?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What is the first and last name of the professor in biology department?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What are the first and last name of all biology professors?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What are the first names and date of birth of professors teaching course ACCT-211?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What are the first names and birthdates of the professors in charge of ACCT-211?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski'", "answer": "How many classes are professor whose last name is Graztevski has?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski'", "answer": "How many classes does the professor whose last name is Graztevski teach?\nAdditional table information: table: college_1"} -{"question": "SELECT school_code FROM department WHERE dept_name = 'Accounting'", "answer": "What is the code of the school where the accounting department belongs to?\nAdditional table information: table: college_1"} -{"question": "SELECT school_code FROM department WHERE dept_name = 'Accounting'", "answer": "What is the school code of the accounting department?\nAdditional table information: table: college_1"} -{"question": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'CIS-220'", "answer": "How many credits does course CIS-220 have, and what its description?\nAdditional table information: table: college_1"} -{"question": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'CIS-220'", "answer": "What is the description for the CIS-220 and how many credits does it have?\nAdditional table information: table: college_1"} -{"question": "SELECT dept_address FROM department WHERE dept_name = 'History'", "answer": "what is the address of history department?\nAdditional table information: table: college_1"} -{"question": "SELECT dept_address FROM department WHERE dept_name = 'History'", "answer": "Where is the history department?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'", "answer": "How many different locations does the school with code BUS has?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'", "answer": "What are the different locations of the school with the code BUS?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT dept_address), school_code FROM department GROUP BY school_code", "answer": "How many different locations does each school have?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT dept_address), school_code FROM department GROUP BY school_code", "answer": "Count different addresses of each school.\nAdditional table information: table: college_1"} -{"question": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261'", "answer": "Find the description and credit for the course QM-261?\nAdditional table information: table: college_1"} -{"question": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261'", "answer": "What is the course description and number of credits for QM-261?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code", "answer": "Find the number of departments in each school.\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code", "answer": "How many departments are in each school?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code HAVING COUNT(DISTINCT dept_name) < 5", "answer": "Find the number of different departments in each school whose number of different departments is less than 5.\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code HAVING COUNT(DISTINCT dept_name) < 5", "answer": "How many different departments are there in each school that has less than 5 apartments?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*), crs_code FROM CLASS GROUP BY crs_code", "answer": "How many sections does each course has?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*), crs_code FROM CLASS GROUP BY crs_code", "answer": "How many sections does each course have?\nAdditional table information: table: college_1"} -{"question": "SELECT SUM(crs_credit), dept_code FROM course GROUP BY dept_code", "answer": "What is the total credit does each department offer?\nAdditional table information: table: college_1"} -{"question": "SELECT SUM(crs_credit), dept_code FROM course GROUP BY dept_code", "answer": "How many credits does the department offer?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*), class_room FROM CLASS GROUP BY class_room HAVING COUNT(*) >= 2", "answer": "Find the number of classes offered for all class rooms that held at least 2 classes.\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*), class_room FROM CLASS GROUP BY class_room HAVING COUNT(*) >= 2", "answer": "For each classroom with at least 2 classes, how many classes are offered?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*), dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code", "answer": "Find the number of classes in each department.\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*), dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code", "answer": "How many classes are held in each department?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "Find the number of classes in each school.\nAdditional table information: table: college_1"} -{"question": "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", "answer": "How many classes exist for each school?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What is the number of professors for different school?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "How many different professors are there for the different schools?\nAdditional table information: table: college_1"} -{"question": "SELECT emp_jobcode, COUNT(*) FROM employee GROUP BY emp_jobcode ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the count and code of the job has most employees.\nAdditional table information: table: college_1"} -{"question": "SELECT emp_jobcode, COUNT(*) FROM employee GROUP BY emp_jobcode ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the count and code of the job with the most employee?\nAdditional table information: table: college_1"} -{"question": "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(*) NULLS FIRST LIMIT 1", "answer": "Which school has the smallest amount of professors?\nAdditional table information: table: college_1"} -{"question": "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(*) NULLS FIRST LIMIT 1", "answer": "Which school has the fewest professors?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code", "answer": "Find the number of professors with a Ph.D. degree in each department.\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code", "answer": "How many professors have a Ph.D. in each department?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*), dept_code FROM student GROUP BY dept_code", "answer": "Find the number of students for each department.\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*), dept_code FROM student GROUP BY dept_code", "answer": "How many students are in each department?\nAdditional table information: table: college_1"} -{"question": "SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code", "answer": "Find the total number of hours have done for all students in each department.\nAdditional table information: table: college_1"} -{"question": "SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code", "answer": "How many hours do the students spend studying in each department?\nAdditional table information: table: college_1"} -{"question": "SELECT MAX(stu_gpa), AVG(stu_gpa), MIN(stu_gpa), dept_code FROM student GROUP BY dept_code", "answer": "Find the max, average, and minimum gpa of all students in each department.\nAdditional table information: table: college_1"} -{"question": "SELECT MAX(stu_gpa), AVG(stu_gpa), MIN(stu_gpa), dept_code FROM student GROUP BY dept_code", "answer": "What is the highest, lowest, and average student GPA for every department?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What is the name and the average gpa of department whose students have the highest average gpa?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "Which department has the highest average student GPA, and what is the average gpa?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT school_code) FROM department", "answer": "how many schools exist in total?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT school_code) FROM department", "answer": "How many schools are there in the department?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT class_code) FROM CLASS", "answer": "How many different classes are there?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT class_code) FROM CLASS", "answer": "How many unique classes are offered?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT crs_code) FROM CLASS", "answer": "How many courses are offered?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT crs_code) FROM CLASS", "answer": "What are the number of different course codes?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT dept_name) FROM department", "answer": "How many departments does the college has?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT dept_name) FROM department", "answer": "How many different departments are there?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = 'Computer Info. Systems'", "answer": "How many courses are offered by the Computer Info. Systems department?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = 'Computer Info. Systems'", "answer": "How many courses does the department of Computer Information Systmes offer?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211'", "answer": "How many sections does course ACCT-211 has?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211'", "answer": "What is the number of different class sections offered in the course ACCT-211?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "Find the total credits of all classes offered by each department.\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What are the total number of credits offered by each department?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "Find the name of the department that offers the largest number of credits of all classes.\nAdditional table information: table: college_1"} -{"question": "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", "answer": "Which department offers the most credits all together?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'", "answer": "How many students enrolled in class ACCT-211?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'", "answer": "What are the total number of students enrolled in ACCT-211?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What is the first name of each student enrolled in class ACCT-211?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What are the first names of all students in course ACCT-211?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What is the first name of students enrolled in class ACCT-211 and got grade C?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What are the first names of all students who took ACCT-211 and received a C?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*) FROM employee", "answer": "Find the total number of employees.\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*) FROM employee", "answer": "How many employees are there all together?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.'", "answer": "How many professors do have a Ph.D. degree?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.'", "answer": "What is the total number of professors with a Ph.D. ?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "How many students are enrolled in the class taught by some professor from the accounting department?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "How many students are enrolled in some classes that are taught by an accounting professor?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What is the name of the department that has the largest number of students enrolled?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What is the name of the department with the most students enrolled?\nAdditional table information: table: college_1"} -{"question": "SELECT dept_name FROM department ORDER BY dept_name NULLS FIRST", "answer": "list names of all departments ordered by their names.\nAdditional table information: table: college_1"} -{"question": "SELECT dept_name FROM department ORDER BY dept_name NULLS FIRST", "answer": "What are the names of all departments in alphabetical order?\nAdditional table information: table: college_1"} -{"question": "SELECT class_code FROM CLASS WHERE class_room = 'KLR209'", "answer": "List the codes of all courses that take place in room KLR209.\nAdditional table information: table: college_1"} -{"question": "SELECT class_code FROM CLASS WHERE class_room = 'KLR209'", "answer": "What are the codes of all the courses that are located in room KLR209?\nAdditional table information: table: college_1"} -{"question": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob NULLS FIRST", "answer": "List the first name of all employees with job code PROF ordered by their date of birth.\nAdditional table information: table: college_1"} -{"question": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob NULLS FIRST", "answer": "What are the first names of all employees that are professors ordered by date of birth?\nAdditional table information: table: college_1"} -{"question": "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 NULLS FIRST", "answer": "Find the first names and offices of all professors sorted by alphabetical order of their first name.\nAdditional table information: table: college_1"} -{"question": "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 NULLS FIRST", "answer": "What are the first names and office locations for all professors sorted alphabetically by first name?\nAdditional table information: table: college_1"} -{"question": "SELECT emp_fname, emp_lname FROM employee ORDER BY emp_dob NULLS FIRST LIMIT 1", "answer": "What is the first and last name of the oldest employee?\nAdditional table information: table: college_1"} -{"question": "SELECT emp_fname, emp_lname FROM employee ORDER BY emp_dob NULLS FIRST LIMIT 1", "answer": "What are the first and last names of the employee with the earliest date of birth?\nAdditional table information: table: college_1"} -{"question": "SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1", "answer": "What is the first, last name, gpa of the youngest one among students whose GPA is above 3?\nAdditional table information: table: college_1"} -{"question": "SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1", "answer": "What is the first and last name of the youngest student with a GPA above 3, and what is their GPA?\nAdditional table information: table: college_1"} -{"question": "SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'", "answer": "What is the first name of students who got grade C in any class?\nAdditional table information: table: college_1"} -{"question": "SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'", "answer": "What are the first names of all students who got a grade C in a class?\nAdditional table information: table: college_1"} -{"question": "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(*) NULLS FIRST LIMIT 1", "answer": "What is the name of department where has the smallest number of professors?\nAdditional table information: table: college_1"} -{"question": "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(*) NULLS FIRST LIMIT 1", "answer": "What is the name of the department with the fewest professors?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What is the name of department where has the largest number of professors with a Ph.D. degree?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "Which department has the most professors with a Ph.D.?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What are the first names of the professors who do not teach a class.\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What are the first names of all professors not teaching any classes?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What is the first names of the professors from the history department who do not teach a class.\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What are the first names of all history professors who do not teach?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What is the last name and office of the professor from the history department?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What are the last name and office of all history professors?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What is department name and office for the professor whose last name is Heffington?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What is the name of the department and office location for the professor with the last name of Heffington?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "Find the last name and hire date of the professor who is in office DRE 102.\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What is the last name of the professor whose office is located in DRE 102, and when were they hired?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What is the code of the course which the student whose last name is Smithson took?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What are the course codes for every class that the student with the last name Smithson took?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What are the description and credit of the course which the student whose last name is Smithson took?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "How many credits is the course that the student with the last name Smithson took, and what is its description?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'", "answer": "How many professors who has a either Ph.D. or MA degree?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'", "answer": "How many professors attained either Ph.D. or Masters degrees?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "How many professors who are from either Accounting or Biology department?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What is the number of professors who are in the Accounting or Biology departments?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261.\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What is the first name of the professor who is teaching CIS-220 and QM-261?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "Find the first name of student who is taking classes from accounting and Computer Info. Systems departments\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What are the first names of all students taking accoutning and Computer Information Systems classes?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What is the average gpa of the students enrolled in the course with code ACCT-211?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What is the average GPA of students taking ACCT-211?\nAdditional table information: table: college_1"} -{"question": "SELECT stu_gpa, stu_phone, stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5", "answer": "What is the first name, gpa and phone number of the top 5 students with highest gpa?\nAdditional table information: table: college_1"} -{"question": "SELECT stu_gpa, stu_phone, stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5", "answer": "What is the first name, GPA, and phone number of the students with the top 5 GPAs?\nAdditional table information: table: college_1"} -{"question": "SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa NULLS FIRST LIMIT 1", "answer": "What is the department name of the students with lowest gpa belongs to?\nAdditional table information: table: college_1"} -{"question": "SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa NULLS FIRST LIMIT 1", "answer": "What is the name of the department with the student that has the lowest GPA?\nAdditional table information: table: college_1"} -{"question": "SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student)", "answer": "Find the first name and gpa of the students whose gpa is lower than the average gpa of all students.\nAdditional table information: table: college_1"} -{"question": "SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student)", "answer": "What is the first name and GPA of every student that has a GPA lower than average?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "Find the name and address of the department that has the highest number of students.\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What is the name and address of the department with the most students?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "Find the name, address, number of students in the departments that have the top 3 highest number of students.\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What is the name, address, and number of students in the departments that have the 3 most students?\nAdditional table information: table: college_1"} -{"question": "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.'", "answer": "Find the first name and office of the professor who is in the history department and has a Ph.D. degree.\nAdditional table information: table: college_1"} -{"question": "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.'", "answer": "What are the first names and office of the professors who are in the history department and have a Ph.D?\nAdditional table information: table: college_1"} -{"question": "SELECT T2.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num", "answer": "Find the first names of all instructors who have taught some course and the course code.\nAdditional table information: table: college_1"} -{"question": "SELECT T2.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num", "answer": "What are the first names of all teachers who have taught a course and the corresponding course codes?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "Find the first names of all instructors who have taught some course and the course description.\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What are the first names of all teachers who have taught a course and the corresponding descriptions?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "Find the first names and offices of all instructors who have taught some course and also find the course description.\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What are the first names, office locations of all lecturers who have taught some course?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "Find the first names and offices of all instructors who have taught some course and the course description and the department name.\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What are the first names, office locations, and departments of all instructors, and also what are the descriptions of the courses they teach?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "Find names of all students who took some course and the course description.\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What are the names of all students who took a class and the corresponding course descriptions?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "Find names of all students who took some course and got A or C.\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What are the names of all students taking a course who received an A or C?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "Find the first names of all professors in the Accounting department who is teaching some course and the class room.\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach?\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department.\nAdditional table information: table: college_1"} -{"question": "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'", "answer": "What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What is the last name of the student who got a grade A in the class with code 10018.\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What is the last name of the student who received an A in the class with the code 10018?\nAdditional table information: table: college_1"} -{"question": "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.'", "answer": "Find the first name and office of history professor who did not get a Ph.D. degree.\nAdditional table information: table: college_1"} -{"question": "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.'", "answer": "What are the first names and offices of history professors who don't have Ph.D.s?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "Find the first names of professors who are teaching more than one class.\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What are the first names of all professors who teach more than one class?\nAdditional table information: table: college_1"} -{"question": "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", "answer": "Find the first names of students who took exactly one class.\nAdditional table information: table: college_1"} -{"question": "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", "answer": "What are the first names of student who only took one course?\nAdditional table information: table: college_1"} -{"question": "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%'", "answer": "Find the name of department that offers the class whose description has the word 'Statistics'.\nAdditional table information: table: college_1"} -{"question": "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%'", "answer": "What is the name of the department that offers a course that has a description including the word 'Statistics'?\nAdditional table information: table: college_1"} -{"question": "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%'", "answer": "What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class?\nAdditional table information: table: college_1"} -{"question": "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%'", "answer": "What is the first name of the student whose last name starts with the letter S and is taking ACCT-211?\nAdditional table information: table: college_1"} -{"question": "SELECT COUNT(*) FROM club", "answer": "How many clubs are there?\nAdditional table information: table: sports_competition"} -{"question": "SELECT COUNT(*) FROM club", "answer": "What is the total number of clubs?\nAdditional table information: table: sports_competition"} -{"question": "SELECT DISTINCT Region FROM club ORDER BY Region ASC NULLS FIRST", "answer": "List the distinct region of clubs in ascending alphabetical order.\nAdditional table information: table: sports_competition"} -{"question": "SELECT DISTINCT Region FROM club ORDER BY Region ASC NULLS FIRST", "answer": "What are the different regions of clubs in ascending alphabetical order?\nAdditional table information: table: sports_competition"} -{"question": "SELECT AVG(Gold) FROM club_rank", "answer": "What is the average number of gold medals for clubs?\nAdditional table information: table: sports_competition"} -{"question": "SELECT AVG(Gold) FROM club_rank", "answer": "What is the average number of gold medals for a club?\nAdditional table information: table: sports_competition"} -{"question": "SELECT Competition_type, Country FROM competition", "answer": "What are the types and countries of competitions?\nAdditional table information: table: sports_competition"} -{"question": "SELECT Competition_type, Country FROM competition", "answer": "What are the types of every competition and in which countries are they located?\nAdditional table information: table: sports_competition"} -{"question": "SELECT DISTINCT YEAR FROM competition WHERE Competition_type <> 'Tournament'", "answer": "What are the distinct years in which the competitions type is not 'Tournament'?\nAdditional table information: table: sports_competition"} -{"question": "SELECT DISTINCT YEAR FROM competition WHERE Competition_type <> 'Tournament'", "answer": "What are the different years for all competitions that are not of type equal to tournament?\nAdditional table information: table: sports_competition"} -{"question": "SELECT MAX(Silver), MIN(Silver) FROM club_rank", "answer": "What are the maximum and minimum number of silver medals for clubs.\nAdditional table information: table: sports_competition"} -{"question": "SELECT MAX(Silver), MIN(Silver) FROM club_rank", "answer": "What are the maximum and minimum number of silver medals for all the clubs?\nAdditional table information: table: sports_competition"} -{"question": "SELECT COUNT(*) FROM club_rank WHERE Total < 10", "answer": "How many clubs have total medals less than 10?\nAdditional table information: table: sports_competition"} -{"question": "SELECT COUNT(*) FROM club_rank WHERE Total < 10", "answer": "What is the total number of clubs that have less than 10 medals in total?\nAdditional table information: table: sports_competition"} -{"question": "SELECT name FROM club ORDER BY Start_year ASC NULLS FIRST", "answer": "List all club names in ascending order of start year.\nAdditional table information: table: sports_competition"} -{"question": "SELECT name FROM club ORDER BY Start_year ASC NULLS FIRST", "answer": "What are the names of all the clubs starting with the oldest?\nAdditional table information: table: sports_competition"} -{"question": "SELECT name FROM club ORDER BY name DESC", "answer": "List all club names in descending alphabetical order.\nAdditional table information: table: sports_competition"} -{"question": "SELECT name FROM club ORDER BY name DESC", "answer": "What are the names of all the clubs ordered in descending alphabetical order?\nAdditional table information: table: sports_competition"} -{"question": "SELECT T1.name, T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID", "answer": "Please show the names and the players of clubs.\nAdditional table information: table: sports_competition"} -{"question": "SELECT T1.name, T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID", "answer": "What are the names and players of all the clubs?\nAdditional table information: table: sports_competition"} -{"question": "SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = 'Right Wing'", "answer": "Show the names of clubs that have players with position 'Right Wing'.\nAdditional table information: table: sports_competition"} -{"question": "SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = 'Right Wing'", "answer": "What are the names of the clubs that have players in the position of 'Right Wing'?\nAdditional table information: table: sports_competition"} -{"question": "SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = 'AIB'", "answer": "What is the average points of players from club with name 'AIB'.\nAdditional table information: table: sports_competition"} -{"question": "SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = 'AIB'", "answer": "What is the average number of points for players from the 'AIB' club?\nAdditional table information: table: sports_competition"} -{"question": "SELECT POSITION, AVG(Points) FROM player GROUP BY POSITION", "answer": "List the position of players and the average number of points of players of each position.\nAdditional table information: table: sports_competition"} -{"question": "SELECT POSITION, AVG(Points) FROM player GROUP BY POSITION", "answer": "For each position, what is the average number of points for players in that position?\nAdditional table information: table: sports_competition"} -{"question": "SELECT POSITION FROM player GROUP BY name HAVING AVG(Points) >= 20", "answer": "List the position of players with average number of points scored by players of that position bigger than 20.\nAdditional table information: table: sports_competition"} -{"question": "SELECT POSITION FROM player GROUP BY name HAVING AVG(Points) >= 20", "answer": "What are the positions of players whose average number of points scored by that position is larger than 20?\nAdditional table information: table: sports_competition"} -{"question": "SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type", "answer": "List the types of competition and the number of competitions of each type.\nAdditional table information: table: sports_competition"} -{"question": "SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type", "answer": "What are the types of competition and number of competitions for that type?\nAdditional table information: table: sports_competition"} -{"question": "SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the most common type of competition.\nAdditional table information: table: sports_competition"} -{"question": "SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common competition type?\nAdditional table information: table: sports_competition"} -{"question": "SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5", "answer": "List the types of competition that have at most five competitions of that type.\nAdditional table information: table: sports_competition"} -{"question": "SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5", "answer": "What are the types of competition that have most 5 competitions for that type?\nAdditional table information: table: sports_competition"} -{"question": "SELECT name FROM CLub WHERE NOT Club_ID IN (SELECT Club_ID FROM player)", "answer": "List the names of clubs that do not have any players.\nAdditional table information: table: sports_competition"} -{"question": "SELECT name FROM CLub WHERE NOT Club_ID IN (SELECT Club_ID FROM player)", "answer": "What are the names of all clubs that do not have any players?\nAdditional table information: table: sports_competition"} -{"question": "SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10", "answer": "What are the positions with both players having more than 20 points and less than 10 points.\nAdditional table information: table: sports_competition"} -{"question": "SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10", "answer": "What are the positions of both players that have more than 20 20 points and less than 10 points?\nAdditional table information: table: sports_competition"} -{"question": "SELECT SUM(Points) FROM player", "answer": "Show total points of all players.\nAdditional table information: table: sports_competition"} -{"question": "SELECT SUM(Points) FROM player", "answer": "What is the total number of points for all players?\nAdditional table information: table: sports_competition"} -{"question": "SELECT COUNT(DISTINCT POSITION) FROM player", "answer": "how many different positions are there?\nAdditional table information: table: sports_competition"} -{"question": "SELECT COUNT(DISTINCT POSITION) FROM player", "answer": "How many different position for players are listed?\nAdditional table information: table: sports_competition"} -{"question": "SELECT name FROM player WHERE points > (SELECT AVG(points) FROM player)", "answer": "what are the name of players who get more than the average points.\nAdditional table information: table: sports_competition"} -{"question": "SELECT name FROM player WHERE points > (SELECT AVG(points) FROM player)", "answer": "What are the names of all players that got more than the average number of points?\nAdditional table information: table: sports_competition"} -{"question": "SELECT COUNT(*), POSITION FROM player WHERE points < 30 GROUP BY POSITION", "answer": "find the number of players whose points are lower than 30 in each position.\nAdditional table information: table: sports_competition"} -{"question": "SELECT COUNT(*), POSITION FROM player WHERE points < 30 GROUP BY POSITION", "answer": "What is the number of players who have points less than 30 for each position?\nAdditional table information: table: sports_competition"} -{"question": "SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "which country did participated in the most number of Tournament competitions?\nAdditional table information: table: sports_competition"} -{"question": "SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "what is the name of the country that participated in the most tournament competitions?\nAdditional table information: table: sports_competition"} -{"question": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'", "answer": "which countries did participated in both Friendly and Tournament type competitions.\nAdditional table information: table: sports_competition"} -{"question": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'", "answer": "What are the countries that participated in both friendly and tournament type competitions?\nAdditional table information: table: sports_competition"} -{"question": "SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'", "answer": "Find the countries that have never participated in any competition with Friendly type.\nAdditional table information: table: sports_competition"} -{"question": "SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'", "answer": "What are the countries that have never participated in any friendly-type competitions?\nAdditional table information: table: sports_competition"} -{"question": "SELECT SUM(num_of_component) FROM furniture", "answer": "How many furniture components are there in total?\nAdditional table information: table: manufacturer"} -{"question": "SELECT name, furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1", "answer": "Return the name and id of the furniture with the highest market rate.\nAdditional table information: table: manufacturer"} -{"question": "SELECT SUM(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2", "answer": "find the total market rate of the furnitures that have the top 2 market shares.\nAdditional table information: table: manufacturer"} -{"question": "SELECT Num_of_Component, name FROM furniture WHERE Num_of_Component > 10", "answer": "Find the component amounts and names of all furnitures that have more than 10 components.\nAdditional table information: table: manufacturer"} -{"question": "SELECT name, Num_of_Component FROM furniture ORDER BY market_rate NULLS FIRST LIMIT 1", "answer": "Find the name and component amount of the least popular furniture.\nAdditional table information: table: manufacturer"} -{"question": "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)", "answer": "Find the names of furnitures whose prices are lower than the highest price.\nAdditional table information: table: manufacturer"} -{"question": "SELECT open_year, name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1", "answer": "Which manufacturer has the most number of shops? List its name and year of opening.\nAdditional table information: table: manufacturer"} -{"question": "SELECT AVG(Num_of_Factories) FROM manufacturer WHERE num_of_shops > 20", "answer": "Find the average number of factories for the manufacturers that have more than 20 shops.\nAdditional table information: table: manufacturer"} -{"question": "SELECT name, manufacturer_id FROM manufacturer ORDER BY open_year NULLS FIRST", "answer": "List all manufacturer names and ids ordered by their opening year.\nAdditional table information: table: manufacturer"} -{"question": "SELECT name, open_year FROM manufacturer WHERE num_of_shops > 10 OR Num_of_Factories < 10", "answer": "Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.\nAdditional table information: table: manufacturer"} -{"question": "SELECT MAX(num_of_shops), AVG(Num_of_Factories) FROM manufacturer WHERE open_year < 1990", "answer": "what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.\nAdditional table information: table: manufacturer"} -{"question": "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", "answer": "Find the id and number of shops for the company that produces the most expensive furniture.\nAdditional table information: table: manufacturer"} -{"question": "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", "answer": "Find the number of funiture types produced by each manufacturer as well as the company names.\nAdditional table information: table: manufacturer"} -{"question": "SELECT t1.name, t2.price_in_dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID", "answer": "Give me the names and prices of furnitures which some companies are manufacturing.\nAdditional table information: table: manufacturer"} -{"question": "SELECT Market_Rate, name FROM furniture WHERE NOT Furniture_ID IN (SELECT Furniture_ID FROM furniture_manufacte)", "answer": "Find the market shares and names of furnitures which no any company is producing in our records.\nAdditional table information: table: manufacturer"} -{"question": "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", "answer": "Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components.\nAdditional table information: table: manufacturer"} -{"question": "SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "answer": "Display the first name and department name for each employee.\nAdditional table information: table: hr_1"} -{"question": "SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "answer": "What are the first name and department name of all employees?\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, salary FROM employees WHERE salary < 6000", "answer": "List the full name (first and last name), and salary for those employees who earn below 6000.\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, salary FROM employees WHERE salary < 6000", "answer": "What are the full names and salaries for any employees earning less than 6000?\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, department_id FROM employees WHERE last_name = 'McEwen'", "answer": "Display the first name, and department number for all employees whose last name is 'McEwen'.\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, department_id FROM employees WHERE last_name = 'McEwen'", "answer": "What are the first names and department numbers for employees with last name McEwen?\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE department_id = 'null'", "answer": "Return all the information for all employees without any department number.\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE department_id = 'null'", "answer": "What are all the employees without a department number?\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM departments WHERE department_name = 'Marketing'", "answer": "Display all the information about the department Marketing.\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM departments WHERE department_name = 'Marketing'", "answer": "What is all the information about the Marketing department?\nAdditional table information: table: hr_1"} -{"question": "SELECT hire_date FROM employees WHERE NOT first_name LIKE '%M%'", "answer": "when is the hire date for those employees whose first name does not containing the letter M?\nAdditional table information: table: hr_1"} -{"question": "SELECT hire_date FROM employees WHERE NOT first_name LIKE '%M%'", "answer": "On what dates were employees without the letter M in their first names hired?\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%'", "answer": "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.\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%'", "answer": "What are the full name, hire date, salary, and department id for employees without the letter M in their first name?\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%' ORDER BY department_id NULLS FIRST", "answer": "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.\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%' ORDER BY department_id NULLS FIRST", "answer": "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?\nAdditional table information: table: hr_1"} -{"question": "SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000", "answer": "what is the phone number of employees whose salary is in the range of 8000 and 12000?\nAdditional table information: table: hr_1"} -{"question": "SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000", "answer": "Return the phone numbers of employees with salaries between 8000 and 12000.\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct <> 'null' OR department_id <> 40", "answer": "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.\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct <> 'null' OR department_id <> 40", "answer": "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.\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, salary FROM employees WHERE commission_pct = 'null'", "answer": "What are the full name (first and last name) and salary for all employees who does not have any value for commission?\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, salary FROM employees WHERE commission_pct = 'null'", "answer": "Return the full names and salaries of employees with null commissions.\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, salary FROM employees WHERE first_name LIKE '%m'", "answer": "Display the first and last name, and salary for those employees whose first name is ending with the letter m.\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, salary FROM employees WHERE first_name LIKE '%m'", "answer": "Return the full names and salaries for employees with first names that end with the letter m.\nAdditional table information: table: hr_1"} -{"question": "SELECT job_id, hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'", "answer": "Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009.\nAdditional table information: table: hr_1"} -{"question": "SELECT job_id, hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'", "answer": "What are the job ids and dates of hire for employees hired after November 5th, 2007 and before July 5th, 2009?\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name FROM employees WHERE department_id = 70 OR department_id = 90", "answer": "What are the first and last name for those employees who works either in department 70 or 90?\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name FROM employees WHERE department_id = 70 OR department_id = 90", "answer": "What are the full names of employees who with in department 70 or 90?\nAdditional table information: table: hr_1"} -{"question": "SELECT salary, manager_id FROM employees WHERE manager_id <> 'null'", "answer": "Find the salary and manager number for those employees who is working under a manager.\nAdditional table information: table: hr_1"} -{"question": "SELECT salary, manager_id FROM employees WHERE manager_id <> 'null'", "answer": "What are the salaries and manager ids for employees who have managers?\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE hire_date < '2002-06-21'", "answer": "display all the details from Employees table for those employees who was hired before 2002-06-21.\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE hire_date < '2002-06-21'", "answer": "What is all the information about employees hired before June 21, 2002?\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC", "answer": "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.\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC", "answer": "What is all the information about employees with D or S in their first name, ordered by salary descending?\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE hire_date > '1987-09-07'", "answer": "display those employees who joined after 7th September, 1987.\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE hire_date > '1987-09-07'", "answer": "Which employees were hired after September 7th, 1987?\nAdditional table information: table: hr_1"} -{"question": "SELECT job_title FROM jobs WHERE min_salary > 9000", "answer": "display the job title of jobs which minimum salary is greater than 9000.\nAdditional table information: table: hr_1"} -{"question": "SELECT job_title FROM jobs WHERE min_salary > 9000", "answer": "Which job titles correspond to jobs with salaries over 9000?\nAdditional table information: table: hr_1"} -{"question": "SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000", "answer": "display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000.\nAdditional table information: table: hr_1"} -{"question": "SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000", "answer": "What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000?\nAdditional table information: table: hr_1"} -{"question": "SELECT email FROM employees WHERE commission_pct = 'null' AND salary BETWEEN 7000 AND 12000 AND department_id = 50", "answer": "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.\nAdditional table information: table: hr_1"} -{"question": "SELECT email FROM employees WHERE commission_pct = 'null' AND salary BETWEEN 7000 AND 12000 AND department_id = 50", "answer": "What are the emails of employees with null commission, salary between 7000 and 12000, and who work in department 50?\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id, MAX(end_date) FROM job_history GROUP BY employee_id", "answer": "display the employee ID for each employee and the date on which he ended his previous job.\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id, MAX(end_date) FROM job_history GROUP BY employee_id", "answer": "What are the employee ids for each employee and final dates of employment at their last job?\nAdditional table information: table: hr_1"} -{"question": "SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10", "answer": "display those departments where more than ten employees work who got a commission percentage.\nAdditional table information: table: hr_1"} -{"question": "SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10", "answer": "What are the department ids for which more than 10 employees had a commission?\nAdditional table information: table: hr_1"} -{"question": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4", "answer": "Find the ids of the departments where any manager is managing 4 or more employees.\nAdditional table information: table: hr_1"} -{"question": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4", "answer": "What are department ids for departments with managers managing more than 3 employees?\nAdditional table information: table: hr_1"} -{"question": "SELECT department_id, AVG(salary) FROM employees WHERE commission_pct <> 'null' GROUP BY department_id", "answer": "display the average salary of employees for each department who gets a commission percentage.\nAdditional table information: table: hr_1"} -{"question": "SELECT department_id, AVG(salary) FROM employees WHERE commission_pct <> 'null' GROUP BY department_id", "answer": "What is the average salary of employees who have a commission percentage that is not null?\nAdditional table information: table: hr_1"} -{"question": "SELECT country_id, COUNT(*) FROM locations GROUP BY country_id", "answer": "display the country ID and number of cities for each country.\nAdditional table information: table: hr_1"} -{"question": "SELECT country_id, COUNT(*) FROM locations GROUP BY country_id", "answer": "Give the country id and corresponding count of cities in each country.\nAdditional table information: table: hr_1"} -{"question": "SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2", "answer": "display job ID for those jobs that were done by two or more for more than 300 days.\nAdditional table information: table: hr_1"} -{"question": "SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2", "answer": "What are the job ids for jobs done more than once for a period of more than 300 days?\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2", "answer": "display the ID for those employees who did two or more jobs in the past.\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2", "answer": "What are the employee ids for employees who have held two or more jobs?\nAdditional table information: table: hr_1"} -{"question": "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", "answer": "Find employee with ID and name of the country presently where (s)he is working.\nAdditional table information: table: hr_1"} -{"question": "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", "answer": "What are all the employee ids and the names of the countries in which they work?\nAdditional table information: table: hr_1"} -{"question": "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", "answer": "display the department name and number of employees in each of the department.\nAdditional table information: table: hr_1"} -{"question": "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", "answer": "Give the name of each department and the number of employees in each.\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000", "answer": "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?\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000", "answer": "What is all the job history info done by employees earning a salary greater than or equal to 12000?\nAdditional table information: table: hr_1"} -{"question": "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", "answer": "display job title and average salary of employees.\nAdditional table information: table: hr_1"} -{"question": "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", "answer": "What is the average salary for each job title?\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163)", "answer": "What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163?\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163)", "answer": "Provide the full names of employees earning more than the employee with id 163.\nAdditional table information: table: hr_1"} -{"question": "SELECT MIN(salary), department_id FROM employees GROUP BY department_id", "answer": "return the smallest salary for every departments.\nAdditional table information: table: hr_1"} -{"question": "SELECT MIN(salary), department_id FROM employees GROUP BY department_id", "answer": "What is the minimum salary in each department?\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)", "answer": "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.\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)", "answer": "What are the full names and department ids for the lowest paid employees across all departments.\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)", "answer": "Find the employee id for all employees who earn more than the average salary.\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)", "answer": "What are the employee ids for employees who make more than the average?\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam')", "answer": "display the employee id and salary of all employees who report to Payam (first name).\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam')", "answer": "What are the employee ids of employees who report to Payam, and what are their salaries?\nAdditional table information: table: hr_1"} -{"question": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "answer": "find the name of all departments that do actually have one or more employees assigned to them.\nAdditional table information: table: hr_1"} -{"question": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "answer": "What are the names of departments that have at least one employee.\nAdditional table information: table: hr_1"} -{"question": "SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id", "answer": "get the details of employees who manage a department.\nAdditional table information: table: hr_1"} -{"question": "SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id", "answer": "What is all the information regarding employees who are managers?\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM departments WHERE department_name = 'Marketing'", "answer": "display all the information about the department Marketing.\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM departments WHERE department_name = 'Marketing'", "answer": "What is all the information about the Marketing department?\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2", "answer": "display the ID for those employees who did two or more jobs in the past.\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2", "answer": "What are the employee ids for those who had two or more jobs.\nAdditional table information: table: hr_1"} -{"question": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4", "answer": "What are the unique ids of those departments where any manager is managing 4 or more employees.\nAdditional table information: table: hr_1"} -{"question": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4", "answer": "Give the distinct department ids of departments in which a manager is in charge of 4 or more employees?\nAdditional table information: table: hr_1"} -{"question": "SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000", "answer": "Find the job ID for those jobs which average salary is above 8000.\nAdditional table information: table: hr_1"} -{"question": "SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000", "answer": "What are the job ids corresponding to jobs with average salary above 8000?\nAdditional table information: table: hr_1"} -{"question": "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", "answer": "display the employee ID and job name for all those jobs in department 80.\nAdditional table information: table: hr_1"} -{"question": "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", "answer": "what are the employee ids and job titles for employees in department 80?\nAdditional table information: table: hr_1"} -{"question": "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'", "answer": "What is the first name and job id for all employees in the Finance department?\nAdditional table information: table: hr_1"} -{"question": "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'", "answer": "Give the first name and job id for all employees in the Finance department.\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500", "answer": "display all the information of the employees whose salary if within the range of smallest salary and 2500.\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500", "answer": "What is all the information regarding employees with salaries above the minimum and under 2500?\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE NOT department_id IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)", "answer": "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.\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE NOT department_id IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)", "answer": "What are the ids for employees who do not work in departments with managers that have ids between 100 and 200?\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara')", "answer": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara.\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara')", "answer": "What are the full names and hire dates for employees in the same department as someone with the first name Clara?\nAdditional table information: table: hr_1"} -{"question": "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'", "answer": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara.\nAdditional table information: table: hr_1"} -{"question": "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'", "answer": "What are the full names and hire dates for employees in the same department as someone with the first name Clara, not including Clara?\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%')", "answer": "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.\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%')", "answer": "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?\nAdditional table information: table: hr_1"} -{"question": "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%')", "answer": "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.\nAdditional table information: table: hr_1"} -{"question": "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%')", "answer": "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?\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN')", "answer": "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.\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN')", "answer": "What are the employee ids and job ids for employees who make less than the lowest earning employee with title MK_MAN?\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN')", "answer": "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.\nAdditional table information: table: hr_1"} -{"question": "SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN')", "answer": "What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?\nAdditional table information: table: hr_1"} -{"question": "SELECT department_id, SUM(salary) FROM employees GROUP BY department_id HAVING COUNT(*) >= 2", "answer": "display the department id and the total salary for those departments which contains at least two employees.\nAdditional table information: table: hr_1"} -{"question": "SELECT department_id, SUM(salary) FROM employees GROUP BY department_id HAVING COUNT(*) >= 2", "answer": "What are total salaries and department id for each department that has more than 2 employees?\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE NOT employee_id IN (SELECT employee_id FROM job_history)", "answer": "display all the information of those employees who did not have any job in the past.\nAdditional table information: table: hr_1"} -{"question": "SELECT * FROM employees WHERE NOT employee_id IN (SELECT employee_id FROM job_history)", "answer": "What is all the information about employees who have never had a job in the past?\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, salary, department_id, MAX(salary) FROM employees GROUP BY department_id", "answer": "display the department ID, full name (first and last name), salary for those employees who is highest salary in every department.\nAdditional table information: table: hr_1"} -{"question": "SELECT first_name, last_name, salary, department_id, MAX(salary) FROM employees GROUP BY department_id", "answer": "What are the department ids, full names, and salaries for employees who make the most in their departments?\nAdditional table information: table: hr_1"} -{"question": "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", "answer": "display the first and last name, department, city, and state province for each employee.\nAdditional table information: table: hr_1"} -{"question": "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", "answer": "What are the full names, departments, cities, and state provinces for each employee?\nAdditional table information: table: hr_1"} -{"question": "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%'", "answer": "display those employees who contain a letter z to their first name and also display their last name, city.\nAdditional table information: table: hr_1"} -{"question": "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%'", "answer": "What are the full names and cities of employees who have the letter Z in their first names?\nAdditional table information: table: hr_1"} -{"question": "SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id", "answer": "display the department name, city, and state province for each department.\nAdditional table information: table: hr_1"} -{"question": "SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id", "answer": "What are the department names, cities, and state provinces for each department?\nAdditional table information: table: hr_1"} -{"question": "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", "answer": "display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working.\nAdditional table information: table: hr_1"} -{"question": "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", "answer": "What the full names, ids of each employee and the name of the country they are in?\nAdditional table information: table: hr_1"} -{"question": "SELECT department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name", "answer": "display the department name and number of employees in each of the department.\nAdditional table information: table: hr_1"} -{"question": "SELECT department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name", "answer": "What are the department names and how many employees work in each of them?\nAdditional table information: table: hr_1"} -{"question": "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'", "answer": "display the full name (first and last name), and salary of those employees who working in any department located in London.\nAdditional table information: table: hr_1"} -{"question": "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'", "answer": "What are full names and salaries of employees working in the city of London?\nAdditional table information: table: hr_1"} -{"question": "SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1", "answer": "What is the name of the song that was released in the most recent year?\nAdditional table information: table: music_1"} -{"question": "SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1", "answer": "What is the name of the song that was released most recently?\nAdditional table information: table: music_1"} -{"question": "SELECT f_id FROM files ORDER BY duration DESC LIMIT 1", "answer": "What is the id of the longest song?\nAdditional table information: table: music_1"} -{"question": "SELECT f_id FROM files ORDER BY duration DESC LIMIT 1", "answer": "Find the id of the song that lasts the longest.\nAdditional table information: table: music_1"} -{"question": "SELECT song_name FROM song WHERE languages = 'english'", "answer": "Find the names of all English songs.\nAdditional table information: table: music_1"} -{"question": "SELECT song_name FROM song WHERE languages = 'english'", "answer": "What are the names of all songs in English?\nAdditional table information: table: music_1"} -{"question": "SELECT f_id FROM files WHERE formats = 'mp3'", "answer": "What are the id of songs whose format is mp3.\nAdditional table information: table: music_1"} -{"question": "SELECT f_id FROM files WHERE formats = 'mp3'", "answer": "What are the id of all the files in mp3 format?\nAdditional table information: table: music_1"} -{"question": "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", "answer": "List the name and country of origin for all singers who have produced songs with rating above 9.\nAdditional table information: table: music_1"} -{"question": "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", "answer": "What are the different names and countries of origins for all artists whose song ratings are above 9?\nAdditional table information: table: music_1"} -{"question": "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", "answer": "List the file size and format for all songs that have resolution lower than 800.\nAdditional table information: table: music_1"} -{"question": "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", "answer": "What are the file sizes and formats for all songs with a resolution lower than 800?\nAdditional table information: table: music_1"} -{"question": "SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration NULLS FIRST LIMIT 1", "answer": "What is the name of the artist who produced the shortest song?\nAdditional table information: table: music_1"} -{"question": "SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration NULLS FIRST LIMIT 1", "answer": "What are the names of the artists who sang the shortest song?\nAdditional table information: table: music_1"} -{"question": "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", "answer": "What are the names and countries of origin for the artists who produced the top three highly rated songs.\nAdditional table information: table: music_1"} -{"question": "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", "answer": "What are the names of the singers who sang the top 3 most highly rated songs and what countries do they hail from?\nAdditional table information: table: music_1"} -{"question": "SELECT COUNT(*) FROM files WHERE duration LIKE '4:%'", "answer": "How many songs have 4 minute duration?\nAdditional table information: table: music_1"} -{"question": "SELECT COUNT(*) FROM files WHERE duration LIKE '4:%'", "answer": "What is the count of the songs that last approximately 4 minutes?\nAdditional table information: table: music_1"} -{"question": "SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh'", "answer": "How many artists are from Bangladesh?\nAdditional table information: table: music_1"} -{"question": "SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh'", "answer": "How many Bangladeshi artists are listed?\nAdditional table information: table: music_1"} -{"question": "SELECT AVG(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female'", "answer": "What is the average rating of songs produced by female artists?\nAdditional table information: table: music_1"} -{"question": "SELECT AVG(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female'", "answer": "How many songs, on average, are sung by a female artist?\nAdditional table information: table: music_1"} -{"question": "SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most popular file format?\nAdditional table information: table: music_1"} -{"question": "SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the file format that is used by the most files.\nAdditional table information: table: music_1"} -{"question": "SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT artist_name FROM song WHERE languages = 'english'", "answer": "Find the names of the artists who are from UK and have produced English songs.\nAdditional table information: table: music_1"} -{"question": "SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT artist_name FROM song WHERE languages = 'english'", "answer": "What are the names of the artists that are from the UK and sang songs in English?\nAdditional table information: table: music_1"} -{"question": "SELECT f_id FROM files WHERE formats = 'mp4' INTERSECT SELECT f_id FROM song WHERE resolution < 1000", "answer": "Find the id of songs that are available in mp4 format and have resolution lower than 1000.\nAdditional table information: table: music_1"} -{"question": "SELECT f_id FROM files WHERE formats = 'mp4' INTERSECT SELECT f_id FROM song WHERE resolution < 1000", "answer": "What is the id of the files that are available in the format of mp4 and a resolution smaller than 1000?\nAdditional table information: table: music_1"} -{"question": "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'", "answer": "What is the country of origin of the artist who is female and produced a song in Bangla?\nAdditional table information: table: music_1"} -{"question": "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'", "answer": "What countries are the female artists who sung in the language Bangla from?\nAdditional table information: table: music_1"} -{"question": "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", "answer": "What is the average duration of songs that have mp3 format and resolution below 800?\nAdditional table information: table: music_1"} -{"question": "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", "answer": "What is the average song duration for the songs that are in mp3 format and whose resolution below 800?\nAdditional table information: table: music_1"} -{"question": "SELECT COUNT(*), gender FROM artist GROUP BY gender", "answer": "What is the number of artists for each gender?\nAdditional table information: table: music_1"} -{"question": "SELECT COUNT(*), gender FROM artist GROUP BY gender", "answer": "How many artists are male and how many are female?\nAdditional table information: table: music_1"} -{"question": "SELECT AVG(rating), languages FROM song GROUP BY languages", "answer": "What is the average rating of songs for each language?\nAdditional table information: table: music_1"} -{"question": "SELECT AVG(rating), languages FROM song GROUP BY languages", "answer": "What is the average song rating for each language?\nAdditional table information: table: music_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Return the gender and name of artist who produced the song with the lowest resolution.\nAdditional table information: table: music_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the gender and name of the artist who sang the song with the smallest resolution?\nAdditional table information: table: music_1"} -{"question": "SELECT COUNT(*), formats FROM files GROUP BY formats", "answer": "For each file format, return the number of artists who released songs in that format.\nAdditional table information: table: music_1"} -{"question": "SELECT COUNT(*), formats FROM files GROUP BY formats", "answer": "How many songs were released for each format?\nAdditional table information: table: music_1"} -{"question": "SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT MIN(resolution) FROM song WHERE languages = 'english')", "answer": "Find the distinct names of all songs that have a higher resolution than some songs in English.\nAdditional table information: table: music_1"} -{"question": "SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT MIN(resolution) FROM song WHERE languages = 'english')", "answer": "What are the different names for all songs that have a higher resolution than English songs?\nAdditional table information: table: music_1"} -{"question": "SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = 'blues')", "answer": "What are the names of all songs that have a lower rating than some song of blues genre?\nAdditional table information: table: music_1"} -{"question": "SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = 'blues')", "answer": "What are the names of the songs that have a lower rating than at least one blues song?\nAdditional table information: table: music_1"} -{"question": "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%'", "answer": "What is the name and country of origin of the artist who released a song that has 'love' in its title?\nAdditional table information: table: music_1"} -{"question": "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%'", "answer": "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?\nAdditional table information: table: music_1"} -{"question": "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%'", "answer": "List the name and gender for all artists who released songs in March.\nAdditional table information: table: music_1"} -{"question": "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%'", "answer": "What are the names and genders of all artists who released songs in the month of March?\nAdditional table information: table: music_1"} -{"question": "SELECT g_name, rating FROM genre ORDER BY g_name NULLS FIRST", "answer": "List the names of all genres in alphabetical oder, together with its ratings.\nAdditional table information: table: music_1"} -{"question": "SELECT g_name, rating FROM genre ORDER BY g_name NULLS FIRST", "answer": "What are the names of all genres in alphabetical order, combined with its ratings?\nAdditional table information: table: music_1"} -{"question": "SELECT song_name FROM song ORDER BY resolution NULLS FIRST", "answer": "Give me a list of the names of all songs ordered by their resolution.\nAdditional table information: table: music_1"} -{"question": "SELECT song_name FROM song ORDER BY resolution NULLS FIRST", "answer": "What are the names of all songs that are ordered by their resolution numbers?\nAdditional table information: table: music_1"} -{"question": "SELECT f_id FROM files WHERE formats = 'mp4' UNION SELECT f_id FROM song WHERE resolution > 720", "answer": "What are the ids of songs that are available in either mp4 format or have resolution above 720?\nAdditional table information: table: music_1"} -{"question": "SELECT f_id FROM files WHERE formats = 'mp4' UNION SELECT f_id FROM song WHERE resolution > 720", "answer": "What are the ids of all songs that are available on mp4 or have a higher resolution than 720?\nAdditional table information: table: music_1"} -{"question": "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'", "answer": "List the names of all songs that have 4 minute duration or are in English.\nAdditional table information: table: music_1"} -{"question": "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'", "answer": "What are the names of all songs that are approximately 4 minutes long or are in English?\nAdditional table information: table: music_1"} -{"question": "SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the language used most often in the songs?\nAdditional table information: table: music_1"} -{"question": "SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the languages that are used most often in songs?\nAdditional table information: table: music_1"} -{"question": "SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the language that was used most often in songs with resolution above 500?\nAdditional table information: table: music_1"} -{"question": "SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the artist, for each language, that has the most songs with a higher resolution than 500?\nAdditional table information: table: music_1"} -{"question": "SELECT artist_name FROM artist WHERE country = 'UK' AND gender = 'Male'", "answer": "What are the names of artists who are Male and are from UK?\nAdditional table information: table: music_1"} -{"question": "SELECT artist_name FROM artist WHERE country = 'UK' AND gender = 'Male'", "answer": "What are the names of all male British artists?\nAdditional table information: table: music_1"} -{"question": "SELECT song_name FROM song WHERE genre_is = 'modern' OR languages = 'english'", "answer": "Find the names of songs whose genre is modern or language is English.\nAdditional table information: table: music_1"} -{"question": "SELECT song_name FROM song WHERE genre_is = 'modern' OR languages = 'english'", "answer": "What are the names of the songs that are modern or sung in English?\nAdditional table information: table: music_1"} -{"question": "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", "answer": "Return the names of songs for which format is mp3 and resolution is below 1000.\nAdditional table information: table: music_1"} -{"question": "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", "answer": "What are the names of all songs that are in mp3 format and have a resolution lower than 1000?\nAdditional table information: table: music_1"} -{"question": "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'", "answer": "Return the names of singers who are from UK and released an English song.\nAdditional table information: table: music_1"} -{"question": "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'", "answer": "What are the names of all singers that are from the UK and released a song in English?\nAdditional table information: table: music_1"} -{"question": "SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = 'bangla'", "answer": "What are the average rating and resolution of songs that are in Bangla?\nAdditional table information: table: music_1"} -{"question": "SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = 'bangla'", "answer": "What is the average rating and resolution of all bangla songs?\nAdditional table information: table: music_1"} -{"question": "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:%'", "answer": "What are the maximum and minimum resolution of songs whose duration is 3 minutes?\nAdditional table information: table: music_1"} -{"question": "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:%'", "answer": "What is the maximum and minimum resolution of all songs that are approximately 3 minutes long?\nAdditional table information: table: music_1"} -{"question": "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 NULLS FIRST", "answer": "What are the maximum duration and resolution of songs grouped and ordered by languages?\nAdditional table information: table: music_1"} -{"question": "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 NULLS FIRST", "answer": "What are the maximum duration and resolution of all songs, for each language, ordered alphabetically by language?\nAdditional table information: table: music_1"} -{"question": "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 NULLS FIRST", "answer": "What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre?\nAdditional table information: table: music_1"} -{"question": "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 NULLS FIRST", "answer": "What is the shortest and most poorly rated song for each genre, ordered alphabetically by genre?\nAdditional table information: table: music_1"} -{"question": "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", "answer": "Find the names and number of works of all artists who have at least one English songs.\nAdditional table information: table: music_1"} -{"question": "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", "answer": "What are the names and number of works for all artists who have sung at least one song in English?\nAdditional table information: table: music_1"} -{"question": "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", "answer": "Find the name and country of origin for all artists who have release at least one song of resolution above 900.\nAdditional table information: table: music_1"} -{"question": "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", "answer": "What is the name and country of origin for each artist who has released a song with a resolution higher than 900?\nAdditional table information: table: music_1"} -{"question": "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", "answer": "Find the names and number of works of the three artists who have produced the most songs.\nAdditional table information: table: music_1"} -{"question": "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", "answer": "What are the names of the three artists who have produced the most songs, and how many works did they produce?\nAdditional table information: table: music_1"} -{"question": "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(*) NULLS FIRST LIMIT 1", "answer": "Find the country of origin for the artist who made the least number of songs?\nAdditional table information: table: music_1"} -{"question": "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(*) NULLS FIRST LIMIT 1", "answer": "What country is the artist who made the fewest songs from?\nAdditional table information: table: music_1"} -{"question": "SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english')", "answer": "What are the names of the songs whose rating is below the rating of all songs in English?\nAdditional table information: table: music_1"} -{"question": "SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english')", "answer": "What are the song names for every song whose rating is less than the minimum rating for English songs?\nAdditional table information: table: music_1"} -{"question": "SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8)", "answer": "What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8?\nAdditional table information: table: music_1"} -{"question": "SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8)", "answer": "What is the id of every song that has a resolution higher than that of a song with a rating below 8?\nAdditional table information: table: music_1"} -{"question": "SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = 'modern')", "answer": "What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre?\nAdditional table information: table: music_1"} -{"question": "SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = 'modern')", "answer": "What are the ids of all songs that have higher resolution of the average resolution in the modern genre?\nAdditional table information: table: music_1"} -{"question": "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", "answer": "Find the top 3 artists who have the largest number of songs works whose language is Bangla.\nAdditional table information: table: music_1"} -{"question": "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", "answer": "What are the top 3 artists with the largest number of songs in the language Bangla?\nAdditional table information: table: music_1"} -{"question": "SELECT f_id, genre_is, artist_name FROM song WHERE languages = 'english' ORDER BY rating NULLS FIRST", "answer": "List the id, genre and artist name of English songs ordered by rating.\nAdditional table information: table: music_1"} -{"question": "SELECT f_id, genre_is, artist_name FROM song WHERE languages = 'english' ORDER BY rating NULLS FIRST", "answer": "What is the id, genre, and name of the artist for every English song ordered by ascending rating?\nAdditional table information: table: music_1"} -{"question": "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 NULLS FIRST", "answer": "List the duration, file size and format of songs whose genre is pop, ordered by title?\nAdditional table information: table: music_1"} -{"question": "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 NULLS FIRST", "answer": "What is the duration, file size, and song format for every pop song, ordered by title alphabetically?\nAdditional table information: table: music_1"} -{"question": "SELECT DISTINCT artist_name FROM song WHERE languages = 'english' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8", "answer": "Find the names of the artists who have produced English songs but have never received rating higher than 8.\nAdditional table information: table: music_1"} -{"question": "SELECT DISTINCT artist_name FROM song WHERE languages = 'english' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8", "answer": "What are the names of the different artists that have produced a song in English but have never receieved a rating higher than 8?\nAdditional table information: table: music_1"} -{"question": "SELECT DISTINCT artist_name FROM artist WHERE country = 'Bangladesh' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7", "answer": "Find the names of the artists who are from Bangladesh and have never received rating higher than 7.\nAdditional table information: table: music_1"} -{"question": "SELECT DISTINCT artist_name FROM artist WHERE country = 'Bangladesh' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7", "answer": "What are the names of the different artists from Bangladesh who never received a rating higher than a 7?\nAdditional table information: table: music_1"} -{"question": "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", "answer": "what is the full name and id of the college with the largest number of baseball players?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "Find the full name and id of the college that has the most baseball players.\nAdditional table information: table: baseball_1"} -{"question": "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'", "answer": "What is average salary of the players in the team named 'Boston Red Stockings' ?\nAdditional table information: table: baseball_1"} -{"question": "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'", "answer": "Compute the average salary of the players in the team called 'Boston Red Stockings'.\nAdditional table information: table: baseball_1"} -{"question": "SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998", "answer": "What are first and last names of players participating in all star game in 1998?\nAdditional table information: table: baseball_1"} -{"question": "SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998", "answer": "List the first and last name for players who participated in all star game in 1998.\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "What are the first name, last name and id of the player with the most all star game experiences? Also list the count.\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "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.\nAdditional table information: table: baseball_1"} -{"question": "SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid", "answer": "How many players enter hall of fame each year?\nAdditional table information: table: baseball_1"} -{"question": "SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid", "answer": "Count the number of players who enter hall of fame for each year.\nAdditional table information: table: baseball_1"} -{"question": "SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR", "answer": "What is the average number of attendance at home games for each year?\nAdditional table information: table: baseball_1"} -{"question": "SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR", "answer": "For each year, return the year and the average number of attendance at home games.\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "In 2014, what are the id and rank of the team that has the largest average number of attendance?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "Find the id and rank of the team that has the highest average attendance rate in 2014.\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "What are the manager's first name, last name and id who won the most manager award?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "Which manager won the most manager award? Give me the manager's first name, last name and id.\nAdditional table information: table: baseball_1"} -{"question": "SELECT COUNT(*) FROM park WHERE state = 'NY'", "answer": "How many parks are there in the state of NY?\nAdditional table information: table: baseball_1"} -{"question": "SELECT COUNT(*) FROM park WHERE state = 'NY'", "answer": "Show me the number of parks the state of NY has.\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "Which 3 players won the most player awards? List their full name and id.\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "Find the first name, last name and id for the top three players won the most player awards.\nAdditional table information: table: baseball_1"} -{"question": "SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 3", "answer": "List three countries which are the origins of the least players.\nAdditional table information: table: baseball_1"} -{"question": "SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 3", "answer": "What are the three countries that the least players are from?\nAdditional table information: table: baseball_1"} -{"question": "SELECT name_first, name_last FROM player WHERE death_year = ''", "answer": "Find all the players' first name and last name who have empty death record.\nAdditional table information: table: baseball_1"} -{"question": "SELECT name_first, name_last FROM player WHERE death_year = ''", "answer": "What are the first name and last name of the players whose death record is empty?\nAdditional table information: table: baseball_1"} -{"question": "SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R'", "answer": "How many players born in USA are right-handed batters? That is, have the batter value 'R'.\nAdditional table information: table: baseball_1"} -{"question": "SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R'", "answer": "Count the number of players who were born in USA and have bats information 'R'.\nAdditional table information: table: baseball_1"} -{"question": "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'", "answer": "What is the average height of the players from the college named 'Yale University'?\nAdditional table information: table: baseball_1"} -{"question": "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'", "answer": "Find the average height of the players who belong to the college called 'Yale University'.\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "What is the highest salary among each team? List the team name, id and maximum salary.\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "For each team, return the team name, id and the maximum salary among the team.\nAdditional table information: table: baseball_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What are the name and id of the team offering the lowest average salary?\nAdditional table information: table: baseball_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Which team offers the lowest average salary? Give me the name and id of the team.\nAdditional table information: table: baseball_1"} -{"question": "SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1961", "answer": "Find the players' first name and last name who won award both in 1960 and in 1961.\nAdditional table information: table: baseball_1"} -{"question": "SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1961", "answer": "Which players won awards in both 1960 and 1961? Return their first names and last names.\nAdditional table information: table: baseball_1"} -{"question": "SELECT name_first, name_last FROM player WHERE weight > 220 OR height < 75", "answer": "List players' first name and last name who have weight greater than 220 or height shorter than 75.\nAdditional table information: table: baseball_1"} -{"question": "SELECT name_first, name_last FROM player WHERE weight > 220 OR height < 75", "answer": "What are the first name and last name of the players who have weight above 220 or height below 75?\nAdditional table information: table: baseball_1"} -{"question": "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'", "answer": "List the maximum scores of the team Boston Red Stockings when the team won in postseason?\nAdditional table information: table: baseball_1"} -{"question": "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'", "answer": "What are the maximum scores the team Boston Red Stockings got when the team won in postseason?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "How many times did Boston Red Stockings lose in 2009 postseason?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "Count the number of times the team 'Boston Red Stockings' lost in 2009 postseason.\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "What are the name and id of the team with the most victories in 2008 postseason?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "Find the name and id of the team that won the most times in 2008 postseason.\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "What is the number of wins the team Boston Red Stockings got in the postseasons each year in history?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons.\nAdditional table information: table: baseball_1"} -{"question": "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')", "answer": "What is the total number of postseason games that team Boston Red Stockings participated in?\nAdditional table information: table: baseball_1"} -{"question": "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')", "answer": "How many times in total did the team Boston Red Stockings participate in postseason games?\nAdditional table information: table: baseball_1"} -{"question": "SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1", "answer": "How many games in 1885 postseason resulted in ties (that is, the value of 'ties' is '1')?\nAdditional table information: table: baseball_1"} -{"question": "SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1", "answer": "Find the number of tied games (the value of 'ties' is '1') in 1885 postseason.\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "What is the total salary paid by team Boston Red Stockings in 2010?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "What is the total salary expenses of team Boston Red Stockings in 2010?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "How many players were in the team Boston Red Stockings in 2000?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "How many players did Boston Red Stockings have in 2000?\nAdditional table information: table: baseball_1"} -{"question": "SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3", "answer": "List the 3 highest salaries of the players in 2001?\nAdditional table information: table: baseball_1"} -{"question": "SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3", "answer": "How much salary did the top 3 well-paid players get in 2001?\nAdditional table information: table: baseball_1"} -{"question": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001", "answer": "What were all the salary values of players in 2010 and 2001?\nAdditional table information: table: baseball_1"} -{"question": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001", "answer": "List all the salary values players received in 2010 and 2001.\nAdditional table information: table: baseball_1"} -{"question": "SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "In which year did the least people enter hall of fame?\nAdditional table information: table: baseball_1"} -{"question": "SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Find the year in which the least people enter hall of fame.\nAdditional table information: table: baseball_1"} -{"question": "SELECT COUNT(*) FROM park WHERE city = 'Atlanta'", "answer": "How many parks are there in Atlanta city?\nAdditional table information: table: baseball_1"} -{"question": "SELECT COUNT(*) FROM park WHERE city = 'Atlanta'", "answer": "How many parks does Atlanta city have?\nAdditional table information: table: baseball_1"} -{"question": "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'", "answer": "How many games were played in park 'Columbia Park' in 1907?\nAdditional table information: table: baseball_1"} -{"question": "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'", "answer": "Count the number of games taken place in park 'Columbia Park' in 1907.\nAdditional table information: table: baseball_1"} -{"question": "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'", "answer": "How many games were played in city Atlanta in 2000?\nAdditional table information: table: baseball_1"} -{"question": "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'", "answer": "Find the number of games taken place in city Atlanta in 2000.\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "How many games in total did team Boston Red Stockings attend from 2000 to 2010?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "Compute the total salary that the player with first name Len and last name Barker received between 1985 to 1990.\nAdditional table information: table: baseball_1"} -{"question": "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'", "answer": "List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007.\nAdditional table information: table: baseball_1"} -{"question": "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'", "answer": "What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "How many home games did the team Boston Red Stockings play from 1990 to 2000 in total?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "Count the total number of games the team Boston Red Stockings attended from 1990 to 2000.\nAdditional table information: table: baseball_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Which team had the least number of attendances in home games in 1980?\nAdditional table information: table: baseball_1"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Find the team that attended the least number of home games in 1980.\nAdditional table information: table: baseball_1"} -{"question": "SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2", "answer": "List the names of states that have more than 2 parks.\nAdditional table information: table: baseball_1"} -{"question": "SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2", "answer": "Which states have more than 2 parks?\nAdditional table information: table: baseball_1"} -{"question": "SELECT COUNT(*) FROM team_franchise WHERE active = 'Y'", "answer": "How many team franchises are active, with active value 'Y'?\nAdditional table information: table: baseball_1"} -{"question": "SELECT COUNT(*) FROM team_franchise WHERE active = 'Y'", "answer": "Find the number of team franchises that are active (have 'Y' as 'active' information).\nAdditional table information: table: baseball_1"} -{"question": "SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4", "answer": "Which cities have 2 to 4 parks?\nAdditional table information: table: baseball_1"} -{"question": "SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4", "answer": "Find all the cities that have 2 to 4 parks.\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "Which park had most attendances in 2008?\nAdditional table information: table: baseball_1"} -{"question": "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", "answer": "Which park did the most people attend in 2008?\nAdditional table information: table: baseball_1"} -{"question": "SELECT COUNT(*) FROM camera_lens WHERE focal_length_mm > 15", "answer": "How many camera lenses have a focal length longer than 15 mm?\nAdditional table information: table: mountain_photos"} -{"question": "SELECT brand, name FROM camera_lens ORDER BY max_aperture DESC", "answer": "Find the brand and name for each camera lens, and sort in descending order of maximum aperture.\nAdditional table information: table: mountain_photos"} -{"question": "SELECT id, color, name FROM photos", "answer": "List the id, color scheme, and name for all the photos.\nAdditional table information: table: mountain_photos"} -{"question": "SELECT MAX(height), AVG(height) FROM mountain", "answer": "What are the maximum and average height of the mountains?\nAdditional table information: table: mountain_photos"} -{"question": "SELECT AVG(prominence) FROM mountain WHERE country = 'Morocco'", "answer": "What are the average prominence of the mountains in country 'Morocco'?\nAdditional table information: table: mountain_photos"} -{"question": "SELECT name, height, prominence FROM mountain WHERE range <> 'Aberdare Range'", "answer": "What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'?\nAdditional table information: table: mountain_photos"} -{"question": "SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000", "answer": "What are the id and name of the photos for mountains?\nAdditional table information: table: mountain_photos"} -{"question": "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", "answer": "What are the id and name of the mountains that have at least 2 photos?\nAdditional table information: table: mountain_photos"} -{"question": "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", "answer": "What are the names of the cameras that have taken picture of the most mountains?\nAdditional table information: table: mountain_photos"} -{"question": "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'", "answer": "What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'?\nAdditional table information: table: mountain_photos"} -{"question": "SELECT COUNT(DISTINCT brand) FROM camera_lens", "answer": "How many different kinds of lens brands are there?\nAdditional table information: table: mountain_photos"} -{"question": "SELECT COUNT(*) FROM camera_lens WHERE NOT id IN (SELECT camera_lens_id FROM photos)", "answer": "How many camera lenses are not used in taking any photos?\nAdditional table information: table: mountain_photos"} -{"question": "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'", "answer": "How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'?\nAdditional table information: table: mountain_photos"} -{"question": "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'", "answer": "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'\nAdditional table information: table: mountain_photos"} -{"question": "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'", "answer": "Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'.\nAdditional table information: table: mountain_photos"} -{"question": "SELECT name FROM camera_lens WHERE name LIKE '%Digital%'", "answer": "List the camera lens names containing substring 'Digital'.\nAdditional table information: table: mountain_photos"} -{"question": "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(*) NULLS FIRST", "answer": "What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos.\nAdditional table information: table: mountain_photos"} -{"question": "SELECT name FROM channel WHERE OWNER <> 'CCTV'", "answer": "Find the names of channels that are not owned by CCTV.\nAdditional table information: table: program_share"} -{"question": "SELECT name FROM channel WHERE OWNER <> 'CCTV'", "answer": "Which channels are not owned by CCTV? Give me the channel names.\nAdditional table information: table: program_share"} -{"question": "SELECT name FROM channel ORDER BY rating_in_percent DESC", "answer": "List all channel names ordered by their rating in percent from big to small.\nAdditional table information: table: program_share"} -{"question": "SELECT name FROM channel ORDER BY rating_in_percent DESC", "answer": "Give me a list of all the channel names sorted by the channel rating in descending order.\nAdditional table information: table: program_share"} -{"question": "SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1", "answer": "What is the owner of the channel that has the highest rating ratio?\nAdditional table information: table: program_share"} -{"question": "SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1", "answer": "Show me the owner of the channel with the highest rating.\nAdditional table information: table: program_share"} -{"question": "SELECT COUNT(*) FROM program", "answer": "how many programs are there?\nAdditional table information: table: program_share"} -{"question": "SELECT COUNT(*) FROM program", "answer": "Count the number of programs.\nAdditional table information: table: program_share"} -{"question": "SELECT name FROM program ORDER BY launch NULLS FIRST", "answer": "list all the names of programs, ordering by launch time.\nAdditional table information: table: program_share"} -{"question": "SELECT name FROM program ORDER BY launch NULLS FIRST", "answer": "What is the list of program names, sorted by the order of launch date?\nAdditional table information: table: program_share"} -{"question": "SELECT name, origin, OWNER FROM program", "answer": "List the name, origin and owner of each program.\nAdditional table information: table: program_share"} -{"question": "SELECT name, origin, OWNER FROM program", "answer": "What are the name, origin and owner of each program?\nAdditional table information: table: program_share"} -{"question": "SELECT name FROM program ORDER BY launch DESC LIMIT 1", "answer": "find the name of the program that was launched most recently.\nAdditional table information: table: program_share"} -{"question": "SELECT name FROM program ORDER BY launch DESC LIMIT 1", "answer": "Which program was launched most recently? Return the program name.\nAdditional table information: table: program_share"} -{"question": "SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'", "answer": "find the total percentage share of all channels owned by CCTV.\nAdditional table information: table: program_share"} -{"question": "SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'", "answer": "What is the total share (in percent) of all the channels owned by CCTV?\nAdditional table information: table: program_share"} -{"question": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'", "answer": "Find the names of the channels that are broadcast in the morning.\nAdditional table information: table: program_share"} -{"question": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'", "answer": "Which channels are broadcast in the morning? Give me the channel names.\nAdditional table information: table: program_share"} -{"question": "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'", "answer": "what are the names of the channels that broadcast in both morning and night?\nAdditional table information: table: program_share"} -{"question": "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'", "answer": "Which channels broadcast both in the morning and at night? Give me the channel names.\nAdditional table information: table: program_share"} -{"question": "SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day", "answer": "how many programs are broadcast in each time section of the day?\nAdditional table information: table: program_share"} -{"question": "SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day", "answer": "Count the number of programs broadcast for each time section of a day.\nAdditional table information: table: program_share"} -{"question": "SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night'", "answer": "find the number of different programs that are broadcast during night time.\nAdditional table information: table: program_share"} -{"question": "SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night'", "answer": "How many distinct programs are broadcast at 'Night' time?\nAdditional table information: table: program_share"} -{"question": "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'", "answer": "Find the names of programs that are never broadcasted in the morning.\nAdditional table information: table: program_share"} -{"question": "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'", "answer": "Which programs are never broadcasted in the morning? Give me the names of the programs.\nAdditional table information: table: program_share"} -{"question": "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'", "answer": "find the program owners that have some programs in both morning and night time.\nAdditional table information: table: program_share"} -{"question": "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'", "answer": "Who are the owners of the programs that broadcast both in the morning and at night?\nAdditional table information: table: program_share"} -{"question": "SELECT origin FROM program ORDER BY origin NULLS FIRST", "answer": "List all program origins in the alphabetical order.\nAdditional table information: table: program_share"} -{"question": "SELECT origin FROM program ORDER BY origin NULLS FIRST", "answer": "What is the list of program origins ordered alphabetically?\nAdditional table information: table: program_share"} -{"question": "SELECT COUNT(DISTINCT OWNER) FROM channel", "answer": "what is the number of different channel owners?\nAdditional table information: table: program_share"} -{"question": "SELECT COUNT(DISTINCT OWNER) FROM channel", "answer": "Count the number of distinct channel owners.\nAdditional table information: table: program_share"} -{"question": "SELECT name FROM program WHERE origin <> 'Beijing'", "answer": "find the names of programs whose origin is not in Beijing.\nAdditional table information: table: program_share"} -{"question": "SELECT name FROM program WHERE origin <> 'Beijing'", "answer": "Which programs' origins are not 'Beijing'? Give me the program names.\nAdditional table information: table: program_share"} -{"question": "SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'", "answer": "What are the names of the channels owned by CCTV or HBS?\nAdditional table information: table: program_share"} -{"question": "SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'", "answer": "List the names of all the channels owned by either CCTV or HBS\nAdditional table information: table: program_share"} -{"question": "SELECT SUM(Rating_in_percent), OWNER FROM channel GROUP BY OWNER", "answer": "Find the total rating ratio for each channel owner.\nAdditional table information: table: program_share"} -{"question": "SELECT SUM(Rating_in_percent), OWNER FROM channel GROUP BY OWNER", "answer": "What is the total rating of channel for each channel owner?\nAdditional table information: table: program_share"} -{"question": "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", "answer": "Find the name of the program that is broadcast most frequently.\nAdditional table information: table: program_share"} -{"question": "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", "answer": "Which program is broadcast most frequently? Give me the program name.\nAdditional table information: table: program_share"} -{"question": "SELECT COUNT(*) FROM COURSES", "answer": "How many courses are there in total?\nAdditional table information: table: e_learning"} -{"question": "SELECT COUNT(*) FROM COURSES", "answer": "Find the total number of courses offered.\nAdditional table information: table: e_learning"} -{"question": "SELECT course_description FROM COURSES WHERE course_name = 'database'", "answer": "What are the descriptions of the courses with name 'database'?\nAdditional table information: table: e_learning"} -{"question": "SELECT course_description FROM COURSES WHERE course_name = 'database'", "answer": "Return the description for the courses named 'database'.\nAdditional table information: table: e_learning"} -{"question": "SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = 'Cathrine'", "answer": "What are the addresses of the course authors or tutors with personal name 'Cathrine'\nAdditional table information: table: e_learning"} -{"question": "SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = 'Cathrine'", "answer": "Return the addresses of the course authors or tutors whose personal name is 'Cathrine'.\nAdditional table information: table: e_learning"} -{"question": "SELECT address_line_1 FROM Course_Authors_and_Tutors", "answer": "List the addresses of all the course authors or tutors.\nAdditional table information: table: e_learning"} -{"question": "SELECT address_line_1 FROM Course_Authors_and_Tutors", "answer": "What is the address of each course author or tutor?\nAdditional table information: table: e_learning"} -{"question": "SELECT login_name, family_name FROM Course_Authors_and_Tutors", "answer": "List all the login names and family names of course author and tutors.\nAdditional table information: table: e_learning"} -{"question": "SELECT login_name, family_name FROM Course_Authors_and_Tutors", "answer": "What are the login names and family names of course author and tutors?\nAdditional table information: table: e_learning"} -{"question": "SELECT date_of_enrolment, date_of_completion FROM Student_Course_Enrolment", "answer": "List all the dates of enrollment and completion of students.\nAdditional table information: table: e_learning"} -{"question": "SELECT date_of_enrolment, date_of_completion FROM Student_Course_Enrolment", "answer": "What are all the dates of enrollment and completion in record?\nAdditional table information: table: e_learning"} -{"question": "SELECT COUNT(DISTINCT student_id) FROM Student_Course_Enrolment", "answer": "How many distinct students are enrolled in courses?\nAdditional table information: table: e_learning"} -{"question": "SELECT COUNT(DISTINCT student_id) FROM Student_Course_Enrolment", "answer": "Find the number of distinct students enrolled in courses.\nAdditional table information: table: e_learning"} -{"question": "SELECT COUNT(course_id) FROM Student_Course_Enrolment", "answer": "How many distinct courses are enrolled in by students?\nAdditional table information: table: e_learning"} -{"question": "SELECT COUNT(course_id) FROM Student_Course_Enrolment", "answer": "Find the number of distinct courses that have enrolled students.\nAdditional table information: table: e_learning"} -{"question": "SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = 'Pass'", "answer": "Find the dates of the tests taken with result 'Pass'.\nAdditional table information: table: e_learning"} -{"question": "SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = 'Pass'", "answer": "Which tests have 'Pass' results? Return the dates when the tests were taken.\nAdditional table information: table: e_learning"} -{"question": "SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = 'Fail'", "answer": "How many tests have result 'Fail'?\nAdditional table information: table: e_learning"} -{"question": "SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = 'Fail'", "answer": "Count the number of tests with 'Fail' result.\nAdditional table information: table: e_learning"} -{"question": "SELECT login_name FROM Students WHERE family_name = 'Ward'", "answer": "What are the login names of the students with family name 'Ward'?\nAdditional table information: table: e_learning"} -{"question": "SELECT login_name FROM Students WHERE family_name = 'Ward'", "answer": "Return the login names of the students whose family name is 'Ward'.\nAdditional table information: table: e_learning"} -{"question": "SELECT date_of_latest_logon FROM Students WHERE family_name = 'Jaskolski' OR family_name = 'Langosh'", "answer": "What are the dates of the latest logon of the students with family name 'Jaskolski' or 'Langosh'?\nAdditional table information: table: e_learning"} -{"question": "SELECT date_of_latest_logon FROM Students WHERE family_name = 'Jaskolski' OR family_name = 'Langosh'", "answer": "Find the latest logon date of the students whose family name is 'Jaskolski' or 'Langosh'.\nAdditional table information: table: e_learning"} -{"question": "SELECT COUNT(*) FROM Students WHERE personal_name LIKE '%son%'", "answer": "How many students have personal names that contain the word 'son'?\nAdditional table information: table: e_learning"} -{"question": "SELECT COUNT(*) FROM Students WHERE personal_name LIKE '%son%'", "answer": "Find the number of students who have the word 'son' in their personal names.\nAdditional table information: table: e_learning"} -{"question": "SELECT subject_name FROM SUBJECTS", "answer": "List all the subject names.\nAdditional table information: table: e_learning"} -{"question": "SELECT subject_name FROM SUBJECTS", "answer": "What are the names of all the subjects.\nAdditional table information: table: e_learning"} -{"question": "SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name NULLS FIRST", "answer": "List all the information about course authors and tutors in alphabetical order of the personal name.\nAdditional table information: table: e_learning"} -{"question": "SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name NULLS FIRST", "answer": "Sort the information about course authors and tutors in alphabetical order of the personal name.\nAdditional table information: table: e_learning"} -{"question": "SELECT personal_name, family_name FROM Students ORDER BY family_name NULLS FIRST", "answer": "List the personal names and family names of all the students in alphabetical order of family name.\nAdditional table information: table: e_learning"} -{"question": "SELECT personal_name, family_name FROM Students ORDER BY family_name NULLS FIRST", "answer": "What are the personal names and family names of the students? Sort the result in alphabetical order of the family name.\nAdditional table information: table: e_learning"} -{"question": "SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC", "answer": "List each test result and its count in descending order of count.\nAdditional table information: table: e_learning"} -{"question": "SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC", "answer": "For each distinct test result, find the number of students who got the result.\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "Find the login name of the course author that teaches the course with name 'advanced database'.\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "Which course author teaches the 'advanced database' course? Give me his or her login name.\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "Find the addresses of the course authors who teach the course with name 'operating system' or 'data structure'.\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "What are the addresses of the course authors who teach either 'operating system' or 'data structure' course.\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "Find the personal name, family name, and author ID of the course author that teaches the most courses.\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "What are the personal name, family name, and author ID of the course author who teaches the most courses?\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "Find the addresses and author IDs of the course authors that teach at least two courses.\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "Which course authors teach two or more courses? Give me their addresses and author IDs.\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "Find the names of courses taught by the tutor who has personal name 'Julio'.\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "What are the names of the courses taught by the tutor whose personal name is 'Julio'?\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "Find the names and descriptions of courses that belong to the subject named 'Computer Science'.\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "What are the names and descriptions of the all courses under the 'Computer Science' subject?\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "Find the subject ID, subject name, and the corresponding number of available courses for each subject.\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "What are the subject ID, subject name, and the number of available courses for each subject?\nAdditional table information: table: e_learning"} -{"question": "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 NULLS FIRST", "answer": "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.\nAdditional table information: table: e_learning"} -{"question": "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 NULLS FIRST", "answer": "List the subject ID, name of subject and the number of courses available for each subject in ascending order of the course counts.\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "What is the date of enrollment of the course named 'Spanish'?\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "Find the the date of enrollment of the 'Spanish' course.\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "What is the name of the course that has the most student enrollment?\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "Which course is enrolled in by the most students? Give me the course name.\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "What are the names of the courses that have exactly 1 student enrollment?\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "Find the names of the courses that have just one student enrollment.\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "What are the descriptions and names of the courses that have student enrollment bigger than 2?\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "Return the descriptions and names of the courses that have more than two students enrolled in.\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "What is the name of each course and the corresponding number of student enrollment?\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "List the name and the number of enrolled student for each course.\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "What are the enrollment dates of all the tests that have result 'Pass'?\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "Find the enrollment date for all the tests that have 'Pass' result.\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "What are the completion dates of all the tests that have result 'Fail'?\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "Return the completion date for all the tests that have 'Fail' result.\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "List the dates of enrollment and completion of the student with personal name 'Karson'.\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "On what dates did the student whose personal name is 'Karson' enroll in and complete the courses?\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "List the dates of enrollment and completion of the student with family name 'Zieme' and personal name 'Bernie'.\nAdditional table information: table: e_learning"} -{"question": "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'", "answer": "On what dates did the student with family name 'Zieme' and personal name 'Bernie' enroll in and complete the courses?\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "Find the student ID and login name of the student with the most course enrollments\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "What are the student ID and login name of the student who are enrolled in the most courses?\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "Find the student ID and personal name of the student with at least two enrollments.\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "Which student are enrolled in at least two courses? Give me the student ID and personal name.\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "Find the student ID and middle name for all the students with at most two enrollments.\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "What are the student IDs and middle names of the students enrolled in at most two courses?\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "Find the personal names of students not enrolled in any course.\nAdditional table information: table: e_learning"} -{"question": "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", "answer": "Which students not enrolled in any course? Find their personal names.\nAdditional table information: table: e_learning"} -{"question": "SELECT COUNT(*) FROM Students WHERE NOT student_id IN (SELECT student_id FROM Student_Course_Enrolment)", "answer": "How many students did not have any course enrollment?\nAdditional table information: table: e_learning"} -{"question": "SELECT COUNT(*) FROM Students WHERE NOT student_id IN (SELECT student_id FROM Student_Course_Enrolment)", "answer": "Count the number of students who did not enroll in any course.\nAdditional table information: table: e_learning"} -{"question": "SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students", "answer": "Find the common login name of course authors and students.\nAdditional table information: table: e_learning"} -{"question": "SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students", "answer": "What are the login names used both by some course authors and some students?\nAdditional table information: table: e_learning"} -{"question": "SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students", "answer": "Find the common personal name of course authors and students.\nAdditional table information: table: e_learning"} -{"question": "SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students", "answer": "What are the personal names used both by some course authors and some students?\nAdditional table information: table: e_learning"} -{"question": "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)", "answer": "Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id.\nAdditional table information: table: insurance_policies"} -{"question": "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)", "answer": "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.\nAdditional table information: table: insurance_policies"} -{"question": "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", "answer": "Which customer had at least 2 policies but did not file any claims? List the customer details and id.\nAdditional table information: table: insurance_policies"} -{"question": "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", "answer": "Give me the the customer details and id for the customers who had two or more policies but did not file any claims.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Payment_Method_Code, Date_Payment_Made, Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC NULLS FIRST", "answer": "List the method, date and amount of all the payments, in ascending order of date.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Payment_Method_Code, Date_Payment_Made, Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC NULLS FIRST", "answer": "What are the method, date and amount of each payment? Sort the list in ascending order of date.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1", "answer": "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.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1", "answer": "Find the settlement amount of the claim with the largest claim amount. Show both the settlement amount and claim amount.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC NULLS FIRST LIMIT 1", "answer": "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.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC NULLS FIRST LIMIT 1", "answer": "Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Claims WHERE Amount_Claimed > (SELECT AVG(Amount_Claimed) FROM Claims)", "answer": "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.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Claims WHERE Amount_Claimed > (SELECT AVG(Amount_Claimed) FROM Claims)", "answer": "Give me the claim date, settlement date for all the claims whose claimed amount is larger than the average.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims)", "answer": "Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims)", "answer": "Return the claim start date for the claims whose claimed amount is no more than the average\nAdditional table information: table: insurance_policies"} -{"question": "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", "answer": "How many settlements does each claim correspond to? List the claim id and the number of settlements.\nAdditional table information: table: insurance_policies"} -{"question": "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", "answer": "Find the number of settlements each claim corresponds to. Show the number together with the claim id.\nAdditional table information: table: insurance_policies"} -{"question": "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", "answer": "Which claim incurred the most number of settlements? List the claim id, the date the claim was made, and the number.\nAdditional table information: table: insurance_policies"} -{"question": "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", "answer": "Find the claim id and claim date of the claim that incurred the most settlement count. Also tell me the count.\nAdditional table information: table: insurance_policies"} -{"question": "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", "answer": "How many settlements were made on the claim with the most recent claim settlement date? List the number and the claim id.\nAdditional table information: table: insurance_policies"} -{"question": "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", "answer": "Find the claim id and the number of settlements made for the claim with the most recent settlement date.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC NULLS FIRST LIMIT 1", "answer": "Of all the claims, what was the earliest date when any claim was made?\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC NULLS FIRST LIMIT 1", "answer": "Tell me the the date when the first claim was made.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT SUM(Amount_Settled) FROM Settlements", "answer": "What is the total amount of settlement made for all the settlements?\nAdditional table information: table: insurance_policies"} -{"question": "SELECT SUM(Amount_Settled) FROM Settlements", "answer": "Compute the total amount of settlement across all the settlements.\nAdditional table information: table: insurance_policies"} -{"question": "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", "answer": "Who are the customers that had more than 1 policy? List the customer details and id.\nAdditional table information: table: insurance_policies"} -{"question": "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", "answer": "Find the the customer details and id for the customers who had more than one policy.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Settlements", "answer": "What are the claim dates and settlement dates of all the settlements?\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Settlements", "answer": "Tell me the the claim date and settlement date for each settlement case.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most popular payment method?\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which payment method is used the most often?\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "With which kind of payment method were the least number of payments processed?\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the payment method that were used the least often?\nAdditional table information: table: insurance_policies"} -{"question": "SELECT SUM(Amount_Payment) FROM Payments", "answer": "What is the total amount of payment?\nAdditional table information: table: insurance_policies"} -{"question": "SELECT SUM(Amount_Payment) FROM Payments", "answer": "Compute the total amount of payment processed.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT DISTINCT customer_details FROM Customers", "answer": "What are all the distinct details of the customers?\nAdditional table information: table: insurance_policies"} -{"question": "SELECT DISTINCT customer_details FROM Customers", "answer": "Return the distinct customer details.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which kind of policy type was chosen by the most customers?\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the policy type the most customers choose.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT COUNT(*) FROM Settlements", "answer": "How many settlements are there in total?\nAdditional table information: table: insurance_policies"} -{"question": "SELECT COUNT(*) FROM Settlements", "answer": "Count the total number of settlements made.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Payment_ID, Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'", "answer": "Which Payments were processed with Visa? List the payment Id, the date and the amount.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT Payment_ID, Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'", "answer": "Give me the payment Id, the date and the amount for all the payments processed with Visa.\nAdditional table information: table: insurance_policies"} -{"question": "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", "answer": "List the details of the customers who do not have any policies.\nAdditional table information: table: insurance_policies"} -{"question": "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", "answer": "Which customers do not have any policies? Find the details of these customers.\nAdditional table information: table: insurance_policies"} -{"question": "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", "answer": "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.\nAdditional table information: table: insurance_policies"} -{"question": "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", "answer": "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.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT SUM(Amount_Claimed) FROM Claims", "answer": "Find the total claimed amount of all the claims.\nAdditional table information: table: insurance_policies"} -{"question": "SELECT SUM(Amount_Claimed) FROM Claims", "answer": "What is total amount claimed summed across all the claims?\nAdditional table information: table: insurance_policies"} -{"question": "SELECT name FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) DESC LIMIT 1", "answer": "Which department has the largest number of employees?\nAdditional table information: table: hospital_1"} -{"question": "SELECT name FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) DESC LIMIT 1", "answer": "Find the department with the most employees.\nAdditional table information: table: hospital_1"} -{"question": "SELECT head FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) NULLS FIRST LIMIT 1", "answer": "What is the employee id of the head whose department has the least number of employees?\nAdditional table information: table: hospital_1"} -{"question": "SELECT head FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) NULLS FIRST LIMIT 1", "answer": "Tell me the employee id of the head of the department with the least employees.\nAdditional table information: table: hospital_1"} -{"question": "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) NULLS FIRST LIMIT 1", "answer": "what is the name and position of the head whose department has least number of employees?\nAdditional table information: table: hospital_1"} -{"question": "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) NULLS FIRST LIMIT 1", "answer": "Find the name and position of the head of the department with the least employees.\nAdditional table information: table: hospital_1"} -{"question": "SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn", "answer": "What are names of patients who made an appointment?\nAdditional table information: table: hospital_1"} -{"question": "SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn", "answer": "List the names of patients who have made appointments.\nAdditional table information: table: hospital_1"} -{"question": "SELECT name, phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING COUNT(*) > 1", "answer": "what are name and phone number of patients who had more than one appointment?\nAdditional table information: table: hospital_1"} -{"question": "SELECT name, phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING COUNT(*) > 1", "answer": "Which patients made more than one appointment? Tell me the name and phone number of these patients.\nAdditional table information: table: hospital_1"} -{"question": "SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1", "answer": "Find the id of the appointment with the most recent start date?\nAdditional table information: table: hospital_1"} -{"question": "SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1", "answer": "What is the id of the appointment that started most recently?\nAdditional table information: table: hospital_1"} -{"question": "SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID", "answer": "List the name of physicians who took some appointment.\nAdditional table information: table: hospital_1"} -{"question": "SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID", "answer": "What are the names of all the physicians who took appointments.\nAdditional table information: table: hospital_1"} -{"question": "SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID", "answer": "List the name of physicians who never took any appointment.\nAdditional table information: table: hospital_1"} -{"question": "SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID", "answer": "Which physicians have never taken any appointment? Find their names.\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "Find the names of all physicians and their primary affiliated departments' names.\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "What are the name and primarily affiliated department name of each physician?\nAdditional table information: table: hospital_1"} -{"question": "SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1", "answer": "What is the name of the patient who made the most recent appointment?\nAdditional table information: table: hospital_1"} -{"question": "SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1", "answer": "Find the name of the patient who made the appointment with the most recent start date.\nAdditional table information: table: hospital_1"} -{"question": "SELECT COUNT(patient) FROM stay WHERE room = 112", "answer": "How many patients stay in room 112?\nAdditional table information: table: hospital_1"} -{"question": "SELECT COUNT(patient) FROM stay WHERE room = 112", "answer": "Count the number of patients who stayed in room 112.\nAdditional table information: table: hospital_1"} -{"question": "SELECT COUNT(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'", "answer": "How many patients' prescriptions are made by physician John Dorian?\nAdditional table information: table: hospital_1"} -{"question": "SELECT COUNT(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'", "answer": "Find the number of patients' prescriptions physician John Dorian made.\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "Find the name of medication used on the patient who stays in room 111?\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "What is the name of the medication used for the patient staying in room 111?\nAdditional table information: table: hospital_1"} -{"question": "SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1", "answer": "Find the patient who most recently stayed in room 111.\nAdditional table information: table: hospital_1"} -{"question": "SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1", "answer": "What is the id of the patient who stayed in room 111 most recently?\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "What is the name of the nurse has the most appointments?\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "Find the name of the nurse who has the largest number of appointments.\nAdditional table information: table: hospital_1"} -{"question": "SELECT T1.name, COUNT(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid", "answer": "How many patients do each physician take care of? List their names and number of patients they take care of.\nAdditional table information: table: hospital_1"} -{"question": "SELECT T1.name, COUNT(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid", "answer": "Return the name of each physician and the number of patients he or she treats.\nAdditional table information: table: hospital_1"} -{"question": "SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING COUNT(*) > 1", "answer": "Find the name of physicians who are in charge of more than one patient.\nAdditional table information: table: hospital_1"} -{"question": "SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING COUNT(*) > 1", "answer": "Which physicians are in charge of more than one patient? Give me their names.\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "Find the number of rooms located on each block floor.\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "How many rooms does each block floor have?\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "Find the number of rooms for different block code?\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "How many rooms are located for each block code?\nAdditional table information: table: hospital_1"} -{"question": "SELECT DISTINCT blockcode FROM room WHERE unavailable = 0", "answer": "What are the unique block codes that have available rooms?\nAdditional table information: table: hospital_1"} -{"question": "SELECT DISTINCT blockcode FROM room WHERE unavailable = 0", "answer": "Tell me the distinct block codes where some rooms are available.\nAdditional table information: table: hospital_1"} -{"question": "SELECT COUNT(DISTINCT roomtype) FROM room", "answer": "How many different types of rooms are there?\nAdditional table information: table: hospital_1"} -{"question": "SELECT COUNT(DISTINCT roomtype) FROM room", "answer": "Find the number of distinct room types available.\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "What is the names of the physicians who prescribe medication Thesisin?\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "List the names of all the physicians who prescribe Thesisin as medication.\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "Find the name and position of physicians who prescribe some medication whose brand is X?\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "Which physicians prescribe a medication of brand X? Tell me the name and position of those physicians.\nAdditional table information: table: hospital_1"} -{"question": "SELECT COUNT(*), T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand", "answer": "Find the number of medications prescribed for each brand.\nAdditional table information: table: hospital_1"} -{"question": "SELECT COUNT(*), T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand", "answer": "How many medications are prescribed for each brand?\nAdditional table information: table: hospital_1"} -{"question": "SELECT name FROM physician WHERE POSITION LIKE '%senior%'", "answer": "Find the name of physicians whose position title contains the word 'senior'.\nAdditional table information: table: hospital_1"} -{"question": "SELECT name FROM physician WHERE POSITION LIKE '%senior%'", "answer": "What are the names of the physicians who have 'senior' in their titles.\nAdditional table information: table: hospital_1"} -{"question": "SELECT patient FROM undergoes ORDER BY dateundergoes NULLS FIRST LIMIT 1", "answer": "Find the patient who has the most recent undergoing treatment?\nAdditional table information: table: hospital_1"} -{"question": "SELECT patient FROM undergoes ORDER BY dateundergoes NULLS FIRST LIMIT 1", "answer": "Which patient is undergoing the most recent treatment?\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "Find the names of all patients who have an undergoing treatment and are staying in room 111.\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "What are the names of patients who are staying in room 111 and have an undergoing treatment?\nAdditional table information: table: hospital_1"} -{"question": "SELECT DISTINCT name FROM nurse ORDER BY name NULLS FIRST", "answer": "List the names of all distinct nurses ordered by alphabetical order?\nAdditional table information: table: hospital_1"} -{"question": "SELECT DISTINCT name FROM nurse ORDER BY name NULLS FIRST", "answer": "What is the alphabetically ordered list of all the distinct names of nurses?\nAdditional table information: table: hospital_1"} -{"question": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID", "answer": "Find the names of nurses who are nursing an undergoing treatment.\nAdditional table information: table: hospital_1"} -{"question": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID", "answer": "Which nurses are in charge of patients undergoing treatments?\nAdditional table information: table: hospital_1"} -{"question": "SELECT DISTINCT name FROM medication ORDER BY name NULLS FIRST", "answer": "List the names of all distinct medications, ordered in an alphabetical order.\nAdditional table information: table: hospital_1"} -{"question": "SELECT DISTINCT name FROM medication ORDER BY name NULLS FIRST", "answer": "What is the alphabetically ordered list of all distinct medications?\nAdditional table information: table: hospital_1"} -{"question": "SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1", "answer": "What are the names of the physician who prescribed the highest dose?\nAdditional table information: table: hospital_1"} -{"question": "SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1", "answer": "Find the physician who prescribed the highest dose. What is his or her name?\nAdditional table information: table: hospital_1"} -{"question": "SELECT physician, department FROM affiliated_with WHERE primaryaffiliation = 1", "answer": "List the physicians' employee ids together with their primary affiliation departments' ids.\nAdditional table information: table: hospital_1"} -{"question": "SELECT physician, department FROM affiliated_with WHERE primaryaffiliation = 1", "answer": "What are each physician's employee id and department id primarily affiliated.\nAdditional table information: table: hospital_1"} -{"question": "SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1", "answer": "List the names of departments where some physicians are primarily affiliated with.\nAdditional table information: table: hospital_1"} -{"question": "SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1", "answer": "What are the names of departments that have primarily affiliated physicians.\nAdditional table information: table: hospital_1"} -{"question": "SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1", "answer": "What nurses are on call with block floor 1 and block code 1? Tell me their names.\nAdditional table information: table: hospital_1"} -{"question": "SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1", "answer": "Find the ids of the nurses who are on call in block floor 1 and block code 1.\nAdditional table information: table: hospital_1"} -{"question": "SELECT MAX(cost), MIN(cost), AVG(cost) FROM procedures", "answer": "What are the highest cost, lowest cost and average cost of procedures?\nAdditional table information: table: hospital_1"} -{"question": "SELECT MAX(cost), MIN(cost), AVG(cost) FROM procedures", "answer": "Tell me the highest, lowest, and average cost of procedures.\nAdditional table information: table: hospital_1"} -{"question": "SELECT name, cost FROM procedures ORDER BY cost DESC", "answer": "List the name and cost of all procedures sorted by the cost from the highest to the lowest.\nAdditional table information: table: hospital_1"} -{"question": "SELECT name, cost FROM procedures ORDER BY cost DESC", "answer": "Sort the list of names and costs of all procedures in the descending order of cost.\nAdditional table information: table: hospital_1"} -{"question": "SELECT name FROM procedures ORDER BY cost NULLS FIRST LIMIT 3", "answer": "Find the three most expensive procedures.\nAdditional table information: table: hospital_1"} -{"question": "SELECT name FROM procedures ORDER BY cost NULLS FIRST LIMIT 3", "answer": "What are the three most costly procedures?\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "Find the physicians who are trained in a procedure that costs more than 5000.\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "Which physicians are trained in procedures that are more expensive than 5000?\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "Find the physician who was trained in the most expensive procedure?\nAdditional table information: table: hospital_1"} -{"question": "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", "answer": "Which physician was trained in the procedure that costs the most.\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "What is the average cost of procedures that physician John Wen was trained in?\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "Compute the mean price of procedures physician John Wen was trained in.\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "Find the names of procedures which physician John Wen was trained in.\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "What are the names of procedures physician John Wen was trained in?\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "Find all procedures which cost more than 1000 or which physician John Wen was trained in.\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "What are the procedures that cost more than 1000 or are specialized in by physician John Wen?\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "Find the names of all procedures which cost more than 1000 but which physician John Wen was not trained in?\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "Among the procedures that cost more than 1000, which were not specialized in by physician John Wen?\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in.\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "What procedures cost less than 5000 and have John Wen as a trained physician?\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "Which physicians are affiliated with both Surgery and Psychiatry departments? Tell me their names.\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "Find the name of physicians who are affiliated with Surgery or Psychiatry department.\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "Which physicians are affiliated with either Surgery or Psychiatry department? Give me their names.\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "Find the names of patients who are not using the medication of Procrastin-X.\nAdditional table information: table: hospital_1"} -{"question": "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'", "answer": "What are the names of patients who are not taking the medication of Procrastin-X.\nAdditional table information: table: hospital_1"} -{"question": "SELECT COUNT(*) FROM patient WHERE NOT SSN IN (SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X')", "answer": "Find the number of patients who are not using the medication of Procrastin-X.\nAdditional table information: table: hospital_1"} -{"question": "SELECT COUNT(*) FROM patient WHERE NOT SSN IN (SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X')", "answer": "How many patients are not using Procrastin-X as medication?\nAdditional table information: table: hospital_1"} -{"question": "SELECT COUNT(*) FROM appointment", "answer": "How many appointments are there?\nAdditional table information: table: hospital_1"} -{"question": "SELECT COUNT(*) FROM appointment", "answer": "Count how many appointments have been made in total.\nAdditional table information: table: hospital_1"} -{"question": "SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse", "answer": "Find the names of nurses who are on call.\nAdditional table information: table: hospital_1"} -{"question": "SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse", "answer": "What are the distinct names of nurses on call?\nAdditional table information: table: hospital_1"} -{"question": "SELECT COUNT(*) FROM ship", "answer": "How many ships are there?\nAdditional table information: table: ship_mission"} -{"question": "SELECT COUNT(*) FROM ship", "answer": "What is the number of ships?\nAdditional table information: table: ship_mission"} -{"question": "SELECT Name FROM ship ORDER BY Tonnage ASC NULLS FIRST", "answer": "List the name of ships in ascending order of tonnage.\nAdditional table information: table: ship_mission"} -{"question": "SELECT Name FROM ship ORDER BY Tonnage ASC NULLS FIRST", "answer": "what are the names of the ships ordered by ascending tonnage?\nAdditional table information: table: ship_mission"} -{"question": "SELECT TYPE, Nationality FROM ship", "answer": "What are the type and nationality of ships?\nAdditional table information: table: ship_mission"} -{"question": "SELECT TYPE, Nationality FROM ship", "answer": "What are the types and nationalities of every ship?\nAdditional table information: table: ship_mission"} -{"question": "SELECT Name FROM ship WHERE Nationality <> 'United States'", "answer": "List the name of ships whose nationality is not 'United States'.\nAdditional table information: table: ship_mission"} -{"question": "SELECT Name FROM ship WHERE Nationality <> 'United States'", "answer": "What are the names of the ships that are not from the United States?\nAdditional table information: table: ship_mission"} -{"question": "SELECT Name FROM ship WHERE Nationality = 'United States' OR Nationality = 'United Kingdom'", "answer": "Show the name of ships whose nationality is either United States or United Kingdom.\nAdditional table information: table: ship_mission"} -{"question": "SELECT Name FROM ship WHERE Nationality = 'United States' OR Nationality = 'United Kingdom'", "answer": "What are the names of the ships that are from either the US or the UK?\nAdditional table information: table: ship_mission"} -{"question": "SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1", "answer": "What is the name of the ship with the largest tonnage?\nAdditional table information: table: ship_mission"} -{"question": "SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1", "answer": "What is the ship with the largest amount of tonnage called?\nAdditional table information: table: ship_mission"} -{"question": "SELECT TYPE, COUNT(*) FROM ship GROUP BY TYPE", "answer": "Show different types of ships and the number of ships of each type.\nAdditional table information: table: ship_mission"} -{"question": "SELECT TYPE, COUNT(*) FROM ship GROUP BY TYPE", "answer": "For each type, how many ships are there?\nAdditional table information: table: ship_mission"} -{"question": "SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the most common type of ships.\nAdditional table information: table: ship_mission"} -{"question": "SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common type of ships?\nAdditional table information: table: ship_mission"} -{"question": "SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2", "answer": "List the nations that have more than two ships.\nAdditional table information: table: ship_mission"} -{"question": "SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2", "answer": "What are the nations that have more than two ships?\nAdditional table information: table: ship_mission"} -{"question": "SELECT TYPE, AVG(Tonnage) FROM ship GROUP BY TYPE", "answer": "Show different types of ships and the average tonnage of ships of each type.\nAdditional table information: table: ship_mission"} -{"question": "SELECT TYPE, AVG(Tonnage) FROM ship GROUP BY TYPE", "answer": "For each type, what is the average tonnage?\nAdditional table information: table: ship_mission"} -{"question": "SELECT T1.Code, T1.Fate, T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID", "answer": "Show codes and fates of missions, and names of ships involved.\nAdditional table information: table: ship_mission"} -{"question": "SELECT T1.Code, T1.Fate, T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID", "answer": "What are the mission codes, fates, and names of the ships involved?\nAdditional table information: table: ship_mission"} -{"question": "SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928", "answer": "Show names of ships involved in a mission launched after 1928.\nAdditional table information: table: ship_mission"} -{"question": "SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928", "answer": "What are the names of ships that were involved in a mission launched after 1928?\nAdditional table information: table: ship_mission"} -{"question": "SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = 'United States'", "answer": "Show the distinct fate of missions that involve ships with nationality 'United States'\nAdditional table information: table: ship_mission"} -{"question": "SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = 'United States'", "answer": "What are the different fates of the mission that involved ships from the United States?\nAdditional table information: table: ship_mission"} -{"question": "SELECT Name FROM ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM mission)", "answer": "List the name of ships that are not involved in any mission\nAdditional table information: table: ship_mission"} -{"question": "SELECT Name FROM ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM mission)", "answer": "What are the names of the ships that are not involved in any missions?\nAdditional table information: table: ship_mission"} -{"question": "SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000", "answer": "Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000.\nAdditional table information: table: ship_mission"} -{"question": "SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000", "answer": "What are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000?\nAdditional table information: table: ship_mission"} -{"question": "SELECT COUNT(*) FROM list", "answer": "Find the number of students in total.\nAdditional table information: table: student_1"} -{"question": "SELECT COUNT(*) FROM list", "answer": "How many students are there?\nAdditional table information: table: student_1"} -{"question": "SELECT lastname FROM list WHERE classroom = 111", "answer": "Find the last names of students studying in room 111.\nAdditional table information: table: student_1"} -{"question": "SELECT lastname FROM list WHERE classroom = 111", "answer": "What are the last names of students in room 111?\nAdditional table information: table: student_1"} -{"question": "SELECT firstname FROM list WHERE classroom = 108", "answer": "Find the first names of students studying in room 108.\nAdditional table information: table: student_1"} -{"question": "SELECT firstname FROM list WHERE classroom = 108", "answer": "What are the first names of students in room 108?\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT firstname FROM list WHERE classroom = 107", "answer": "What are the first names of students studying in room 107?\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT firstname FROM list WHERE classroom = 107", "answer": "List the first names of all the students in room 107.\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT classroom, grade FROM list", "answer": "For each classroom report the grade that is taught in it. Report just the classroom number and the grade number.\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT classroom, grade FROM list", "answer": "What are the grade number and classroom number of each class in the list?\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT grade FROM list WHERE classroom = 103", "answer": "Which grade is studying in classroom 103?\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT grade FROM list WHERE classroom = 103", "answer": "Find the grade taught in classroom 103.\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT grade FROM list WHERE classroom = 105", "answer": "Find the grade studying in room 105.\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT grade FROM list WHERE classroom = 105", "answer": "Which grade is studying in room 105?\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT classroom FROM list WHERE grade = 4", "answer": "Which classrooms are used by grade 4?\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT classroom FROM list WHERE grade = 4", "answer": "Find the classrooms in which grade 4 is studying.\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT classroom FROM list WHERE grade = 5", "answer": "Which classrooms are used by grade 5?\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT classroom FROM list WHERE grade = 5", "answer": "Show me the classrooms grade 5 is using.\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5", "answer": "Find the last names of the teachers that teach fifth grade.\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5", "answer": "what are the last names of the teachers who teach grade 5?\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1", "answer": "Find the first names of the teachers that teach first grade.\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1", "answer": "What are the first names of the teachers who teach grade 1?\nAdditional table information: table: student_1"} -{"question": "SELECT firstname FROM teachers WHERE classroom = 110", "answer": "Find the first names of all the teachers that teach in classroom 110.\nAdditional table information: table: student_1"} -{"question": "SELECT firstname FROM teachers WHERE classroom = 110", "answer": "Which teachers teach in classroom 110? Give me their first names.\nAdditional table information: table: student_1"} -{"question": "SELECT lastname FROM teachers WHERE classroom = 109", "answer": "Find the last names of teachers teaching in classroom 109.\nAdditional table information: table: student_1"} -{"question": "SELECT lastname FROM teachers WHERE classroom = 109", "answer": "Which teachers teach in classroom 109? Give me their last names.\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT firstname, lastname FROM teachers", "answer": "Report the first name and last name of all the teachers.\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT firstname, lastname FROM teachers", "answer": "What are the first name and last name of all the teachers?\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT firstname, lastname FROM list", "answer": "Report the first name and last name of all the students.\nAdditional table information: table: student_1"} -{"question": "SELECT DISTINCT firstname, lastname FROM list", "answer": "Show each student's first name and last name.\nAdditional table information: table: student_1"} -{"question": "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'", "answer": "Find all students taught by OTHA MOYER. Output the first and last names of the students.\nAdditional table information: table: student_1"} -{"question": "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'", "answer": "Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students.\nAdditional table information: table: student_1"} -{"question": "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'", "answer": "Find all students taught by MARROTTE KIRK. Output first and last names of students.\nAdditional table information: table: student_1"} -{"question": "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'", "answer": "Which are the first and last names of the students taught by MARROTTE KIRK?\nAdditional table information: table: student_1"} -{"question": "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'", "answer": "Find the first and last name of all the teachers that teach EVELINA BROMLEY.\nAdditional table information: table: student_1"} -{"question": "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'", "answer": "Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name of the teachers.\nAdditional table information: table: student_1"} -{"question": "SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'GELL' AND T1.lastname = 'TAMI'", "answer": "Find the last names of all the teachers that teach GELL TAMI.\nAdditional table information: table: student_1"} -{"question": "SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'GELL' AND T1.lastname = 'TAMI'", "answer": "What are the last names of the teachers who teach the student called GELL TAMI?\nAdditional table information: table: student_1"} -{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'LORIA' AND T2.lastname = 'ONDERSMA'", "answer": "How many students does LORIA ONDERSMA teaches?\nAdditional table information: table: student_1"} -{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'LORIA' AND T2.lastname = 'ONDERSMA'", "answer": "Count the number of students the teacher LORIA ONDERSMA teaches.\nAdditional table information: table: student_1"} -{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'KAWA' AND T2.lastname = 'GORDON'", "answer": "How many students does KAWA GORDON teaches?\nAdditional table information: table: student_1"} -{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'KAWA' AND T2.lastname = 'GORDON'", "answer": "Find the number of students taught by the teacher KAWA GORDON.\nAdditional table information: table: student_1"} -{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'TARRING' AND T2.lastname = 'LEIA'", "answer": "Find the number of students taught by TARRING LEIA.\nAdditional table information: table: student_1"} -{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'TARRING' AND T2.lastname = 'LEIA'", "answer": "How many students are taught by teacher TARRING LEIA?\nAdditional table information: table: student_1"} -{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'CHRISSY' AND T1.lastname = 'NABOZNY'", "answer": "How many teachers does the student named CHRISSY NABOZNY have?\nAdditional table information: table: student_1"} -{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'CHRISSY' AND T1.lastname = 'NABOZNY'", "answer": "Find the number of teachers who teach the student called CHRISSY NABOZNY.\nAdditional table information: table: student_1"} -{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'MADLOCK' AND T1.lastname = 'RAY'", "answer": "How many teachers does the student named MADLOCK RAY have?\nAdditional table information: table: student_1"} -{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'MADLOCK' AND T1.lastname = 'RAY'", "answer": "Find the number of teachers who teach the student called MADLOCK RAY.\nAdditional table information: table: student_1"} -{"question": "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'", "answer": "Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names.\nAdditional table information: table: student_1"} -{"question": "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'", "answer": "What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER?\nAdditional table information: table: student_1"} -{"question": "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'", "answer": "Find the last names of the students in third grade that are not taught by COVIN JEROME.\nAdditional table information: table: student_1"} -{"question": "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'", "answer": "Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students.\nAdditional table information: table: student_1"} -{"question": "SELECT grade, COUNT(DISTINCT classroom), COUNT(*) FROM list GROUP BY grade", "answer": "For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade.\nAdditional table information: table: student_1"} -{"question": "SELECT grade, COUNT(DISTINCT classroom), COUNT(*) FROM list GROUP BY grade", "answer": "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.\nAdditional table information: table: student_1"} -{"question": "SELECT classroom, COUNT(DISTINCT grade) FROM list GROUP BY classroom", "answer": "For each classroom, report the classroom number and the number of grades using it.\nAdditional table information: table: student_1"} -{"question": "SELECT classroom, COUNT(DISTINCT grade) FROM list GROUP BY classroom", "answer": "For each classroom, show the classroom number and count the number of distinct grades that use the room.\nAdditional table information: table: student_1"} -{"question": "SELECT classroom FROM list GROUP BY classroom ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which classroom has the most students?\nAdditional table information: table: student_1"} -{"question": "SELECT classroom FROM list GROUP BY classroom ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the classroom that the most students use.\nAdditional table information: table: student_1"} -{"question": "SELECT classroom, COUNT(*) FROM list GROUP BY classroom", "answer": "Report the number of students in each classroom.\nAdditional table information: table: student_1"} -{"question": "SELECT classroom, COUNT(*) FROM list GROUP BY classroom", "answer": "For each classroom, show the classroom number and find how many students are using it.\nAdditional table information: table: student_1"} -{"question": "SELECT classroom, COUNT(*) FROM list WHERE grade = '0' GROUP BY classroom", "answer": "For each grade 0 classroom, report the total number of students.\nAdditional table information: table: student_1"} -{"question": "SELECT classroom, COUNT(*) FROM list WHERE grade = '0' GROUP BY classroom", "answer": "For each grade 0 classroom, return the classroom number and the count of students.\nAdditional table information: table: student_1"} -{"question": "SELECT classroom, COUNT(*) FROM list WHERE grade = '4' GROUP BY classroom", "answer": "Report the total number of students for each fourth-grade classroom.\nAdditional table information: table: student_1"} -{"question": "SELECT classroom, COUNT(*) FROM list WHERE grade = '4' GROUP BY classroom", "answer": "For each fourth-grade classroom, show the classroom number and the total number of students using it.\nAdditional table information: table: student_1"} -{"question": "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", "answer": "Find the name of the teacher who teaches the largest number of students.\nAdditional table information: table: student_1"} -{"question": "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", "answer": "Which teacher teaches the most students? Give me the first name and last name of the teacher.\nAdditional table information: table: student_1"} -{"question": "SELECT COUNT(*), classroom FROM list GROUP BY classroom", "answer": "Find the number of students in one classroom.\nAdditional table information: table: student_1"} -{"question": "SELECT COUNT(*), classroom FROM list GROUP BY classroom", "answer": "How many students does one classroom have?\nAdditional table information: table: student_1"} -{"question": "SELECT COUNT(*) FROM company WHERE Headquarters = 'USA'", "answer": "How many companies are headquartered in the US?\nAdditional table information: table: company_employee"} -{"question": "SELECT Name FROM company ORDER BY Sales_in_Billion ASC NULLS FIRST", "answer": "List the names of companies by ascending number of sales.\nAdditional table information: table: company_employee"} -{"question": "SELECT Headquarters, Industry FROM company", "answer": "What are the headquarters and industries of all companies?\nAdditional table information: table: company_employee"} -{"question": "SELECT Name FROM company WHERE Industry = 'Banking' OR Industry = 'Retailing'", "answer": "Show the names of companies in the banking or retailing industry?\nAdditional table information: table: company_employee"} -{"question": "SELECT MAX(Market_Value_in_Billion), MIN(Market_Value_in_Billion) FROM company", "answer": "What is the maximum and minimum market value of companies?\nAdditional table information: table: company_employee"} -{"question": "SELECT Headquarters FROM company ORDER BY Sales_in_Billion DESC LIMIT 1", "answer": "What is the headquarter of the company with the largest sales?\nAdditional table information: table: company_employee"} -{"question": "SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters", "answer": "Show the different headquarters and number of companies at each headquarter.\nAdditional table information: table: company_employee"} -{"question": "SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common headquarter for companies.\nAdditional table information: table: company_employee"} -{"question": "SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2", "answer": "Show the headquarters that have at least two companies.\nAdditional table information: table: company_employee"} -{"question": "SELECT Headquarters FROM company WHERE Industry = 'Banking' INTERSECT SELECT Headquarters FROM company WHERE Industry = 'Oil and gas'", "answer": "Show the headquarters that have both companies in banking industry and companies in oil and gas industry.\nAdditional table information: table: company_employee"} -{"question": "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", "answer": "Show the names of companies and of employees.\nAdditional table information: table: company_employee"} -{"question": "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 NULLS FIRST", "answer": "Show names of companies and that of employees in descending order of number of years working for that employee.\nAdditional table information: table: company_employee"} -{"question": "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", "answer": "Show the names of employees that work for companies with sales bigger than 200.\nAdditional table information: table: company_employee"} -{"question": "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", "answer": "Show the names of companies and the number of employees they have\nAdditional table information: table: company_employee"} -{"question": "SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM employment)", "answer": "List the names of people that are not employed by any company\nAdditional table information: table: company_employee"} -{"question": "SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion NULLS FIRST, Profits_in_Billion DESC", "answer": "list the names of the companies with more than 200 sales in the descending order of sales and profits.\nAdditional table information: table: company_employee"} -{"question": "SELECT COUNT(*) FROM film", "answer": "How many film are there?\nAdditional table information: table: film_rank"} -{"question": "SELECT COUNT(*) FROM film", "answer": "Count the number of films.\nAdditional table information: table: film_rank"} -{"question": "SELECT DISTINCT Director FROM film", "answer": "List the distinct director of all films.\nAdditional table information: table: film_rank"} -{"question": "SELECT DISTINCT Director FROM film", "answer": "What are the different film Directors?\nAdditional table information: table: film_rank"} -{"question": "SELECT AVG(Gross_in_dollar) FROM film", "answer": "What is the average ticket sales gross in dollars of films?\nAdditional table information: table: film_rank"} -{"question": "SELECT AVG(Gross_in_dollar) FROM film", "answer": "Return the average gross sales in dollars across all films.\nAdditional table information: table: film_rank"} -{"question": "SELECT Low_Estimate, High_Estimate FROM film_market_estimation", "answer": "What are the low and high estimates of film markets?\nAdditional table information: table: film_rank"} -{"question": "SELECT Low_Estimate, High_Estimate FROM film_market_estimation", "answer": "Return the low and high estimates for all film markets.\nAdditional table information: table: film_rank"} -{"question": "SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995", "answer": "What are the types of film market estimations in year 1995?\nAdditional table information: table: film_rank"} -{"question": "SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995", "answer": "Return the types of film market estimations in 1995.\nAdditional table information: table: film_rank"} -{"question": "SELECT MAX(Number_cities), MIN(Number_cities) FROM market", "answer": "What are the maximum and minimum number of cities in all markets.\nAdditional table information: table: film_rank"} -{"question": "SELECT MAX(Number_cities), MIN(Number_cities) FROM market", "answer": "Return the maximum and minimum number of cities across all markets.\nAdditional table information: table: film_rank"} -{"question": "SELECT COUNT(*) FROM market WHERE Number_cities < 300", "answer": "How many markets have number of cities smaller than 300?\nAdditional table information: table: film_rank"} -{"question": "SELECT COUNT(*) FROM market WHERE Number_cities < 300", "answer": "Count the number of markets that have a number of cities lower than 300.\nAdditional table information: table: film_rank"} -{"question": "SELECT Country FROM market ORDER BY Country ASC NULLS FIRST", "answer": "List all countries of markets in ascending alphabetical order.\nAdditional table information: table: film_rank"} -{"question": "SELECT Country FROM market ORDER BY Country ASC NULLS FIRST", "answer": "What are the countries for each market, ordered alphabetically?\nAdditional table information: table: film_rank"} -{"question": "SELECT Country FROM market ORDER BY Number_cities DESC", "answer": "List all countries of markets in descending order of number of cities.\nAdditional table information: table: film_rank"} -{"question": "SELECT Country FROM market ORDER BY Number_cities DESC", "answer": "What are the countries for each market ordered by decreasing number of cities?\nAdditional table information: table: film_rank"} -{"question": "SELECT T1.Title, T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID", "answer": "Please show the titles of films and the types of market estimations.\nAdditional table information: table: film_rank"} -{"question": "SELECT T1.Title, T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID", "answer": "What are the titles of films and corresponding types of market estimations?\nAdditional table information: table: film_rank"} -{"question": "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", "answer": "Show the distinct director of films with market estimation in the year of 1995.\nAdditional table information: table: film_rank"} -{"question": "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", "answer": "Who are the different directors of films which had market estimation in 1995?\nAdditional table information: table: film_rank"} -{"question": "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", "answer": "What is the average number of cities of markets with low film market estimate bigger than 10000?\nAdditional table information: table: film_rank"} -{"question": "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", "answer": "Give the average number of cities within markets that had a low market estimation larger than 10000?\nAdditional table information: table: film_rank"} -{"question": "SELECT T2.Country, T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID", "answer": "Please list the countries and years of film market estimations.\nAdditional table information: table: film_rank"} -{"question": "SELECT T2.Country, T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID", "answer": "What are the countries of markets and their corresponding years of market estimation?\nAdditional table information: table: film_rank"} -{"question": "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", "answer": "Please list the years of film market estimations when the market is in country 'Japan' in descending order.\nAdditional table information: table: film_rank"} -{"question": "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", "answer": "What are the years of film market estimation for the market of Japan, ordered by year descending?\nAdditional table information: table: film_rank"} -{"question": "SELECT Studio, COUNT(*) FROM film GROUP BY Studio", "answer": "List the studios of each film and the number of films produced by that studio.\nAdditional table information: table: film_rank"} -{"question": "SELECT Studio, COUNT(*) FROM film GROUP BY Studio", "answer": "How films are produced by each studio?\nAdditional table information: table: film_rank"} -{"question": "SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the name of film studio that have the most number of films.\nAdditional table information: table: film_rank"} -{"question": "SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of teh studio that created the most films?\nAdditional table information: table: film_rank"} -{"question": "SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2", "answer": "List the names of studios that have at least two films.\nAdditional table information: table: film_rank"} -{"question": "SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2", "answer": "What are the names of studios that have made two or more films?\nAdditional table information: table: film_rank"} -{"question": "SELECT Title FROM film WHERE NOT Film_ID IN (SELECT Film_ID FROM film_market_estimation)", "answer": "List the title of films that do not have any market estimation.\nAdditional table information: table: film_rank"} -{"question": "SELECT Title FROM film WHERE NOT Film_ID IN (SELECT Film_ID FROM film_market_estimation)", "answer": "What are the titles of films that do not have a film market estimation?\nAdditional table information: table: film_rank"} -{"question": "SELECT Studio FROM film WHERE Director = 'Nicholas Meyer' INTERSECT SELECT Studio FROM film WHERE Director = 'Walter Hill'", "answer": "Show the studios that have produced films with director 'Nicholas Meyer' and 'Walter Hill'.\nAdditional table information: table: film_rank"} -{"question": "SELECT Studio FROM film WHERE Director = 'Nicholas Meyer' INTERSECT SELECT Studio FROM film WHERE Director = 'Walter Hill'", "answer": "What are the names of studios that have produced films with both Nicholas Meyer and Walter Hill?\nAdditional table information: table: film_rank"} -{"question": "SELECT title, Studio FROM film WHERE Studio LIKE '%Universal%'", "answer": "Find the titles and studios of the films that are produced by some film studios that contained the word 'Universal'.\nAdditional table information: table: film_rank"} -{"question": "SELECT title, Studio FROM film WHERE Studio LIKE '%Universal%'", "answer": "What are the titles and studios of films that have been produced by a studio whose name contains 'Universal'?\nAdditional table information: table: film_rank"} -{"question": "SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = 'Walter Hill'", "answer": "Show the studios that have not produced films with director 'Walter Hill'.\nAdditional table information: table: film_rank"} -{"question": "SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = 'Walter Hill'", "answer": "Which studios have never worked with the director Walter Hill?\nAdditional table information: table: film_rank"} -{"question": "SELECT Studio FROM film GROUP BY Studio HAVING AVG(Gross_in_dollar) >= 4500000", "answer": "List the studios which average gross is above 4500000.\nAdditional table information: table: film_rank"} -{"question": "SELECT Studio FROM film GROUP BY Studio HAVING AVG(Gross_in_dollar) >= 4500000", "answer": "Which studios have an average gross of over 4500000?\nAdditional table information: table: film_rank"} -{"question": "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", "answer": "What is the title of the film that has the highest high market estimation.\nAdditional table information: table: film_rank"} -{"question": "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", "answer": "Return the title of the film with the highest high estimate?\nAdditional table information: table: film_rank"} -{"question": "SELECT title, director FROM film WHERE NOT film_id IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')", "answer": "What are the titles and directors of the films were never presented in China?\nAdditional table information: table: film_rank"} -{"question": "SELECT title, director FROM film WHERE NOT film_id IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')", "answer": "Return the titles and directors of films that were never in the market of China.\nAdditional table information: table: film_rank"} -{"question": "SELECT COUNT(*) FROM Ref_calendar", "answer": "How many calendar items do we have?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT COUNT(*) FROM Ref_calendar", "answer": "Count the number of all the calendar items.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT calendar_date, day_Number FROM Ref_calendar", "answer": "Show all calendar dates and day Numbers.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT calendar_date, day_Number FROM Ref_calendar", "answer": "What are all the calendar dates and day Numbers?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT COUNT(*) FROM Ref_document_types", "answer": "Show the number of document types.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT COUNT(*) FROM Ref_document_types", "answer": "How many document types are there?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT document_type_code, document_type_name FROM Ref_document_types", "answer": "List all document type codes and document type names.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT document_type_code, document_type_name FROM Ref_document_types", "answer": "What are all the document type codes and document type names?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT document_type_name, document_type_description FROM Ref_document_types WHERE document_type_code = 'RV'", "answer": "What is the name and description for document type code RV?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT document_type_name, document_type_description FROM Ref_document_types WHERE document_type_code = 'RV'", "answer": "Give me the name and description of the document type code RV.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT document_type_code FROM Ref_document_types WHERE document_type_name = 'Paper'", "answer": "What is the document type code for document type 'Paper'?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT document_type_code FROM Ref_document_types WHERE document_type_name = 'Paper'", "answer": "Find the code of the document type 'Paper'.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT COUNT(*) FROM All_documents WHERE document_type_code = 'CV' OR document_type_code = 'BK'", "answer": "Show the number of documents with document type code CV or BK.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT COUNT(*) FROM All_documents WHERE document_type_code = 'CV' OR document_type_code = 'BK'", "answer": "How many documents have document type code CV or BK?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT date_stored FROM All_documents WHERE Document_name = 'Marry CV'", "answer": "What is the date when the document 'Marry CV' was stored?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT date_stored FROM All_documents WHERE Document_name = 'Marry CV'", "answer": "When was the document named 'Marry CV' stored? Give me the date.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT T2.day_Number, T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date", "answer": "What is the day Number and date of all the documents?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT T2.day_Number, T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date", "answer": "Return the day Number and stored date for all the documents.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "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'", "answer": "What is the document type name for the document with name 'How to read a book'?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "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'", "answer": "Find the document type name of the document named 'How to read a book'.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT COUNT(*) FROM Ref_locations", "answer": "Show the number of locations.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT COUNT(*) FROM Ref_locations", "answer": "How many locations are listed in the database?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT location_code, location_name FROM Ref_locations", "answer": "List all location codes and location names.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT location_code, location_name FROM Ref_locations", "answer": "What are all the location codes and location names?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT location_name, location_description FROM Ref_locations WHERE location_code = 'x'", "answer": "What are the name and description for location code x?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT location_name, location_description FROM Ref_locations WHERE location_code = 'x'", "answer": "Give me the name and description of the location with code x.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT location_code FROM Ref_locations WHERE location_name = 'Canada'", "answer": "What is the location code for the country 'Canada'?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT location_code FROM Ref_locations WHERE location_name = 'Canada'", "answer": "Show the location code of the country 'Canada'.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT COUNT(*) FROM ROLES", "answer": "How many roles are there?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT COUNT(*) FROM ROLES", "answer": "Count the total number of roles listed.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT role_code, role_name, role_description FROM ROLES", "answer": "List all role codes, role names, and role descriptions.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT role_code, role_name, role_description FROM ROLES", "answer": "What are all the role codes, role names, and role descriptions?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT role_name, role_description FROM ROLES WHERE role_code = 'MG'", "answer": "What are the name and description for role code 'MG'?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT role_name, role_description FROM ROLES WHERE role_code = 'MG'", "answer": "Find the name and description of the role with code 'MG'.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT role_description FROM ROLES WHERE role_name = 'Proof Reader'", "answer": "Show the description for role name 'Proof Reader'.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT role_description FROM ROLES WHERE role_name = 'Proof Reader'", "answer": "What is the description of the role named 'Proof Reader'?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT COUNT(*) FROM Employees", "answer": "How many employees do we have?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT COUNT(*) FROM Employees", "answer": "Find the number of employees we have.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT employee_name, role_code, date_of_birth FROM Employees WHERE employee_Name = 'Armani'", "answer": "Show the name, role code, and date of birth for the employee with name 'Armani'.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT employee_name, role_code, date_of_birth FROM Employees WHERE employee_Name = 'Armani'", "answer": "What are the name, role code, and date of birth of the employee named 'Armani'?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT employee_ID FROM Employees WHERE employee_name = 'Ebba'", "answer": "What is the id for the employee called Ebba?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT employee_ID FROM Employees WHERE employee_name = 'Ebba'", "answer": "Show the id of the employee named Ebba.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT employee_name FROM Employees WHERE role_code = 'HR'", "answer": "Show the names of all the employees with role 'HR'.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT employee_name FROM Employees WHERE role_code = 'HR'", "answer": "Which employees have the role with code 'HR'? Find their names.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT role_code, COUNT(*) FROM Employees GROUP BY role_code", "answer": "Show all role codes and the number of employees in each role.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT role_code, COUNT(*) FROM Employees GROUP BY role_code", "answer": "What is the code of each role and the number of employees in each role?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the role code with the largest number of employees?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the code of the role that have the most employees.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3", "answer": "Show all role codes with at least 3 employees.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3", "answer": "What are the roles with three or more employees? Give me the role codes.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Show the role code with the least employees.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the role with the smallest number of employees? Find the role codes.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "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'", "answer": "What is the role name and role description for employee called Ebba?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "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'", "answer": "Show the name and description of the role played by the employee named Ebba.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Editor'", "answer": "Show the names of employees with role name Editor.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Editor'", "answer": "Find the names of all the employees whose the role name is 'Editor'.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "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'", "answer": "Show the employee ids for all employees with role name 'Human Resource' or 'Manager'.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "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'", "answer": "What are the employee ids of the employees whose role name is 'Human Resource' or 'Manager'?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT DISTINCT location_code FROM Document_locations", "answer": "What are the different location codes for documents?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT DISTINCT location_code FROM Document_locations", "answer": "Give me all the distinct location codes for documents.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "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'", "answer": "Show the location name for document 'Robin CV'.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "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'", "answer": "What is the location name of the document 'Robin CV'?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations", "answer": "Show the location code, the starting date and ending data in that location for all the documents.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations", "answer": "What are each document's location code, and starting date and ending data in that location?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "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'", "answer": "What is 'the date in location from' and 'the date in location to' for the document with name 'Robin CV'?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "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'", "answer": "Find the starting date and ending data in location for the document named 'Robin CV'.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code", "answer": "Show the location codes and the number of documents in each location.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code", "answer": "What is the code of each location and the number of documents in that location?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the location code with the most documents?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the code of the location with the largest number of documents.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3", "answer": "Show the location codes with at least 3 documents.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3", "answer": "What are the codes of the locations with at least three documents?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Show the location name and code with the least documents.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What are the name and code of the location with the smallest number of documents?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "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", "answer": "What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "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", "answer": "List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID", "answer": "Show the id of each employee and the number of document destruction authorised by that employee.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID", "answer": "What are the id of each employee and the number of document destruction authorised by that employee?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID", "answer": "Show the employee ids and the number of documents destroyed by each employee.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID", "answer": "What are the id of each employee and the number of document destroyed by that employee?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Show the ids of the employees who don't authorize destruction for any document.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Which employees do not authorize destruction for any document? Give me their employee ids.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Show the ids of all employees who have authorized destruction.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "What are the ids of all the employees who authorize document destruction?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Show the ids of all employees who have destroyed a document.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "What are the ids of all the employees who have destroyed documents?\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Show the ids of all employees who don't destroy any document.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Which employees do not destroy any document? Find their employee ids.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Show the ids of all employees who have either destroyed a document or made an authorization to do this.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Which employees have either destroyed a document or made an authorization to do so? Return their employee ids.\nAdditional table information: table: cre_Doc_Tracking_DB"} -{"question": "SELECT COUNT(*) FROM club", "answer": "How many clubs are there?\nAdditional table information: table: club_1"} -{"question": "SELECT COUNT(*) FROM club", "answer": "Count the total number of clubs.\nAdditional table information: table: club_1"} -{"question": "SELECT clubname FROM club", "answer": "What are the names of all clubs?\nAdditional table information: table: club_1"} -{"question": "SELECT clubname FROM club", "answer": "Give me the name of each club.\nAdditional table information: table: club_1"} -{"question": "SELECT COUNT(*) FROM student", "answer": "How many students are there?\nAdditional table information: table: club_1"} -{"question": "SELECT COUNT(*) FROM student", "answer": "Count the total number of students.\nAdditional table information: table: club_1"} -{"question": "SELECT DISTINCT fname FROM student", "answer": "What are the first names of all the students?\nAdditional table information: table: club_1"} -{"question": "SELECT DISTINCT fname FROM student", "answer": "Find each student's first name.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Find the last names of the members of the club 'Bootup Baltimore'.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Who are the members of the club named 'Bootup Baltimore'? Give me their last names.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Who are the members of the club named 'Hopkins Student Enterprises'? Show the last name.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Return the last name for the members of the club named 'Hopkins Student Enterprises'.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "How many members does the club 'Tennis Club' has?\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Count the members of the club 'Tennis Club'.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Find the number of members of club 'Pen and Paper Gaming'.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "How many people have membership in the club 'Pen and Paper Gaming'?\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "How many clubs does 'Linda Smith' belong to?\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "How many clubs does 'Linda Smith' have membership for?\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Find the number of clubs where 'Tracy Kim' is a member.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "For how many clubs is 'Tracy Kim' a member?\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Find all the female members of club 'Bootup Baltimore'. Show the first name and last name.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Give me the first name and last name for all the female members of the club 'Bootup Baltimore'.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Find all the male members of club 'Hopkins Student Enterprises'. Show the first name and last name.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "What are the first name and last name of each male member in club 'Hopkins Student Enterprises'?\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Find all members of 'Bootup Baltimore' whose major is '600'. Show the first name and last name.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Which members of 'Bootup Baltimore' major in '600'? Give me their first names and last names.\nAdditional table information: table: club_1"} -{"question": "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", "answer": "Which club has the most members majoring in '600'?\nAdditional table information: table: club_1"} -{"question": "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", "answer": "Find the club which has the largest number of members majoring in '600'.\nAdditional table information: table: club_1"} -{"question": "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", "answer": "Find the name of the club that has the most female students.\nAdditional table information: table: club_1"} -{"question": "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", "answer": "Which club has the most female students as their members? Give me the name of the club.\nAdditional table information: table: club_1"} -{"question": "SELECT clubdesc FROM club WHERE clubname = 'Tennis Club'", "answer": "What is the description of the club named 'Tennis Club'?\nAdditional table information: table: club_1"} -{"question": "SELECT clubdesc FROM club WHERE clubname = 'Tennis Club'", "answer": "Find the description of the club called 'Tennis Club'.\nAdditional table information: table: club_1"} -{"question": "SELECT clubdesc FROM club WHERE clubname = 'Pen and Paper Gaming'", "answer": "Find the description of the club 'Pen and Paper Gaming'.\nAdditional table information: table: club_1"} -{"question": "SELECT clubdesc FROM club WHERE clubname = 'Pen and Paper Gaming'", "answer": "What is the description of the club 'Pen and Paper Gaming'?\nAdditional table information: table: club_1"} -{"question": "SELECT clublocation FROM club WHERE clubname = 'Tennis Club'", "answer": "What is the location of the club named 'Tennis Club'?\nAdditional table information: table: club_1"} -{"question": "SELECT clublocation FROM club WHERE clubname = 'Tennis Club'", "answer": "Where us the club named 'Tennis Club' located?\nAdditional table information: table: club_1"} -{"question": "SELECT clublocation FROM club WHERE clubname = 'Pen and Paper Gaming'", "answer": "Find the location of the club 'Pen and Paper Gaming'.\nAdditional table information: table: club_1"} -{"question": "SELECT clublocation FROM club WHERE clubname = 'Pen and Paper Gaming'", "answer": "Where is the club 'Pen and Paper Gaming' located?\nAdditional table information: table: club_1"} -{"question": "SELECT clublocation FROM club WHERE clubname = 'Hopkins Student Enterprises'", "answer": "Where is the club 'Hopkins Student Enterprises' located?\nAdditional table information: table: club_1"} -{"question": "SELECT clublocation FROM club WHERE clubname = 'Hopkins Student Enterprises'", "answer": "Tell me the location of the club 'Hopkins Student Enterprises'.\nAdditional table information: table: club_1"} -{"question": "SELECT clubname FROM club WHERE clublocation = 'AKW'", "answer": "Find the name of all the clubs at 'AKW'.\nAdditional table information: table: club_1"} -{"question": "SELECT clubname FROM club WHERE clublocation = 'AKW'", "answer": "Which clubs are located at 'AKW'? Return the club names.\nAdditional table information: table: club_1"} -{"question": "SELECT COUNT(*) FROM club WHERE clublocation = 'HHH'", "answer": "How many clubs are located at 'HHH'?\nAdditional table information: table: club_1"} -{"question": "SELECT COUNT(*) FROM club WHERE clublocation = 'HHH'", "answer": "Count the number of clubs located at 'HHH'.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "What are the first and last name of the president of the club 'Bootup Baltimore'?\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Who is the president of the club 'Bootup Baltimore'? Give me the first and last name.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Who is the 'CTO' of club 'Hopkins Student Enterprises'? Show the first name and last name.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Find the first name and last name for the 'CTO' of the club 'Hopkins Student Enterprises'?\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "How many different roles are there in the club 'Bootup Baltimore'?\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Count the number of different positions in the club 'Bootup Baltimore'.\nAdditional table information: table: club_1"} -{"question": "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", "answer": "How many members of 'Bootup Baltimore' are older than 18?\nAdditional table information: table: club_1"} -{"question": "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", "answer": "Count the number of members in club 'Bootup Baltimore' whose age is above 18.\nAdditional table information: table: club_1"} -{"question": "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", "answer": "How many members of club 'Bootup Baltimore' are younger than 18?\nAdditional table information: table: club_1"} -{"question": "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", "answer": "Count the number of members in club 'Bootup Baltimore' whose age is below 18.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Find the names of all the clubs that have at least a member from the city with city code 'BAL'.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Which clubs have one or more members from the city with code 'BAL'? Give me the names of the clubs.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Find the names of the clubs that have at least a member from the city with city code 'HOU'.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Which clubs have one or more members from the city with code 'HOU'? Give me the names of the clubs.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "How many clubs does the student named 'Eric Tai' belong to?\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Count the number of clubs for which the student named 'Eric Tai' is a member.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "List the clubs having 'Davis Steven' as a member.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "What are the names of the clubs that have 'Davis Steven' as a member?\nAdditional table information: table: club_1"} -{"question": "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", "answer": "List the clubs that have at least a member with advisor '1121'.\nAdditional table information: table: club_1"} -{"question": "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", "answer": "Which clubs have one or more members whose advisor is '1121'?\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "What is the average age of the members of the club 'Bootup Baltimore'?\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Find the average age of the members in the club 'Bootup Baltimore'.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Find the average age of members of the club 'Hopkins Student Enterprises'.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "On average, how old are the members in the club 'Hopkins Student Enterprises'?\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Retrieve the average age of members of the club 'Tennis Club'.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "Compute the average age of the members in the club 'Tennis Club'.\nAdditional table information: table: club_1"} -{"question": "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'", "answer": "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'?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "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'?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "List the project details of the project both producing patent and paper as outcomes.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "What are the details of the project that is producing both patents and papers as outcomes?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "What is the total grant amount of the organisations described as research?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "What is the total amount of grant money for research?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "List from which date and to which date these staff work: project staff of the project which hires the most staffs\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "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?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "Find the organisation ids and details of the organisations which are involved in\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "What are the ids and details for all organizations that have grants of more than 6000 dollars?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "What is the organisation type and id of the organisation which has the most number of research staff?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "What is the type and id of the organization that has the most research staff?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "Which organisation type hires most research staff?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "What is the type of the organization with the most research staff?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "What are the send dates for all documents that have a grant amount of more than 5000 and are involved in research?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "What are the response received dates for the documents described as 'Regular' or granted with more than 100?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "What is the response received date for the document described as Regular that was granted more than 100 dollars?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_Staff WHERE role_code = 'researcher')", "answer": "List the project details of the projects which did not hire any staff for a researcher role.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_Staff WHERE role_code = 'researcher')", "answer": "What are the details for all projects that did not hire any staff in a research role?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "What are the task details, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'researcher'", "answer": "When do all the researcher role staff start to work, and when do they stop working?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'researcher'", "answer": "When did researchers start and stop working?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT COUNT(DISTINCT role_code) FROM Project_Staff", "answer": "How many kinds of roles are there for the staff?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT COUNT(DISTINCT role_code) FROM Project_Staff", "answer": "How many different roles are there on the project staff?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT SUM(grant_amount), organisation_id FROM Grants GROUP BY organisation_id", "answer": "What is the total amount of grants given by each organisations? Also list the organisation id.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT SUM(grant_amount), organisation_id FROM Grants GROUP BY organisation_id", "answer": "What is the total amount of grant money given to each organization and what is its id?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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%'", "answer": "List the project details of the projects with the research outcome described with the substring 'Published'.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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%'", "answer": "What are the details for the project whose research has been published?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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 NULLS FIRST", "answer": "How many staff does each project has? List the project id and the number in an ascending order.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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 NULLS FIRST", "answer": "For each project id, how many staff does it have? List them in increasing order.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher'", "answer": "What is the complete description of the researcher role.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher'", "answer": "What is the complete description of the job of a researcher?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT date_from FROM Project_Staff ORDER BY date_from ASC NULLS FIRST LIMIT 1", "answer": "When did the first staff for the projects started working?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT date_from FROM Project_Staff ORDER BY date_from ASC NULLS FIRST LIMIT 1", "answer": "When did the first staff member start working?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "Which project made the most number of outcomes? List the project details and the project id.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "What are the details and id of the project with the most outcomes?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_outcomes)", "answer": "Which projects have no outcome? List the project details.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_outcomes)", "answer": "What are the details of the project with no outcomes?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "Which organisation hired the most number of research staff? List the organisation id, type and detail.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "What are the ids, types, and details of the organization with the most research staff?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "Show the role description and the id of the project staff involved in most number of project outcomes?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "For each staff id, what is the description of the role that is involved with the most number of projects?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'", "answer": "Which document type is described with the prefix 'Initial'?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'", "answer": "What is the type of the document whose description starts with the word 'Initial'?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "For grants that have descriptions of Regular and Initial Applications, what are their start dates?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT grant_id, COUNT(*) FROM Documents GROUP BY grant_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "How many documents can one grant have at most? List the grant id and number.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT grant_id, COUNT(*) FROM Documents GROUP BY grant_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "For each grant id, how many documents does it have, and which one has the most?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "Find the organisation type description of the organisation detailed as 'quo'.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "What is the type description of the organization whose detail is listed as 'quo'?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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 NULLS FIRST", "answer": "What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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 NULLS FIRST", "answer": "What are the details of all organizations that are described as Sponsors and sort the results in ascending order?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT COUNT(*) FROM Project_outcomes WHERE outcome_code = 'Patent'", "answer": "How many Patent outcomes are generated from all the projects?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT COUNT(*) FROM Project_outcomes WHERE outcome_code = 'Patent'", "answer": "How many patents outcomes were listed for all the projects?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT COUNT(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'", "answer": "How many project staff worked as leaders or started working before '1989-04-24 23:51:54'?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT COUNT(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'", "answer": "How many project members were leaders or started working before '1989-04-24 23:51:54'?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1", "answer": "What is the last date of the staff leaving the projects?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1", "answer": "What is the last date that a staff member left a project?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "What are the result description of the project whose detail is 'sint'?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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'", "answer": "What is the description for the results whose project detail is 'sint'?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "List the organisation id with the maximum outcome count, and the count.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "What is the id of the organization with the maximum number of outcomes and how many outcomes are there?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT project_details FROM Projects WHERE organisation_id IN (SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "List the project details of the projects launched by the organisation\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT project_details FROM Projects WHERE organisation_id IN (SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "What are the details for the projects which were launched by the organization with the most projects?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC NULLS FIRST", "answer": "List the research staff details, and order in ascending order.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC NULLS FIRST", "answer": "What details are there on the research staff? List the result in ascending alphabetical order.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT COUNT(*) FROM Tasks", "answer": "How many tasks are there in total?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT COUNT(*) FROM Tasks", "answer": "How many tasks are there?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "How many tasks does each project have? List the task count and the project detail.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "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", "answer": "For each project id, how many tasks are there?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'", "answer": "What are the staff roles of the staff who\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'", "answer": "What roles did staff members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code", "answer": "What are the descriptions of all the project outcomes?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code", "answer": "List the description of the outcomes for all projects.\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which role is most common for the staff?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common role for the staff?\nAdditional table information: table: tracking_grants_for_research"} -{"question": "SELECT COUNT(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'", "answer": "How many friends does Dan have?\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'", "answer": "How many friends does Dan have?\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(*) FROM Person WHERE gender = 'female'", "answer": "How many females does this network has?\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(*) FROM Person WHERE gender = 'female'", "answer": "How many females are in the network?\nAdditional table information: table: network_2"} -{"question": "SELECT AVG(age) FROM Person", "answer": "What is the average age for all person?\nAdditional table information: table: network_2"} -{"question": "SELECT AVG(age) FROM Person", "answer": "What is the average age for all people in the table?\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(DISTINCT city) FROM Person", "answer": "How many different cities are they from?\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(DISTINCT city) FROM Person", "answer": "How many different cities do people originate from?\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(DISTINCT job) FROM Person", "answer": "How many type of jobs do they have?\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(DISTINCT job) FROM Person", "answer": "How many different jobs are listed?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM Person WHERE age = (SELECT MAX(age) FROM person)", "answer": "Who is the oldest person?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM Person WHERE age = (SELECT MAX(age) FROM person)", "answer": "What is the name of the person who is the oldest?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM Person WHERE job = 'student' AND age = (SELECT MAX(age) FROM person WHERE job = 'student')", "answer": "Who is the oldest person whose job is student?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM Person WHERE job = 'student' AND age = (SELECT MAX(age) FROM person WHERE job = 'student')", "answer": "What is the name of the oldest student?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT MIN(age) FROM person WHERE gender = 'male')", "answer": "Who is the youngest male?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT MIN(age) FROM person WHERE gender = 'male')", "answer": "What is the name of the youngest male?\nAdditional table information: table: network_2"} -{"question": "SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach'", "answer": "How old is the doctor named Zach?\nAdditional table information: table: network_2"} -{"question": "SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach'", "answer": "What is the age of the doctor named Zach?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM Person WHERE age < 30", "answer": "Who is the person whose age is below 30?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM Person WHERE age < 30", "answer": "What is the name of the person whose age is below 30?\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(*) FROM Person WHERE age > 30 AND job = 'engineer'", "answer": "How many people whose age is greater 30 and job is engineer?\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(*) FROM Person WHERE age > 30 AND job = 'engineer'", "answer": "HOw many engineers are older than 30?\nAdditional table information: table: network_2"} -{"question": "SELECT AVG(age), gender FROM Person GROUP BY gender", "answer": "What is the average age for each gender?\nAdditional table information: table: network_2"} -{"question": "SELECT AVG(age), gender FROM Person GROUP BY gender", "answer": "How old is each gender, on average?\nAdditional table information: table: network_2"} -{"question": "SELECT AVG(age), job FROM Person GROUP BY job", "answer": "What is average age for different job title?\nAdditional table information: table: network_2"} -{"question": "SELECT AVG(age), job FROM Person GROUP BY job", "answer": "How old is the average person for each job?\nAdditional table information: table: network_2"} -{"question": "SELECT AVG(age), job FROM Person WHERE gender = 'male' GROUP BY job", "answer": "What is average age of male for different job title?\nAdditional table information: table: network_2"} -{"question": "SELECT AVG(age), job FROM Person WHERE gender = 'male' GROUP BY job", "answer": "What is the average age for a male in each job?\nAdditional table information: table: network_2"} -{"question": "SELECT MIN(age), job FROM Person GROUP BY job", "answer": "What is minimum age for different job title?\nAdditional table information: table: network_2"} -{"question": "SELECT MIN(age), job FROM Person GROUP BY job", "answer": "How old is the youngest person for each job?\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(*), gender FROM Person WHERE age < 40 GROUP BY gender", "answer": "Find the number of people who is under 40 for each gender.\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(*), gender FROM Person WHERE age < 40 GROUP BY gender", "answer": "How many people are under 40 for each gender?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM Person WHERE age > (SELECT MIN(age) FROM person WHERE job = 'engineer') ORDER BY age NULLS FIRST", "answer": "Find the name of people whose age is greater than any engineer sorted by their age.\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM Person WHERE age > (SELECT MIN(age) FROM person WHERE job = 'engineer') ORDER BY age NULLS FIRST", "answer": "What is the name of all the people who are older than at least one engineer? Order them by age.\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(*) FROM Person WHERE age > (SELECT MAX(age) FROM person WHERE job = 'engineer')", "answer": "Find the number of people whose age is greater than all engineers.\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(*) FROM Person WHERE age > (SELECT MAX(age) FROM person WHERE job = 'engineer')", "answer": "How many people are older than every engineer?\nAdditional table information: table: network_2"} -{"question": "SELECT name, job FROM Person ORDER BY name NULLS FIRST", "answer": "list the name, job title of all people ordered by their names.\nAdditional table information: table: network_2"} -{"question": "SELECT name, job FROM Person ORDER BY name NULLS FIRST", "answer": "What are the names and job titles of every person ordered alphabetically by name?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM Person ORDER BY age DESC", "answer": "Find the names of all person sorted in the descending order using age.\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM Person ORDER BY age DESC", "answer": "What are the names of everybody sorted by age in descending order?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age NULLS FIRST", "answer": "Find the name and age of all males in order of their age.\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age NULLS FIRST", "answer": "What is the name and age of every male? Order the results by age.\nAdditional table information: table: network_2"} -{"question": "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'", "answer": "Find the name and age of the person who is a friend of both Dan and Alice.\nAdditional table information: table: network_2"} -{"question": "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'", "answer": "What are the names and ages of every person who is a friend of both Dan and Alice?\nAdditional table information: table: network_2"} -{"question": "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'", "answer": "Find the name and age of the person who is a friend of Dan or Alice.\nAdditional table information: table: network_2"} -{"question": "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'", "answer": "What are the different names and ages of every friend of either Dan or alice?\nAdditional table information: table: network_2"} -{"question": "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)", "answer": "Find the name of the person who has friends with age above 40 and under age 30?\nAdditional table information: table: network_2"} -{"question": "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)", "answer": "What are the names of every person who has a friend over 40 and under 30?\nAdditional table information: table: network_2"} -{"question": "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)", "answer": "Find the name of the person who has friends with age above 40 but not under age 30?\nAdditional table information: table: network_2"} -{"question": "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)", "answer": "What are the names of the people who are older 40 but no friends under age 30?\nAdditional table information: table: network_2"} -{"question": "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'", "answer": "Find the name of the person who has no student friends.\nAdditional table information: table: network_2"} -{"question": "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'", "answer": "What are the names of the people who have no friends who are students?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM PersonFriend GROUP BY name HAVING COUNT(*) = 1", "answer": "Find the person who has exactly one friend.\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM PersonFriend GROUP BY name HAVING COUNT(*) = 1", "answer": "What are the names of everybody who has exactly one friend?\nAdditional table information: table: network_2"} -{"question": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob'", "answer": "Who are the friends of Bob?\nAdditional table information: table: network_2"} -{"question": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob'", "answer": "Who are Bob's friends?\nAdditional table information: table: network_2"} -{"question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob'", "answer": "Find the name of persons who are friends with Bob.\nAdditional table information: table: network_2"} -{"question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob'", "answer": "What are the names of all of Bob's friends?\nAdditional table information: table: network_2"} -{"question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female'", "answer": "Find the names of females who are friends with Zach\nAdditional table information: table: network_2"} -{"question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female'", "answer": "What are the names of all females who are friends with Zach?\nAdditional table information: table: network_2"} -{"question": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female'", "answer": "Find the female friends of Alice.\nAdditional table information: table: network_2"} -{"question": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female'", "answer": "What are all the friends of Alice who are female?\nAdditional table information: table: network_2"} -{"question": "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'", "answer": "Find the male friend of Alice whose job is a doctor?\nAdditional table information: table: network_2"} -{"question": "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'", "answer": "Who are the friends of Alice that are doctors?\nAdditional table information: table: network_2"} -{"question": "SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city'", "answer": "Who has a friend that is from new york city?\nAdditional table information: table: network_2"} -{"question": "SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city'", "answer": "What are the names of all friends who are from New York?\nAdditional table information: table: network_2"} -{"question": "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)", "answer": "Who has friends that are younger than the average age?\nAdditional table information: table: network_2"} -{"question": "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)", "answer": "What are the different names of friends who are younger than the average age for a friend?\nAdditional table information: table: network_2"} -{"question": "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)", "answer": "Who has friends that are older than the average age? Print their friends and their ages as well\nAdditional table information: table: network_2"} -{"question": "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)", "answer": "Whare the names, friends, and ages of all people who are older than the average age of a person?\nAdditional table information: table: network_2"} -{"question": "SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach')", "answer": "Who is the friend of Zach with longest year relationship?\nAdditional table information: table: network_2"} -{"question": "SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach')", "answer": "Which friend of Zach has the longest-lasting friendship?\nAdditional table information: table: network_2"} -{"question": "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')", "answer": "What is the age of the friend of Zach with longest year relationship?\nAdditional table information: table: network_2"} -{"question": "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')", "answer": "What are the ages of all of Zach's friends who are in the longest relationship?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT MIN(YEAR) FROM PersonFriend WHERE friend = 'Alice')", "answer": "Find the name of persons who are friends with Alice for the shortest years.\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT MIN(YEAR) FROM PersonFriend WHERE friend = 'Alice')", "answer": "What are the names of all people who are friends with Alice for the shortest amount of time?\nAdditional table information: table: network_2"} -{"question": "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')", "answer": "Find the name, age, and job title of persons who are friends with Alice for the longest years.\nAdditional table information: table: network_2"} -{"question": "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')", "answer": "What are the names, ages, and jobs of all people who are friends with Alice for the longest amount of time?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM person EXCEPT SELECT name FROM PersonFriend", "answer": "Who is the person that has no friend?\nAdditional table information: table: network_2"} -{"question": "SELECT name FROM person EXCEPT SELECT name FROM PersonFriend", "answer": "What are the names of all people who do not have friends?\nAdditional table information: table: network_2"} -{"question": "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", "answer": "Which person whose friends have the oldest average age?\nAdditional table information: table: network_2"} -{"question": "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", "answer": "What is the name of the person who has the oldest average age for their friends, and what is that average age?\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(DISTINCT name) FROM PersonFriend WHERE NOT friend IN (SELECT name FROM person WHERE city = 'Austin')", "answer": "What is the total number of people who has no friend living in the city of Austin.\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(DISTINCT name) FROM PersonFriend WHERE NOT friend IN (SELECT name FROM person WHERE city = 'Austin')", "answer": "What is the total number of people who have no friends living in Austin?\nAdditional table information: table: network_2"} -{"question": "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'", "answer": "Find Alice's friends of friends.\nAdditional table information: table: network_2"} -{"question": "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'", "answer": "What are the names of all of Alice's friends of friends?\nAdditional table information: table: network_2"} -{"question": "SELECT COUNT(*) FROM member", "answer": "How many members are there?\nAdditional table information: table: decoration_competition"} -{"question": "SELECT Name FROM member ORDER BY Name ASC NULLS FIRST", "answer": "List the names of members in ascending alphabetical order.\nAdditional table information: table: decoration_competition"} -{"question": "SELECT Name, Country FROM member", "answer": "What are the names and countries of members?\nAdditional table information: table: decoration_competition"} -{"question": "SELECT Name FROM member WHERE Country = 'United States' OR Country = 'Canada'", "answer": "Show the names of members whose country is 'United States' or 'Canada'.\nAdditional table information: table: decoration_competition"} -{"question": "SELECT Country, COUNT(*) FROM member GROUP BY Country", "answer": "Show the different countries and the number of members from each.\nAdditional table information: table: decoration_competition"} -{"question": "SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common country across members.\nAdditional table information: table: decoration_competition"} -{"question": "SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 2", "answer": "Which countries have more than two members?\nAdditional table information: table: decoration_competition"} -{"question": "SELECT Leader_Name, College_Location FROM college", "answer": "Show the leader names and locations of colleges.\nAdditional table information: table: decoration_competition"} -{"question": "SELECT T2.Name, T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID", "answer": "Show the names of members and names of colleges they go to.\nAdditional table information: table: decoration_competition"} -{"question": "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 NULLS FIRST", "answer": "Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names.\nAdditional table information: table: decoration_competition"} -{"question": "SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID WHERE T2.Country = 'Canada'", "answer": "Show the distinct leader names of colleges associated with members from country 'Canada'.\nAdditional table information: table: decoration_competition"} -{"question": "SELECT T1.Name, T2.Decoration_Theme FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID", "answer": "Show the names of members and the decoration themes they have.\nAdditional table information: table: decoration_competition"} -{"question": "SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID WHERE T2.Rank_in_Round > 3", "answer": "Show the names of members that have a rank in round higher than 3.\nAdditional table information: table: decoration_competition"} -{"question": "SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round ASC NULLS FIRST", "answer": "Show the names of members in ascending order of their rank in rounds.\nAdditional table information: table: decoration_competition"} -{"question": "SELECT Name FROM member WHERE NOT Member_ID IN (SELECT Member_ID FROM round)", "answer": "List the names of members who did not participate in any round.\nAdditional table information: table: decoration_competition"} -{"question": "SELECT document_name, access_count FROM documents ORDER BY document_name NULLS FIRST", "answer": "Find the name and access counts of all documents, in alphabetic order of the document name.\nAdditional table information: table: document_management"} -{"question": "SELECT document_name, access_count FROM documents ORDER BY document_name NULLS FIRST", "answer": "What are the names of all the documents, as well as the access counts of each, ordered alphabetically?\nAdditional table information: table: document_management"} -{"question": "SELECT document_name, access_count FROM documents ORDER BY access_count DESC LIMIT 1", "answer": "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?\nAdditional table information: table: document_management"} -{"question": "SELECT document_name, access_count FROM documents ORDER BY access_count DESC LIMIT 1", "answer": "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?\nAdditional table information: table: document_management"} -{"question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 4", "answer": "Find the types of documents with more than 4 documents.\nAdditional table information: table: document_management"} -{"question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 4", "answer": "What are the codes of types of documents of which there are for or more?\nAdditional table information: table: document_management"} -{"question": "SELECT SUM(access_count) FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the total access count of all documents in the most popular document type.\nAdditional table information: table: document_management"} -{"question": "SELECT SUM(access_count) FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the total access count of documents that are of the most common document type?\nAdditional table information: table: document_management"} -{"question": "SELECT AVG(access_count) FROM documents", "answer": "What is the average access count of documents?\nAdditional table information: table: document_management"} -{"question": "SELECT AVG(access_count) FROM documents", "answer": "Find the average access count across all documents?\nAdditional table information: table: document_management"} -{"question": "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", "answer": "What is the structure of the document with the least number of accesses?\nAdditional table information: table: document_management"} -{"question": "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", "answer": "Return the structure description of the document that has been accessed the fewest number of times.\nAdditional table information: table: document_management"} -{"question": "SELECT document_type_code FROM documents WHERE document_name = 'David CV'", "answer": "What is the type of the document named 'David CV'?\nAdditional table information: table: document_management"} -{"question": "SELECT document_type_code FROM documents WHERE document_name = 'David CV'", "answer": "Return the type code of the document named 'David CV'.\nAdditional table information: table: document_management"} -{"question": "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", "answer": "Find the list of documents that are both in the most three popular type and have the most three popular structure.\nAdditional table information: table: document_management"} -{"question": "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", "answer": "What are the names of documents that have both one of the three most common types and one of three most common structures?\nAdditional table information: table: document_management"} -{"question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000", "answer": "What document types do have more than 10000 total access number.\nAdditional table information: table: document_management"} -{"question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000", "answer": "Return the codes of the document types that do not have a total access count of over 10000.\nAdditional table information: table: document_management"} -{"question": "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'", "answer": "What are all the section titles of the document named 'David CV'?\nAdditional table information: table: document_management"} -{"question": "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'", "answer": "Give the section titles of the document with the name 'David CV'.\nAdditional table information: table: document_management"} -{"question": "SELECT document_name FROM documents WHERE NOT document_code IN (SELECT document_code FROM document_sections)", "answer": "Find all the name of documents without any sections.\nAdditional table information: table: document_management"} -{"question": "SELECT document_name FROM documents WHERE NOT document_code IN (SELECT document_code FROM document_sections)", "answer": "What are the names of documents that do not have any sections?\nAdditional table information: table: document_management"} -{"question": "SELECT user_name, password FROM users GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List all the username and passwords of users with the most popular role.\nAdditional table information: table: document_management"} -{"question": "SELECT user_name, password FROM users GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the usernames and passwords of users that have the most common role?\nAdditional table information: table: document_management"} -{"question": "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'", "answer": "Find the average access counts of documents with functional area 'Acknowledgement'.\nAdditional table information: table: document_management"} -{"question": "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'", "answer": "What are the average access counts of documents that have the functional area description 'Acknowledgement'?\nAdditional table information: table: document_management"} -{"question": "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", "answer": "Find names of the document without any images.\nAdditional table information: table: document_management"} -{"question": "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", "answer": "What are the names of documents that do not have any images?\nAdditional table information: table: document_management"} -{"question": "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", "answer": "What is the name of the document with the most number of sections?\nAdditional table information: table: document_management"} -{"question": "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", "answer": "Return the name of the document that has the most sections.\nAdditional table information: table: document_management"} -{"question": "SELECT document_name FROM documents WHERE document_name LIKE '%CV%'", "answer": "List all the document names which contains 'CV'.\nAdditional table information: table: document_management"} -{"question": "SELECT document_name FROM documents WHERE document_name LIKE '%CV%'", "answer": "What are the names of documents that contain the substring 'CV'?\nAdditional table information: table: document_management"} -{"question": "SELECT COUNT(*) FROM users WHERE user_login = 1", "answer": "How many users are logged in?\nAdditional table information: table: document_management"} -{"question": "SELECT COUNT(*) FROM users WHERE user_login = 1", "answer": "Count the number of users that are logged in.\nAdditional table information: table: document_management"} -{"question": "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)", "answer": "Find the description of the most popular role among the users that have logged in.\nAdditional table information: table: document_management"} -{"question": "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)", "answer": "What is the description of the most popular role among users that have logged in?\nAdditional table information: table: document_management"} -{"question": "SELECT AVG(access_count) FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Find the average access count of documents with the least popular structure.\nAdditional table information: table: document_management"} -{"question": "SELECT AVG(access_count) FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the average access count of documents that have the least common structure?\nAdditional table information: table: document_management"} -{"question": "SELECT image_name, image_url FROM images ORDER BY image_name NULLS FIRST", "answer": "List all the image name and URLs in the order of their names.\nAdditional table information: table: document_management"} -{"question": "SELECT image_name, image_url FROM images ORDER BY image_name NULLS FIRST", "answer": "What are the names and urls of images, sorted alphabetically?\nAdditional table information: table: document_management"} -{"question": "SELECT COUNT(*), role_code FROM users GROUP BY role_code", "answer": "Find the number of users in each role.\nAdditional table information: table: document_management"} -{"question": "SELECT COUNT(*), role_code FROM users GROUP BY role_code", "answer": "What are the different role codes for users, and how many users have each?\nAdditional table information: table: document_management"} -{"question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 2", "answer": "What document types have more than 2 corresponding documents?\nAdditional table information: table: document_management"} -{"question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 2", "answer": "Give the codes of document types that have more than 2 corresponding documents.\nAdditional table information: table: document_management"} -{"question": "SELECT COUNT(*) FROM Companies", "answer": "How many companies are there?\nAdditional table information: table: company_office"} -{"question": "SELECT COUNT(*) FROM Companies", "answer": "Count the number of companies.\nAdditional table information: table: company_office"} -{"question": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC", "answer": "List the names of companies in descending order of market value.\nAdditional table information: table: company_office"} -{"question": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC", "answer": "Sort the company names in descending order of the company's market value.\nAdditional table information: table: company_office"} -{"question": "SELECT name FROM Companies WHERE Headquarters <> 'USA'", "answer": "What are the names of companies whose headquarters are not 'USA'?\nAdditional table information: table: company_office"} -{"question": "SELECT name FROM Companies WHERE Headquarters <> 'USA'", "answer": "Find the names of the companies whose headquarters are not located in 'USA'.\nAdditional table information: table: company_office"} -{"question": "SELECT name, Assets_billion FROM Companies ORDER BY name ASC NULLS FIRST", "answer": "What are the name and assets of each company, sorted in ascending order of company name?\nAdditional table information: table: company_office"} -{"question": "SELECT name, Assets_billion FROM Companies ORDER BY name ASC NULLS FIRST", "answer": "List the name and assets of each company in ascending order of company name.\nAdditional table information: table: company_office"} -{"question": "SELECT AVG(Profits_billion) FROM Companies", "answer": "What are the average profits of companies?\nAdditional table information: table: company_office"} -{"question": "SELECT AVG(Profits_billion) FROM Companies", "answer": "Compute the average profits companies make.\nAdditional table information: table: company_office"} -{"question": "SELECT MAX(Sales_billion), MIN(Sales_billion) FROM Companies WHERE Industry <> 'Banking'", "answer": "What are the maximum and minimum sales of the companies whose industries are not 'Banking'.\nAdditional table information: table: company_office"} -{"question": "SELECT MAX(Sales_billion), MIN(Sales_billion) FROM Companies WHERE Industry <> 'Banking'", "answer": "Find the maximum and minimum sales of the companies that are not in the 'Banking' industry.\nAdditional table information: table: company_office"} -{"question": "SELECT COUNT(DISTINCT Industry) FROM Companies", "answer": "How many different industries are the companies in?\nAdditional table information: table: company_office"} -{"question": "SELECT COUNT(DISTINCT Industry) FROM Companies", "answer": "Count the number of distinct company industries.\nAdditional table information: table: company_office"} -{"question": "SELECT name FROM buildings ORDER BY Height DESC", "answer": "List the names of buildings in descending order of building height.\nAdditional table information: table: company_office"} -{"question": "SELECT name FROM buildings ORDER BY Height DESC", "answer": "What are the names of buildings sorted in descending order of building height?\nAdditional table information: table: company_office"} -{"question": "SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1", "answer": "Find the stories of the building with the largest height.\nAdditional table information: table: company_office"} -{"question": "SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1", "answer": "What is the stories of highest building?\nAdditional table information: table: company_office"} -{"question": "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", "answer": "List the name of a building along with the name of a company whose office is in the building.\nAdditional table information: table: company_office"} -{"question": "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", "answer": "For each company, return the company name and the name of the building its office is located in.\nAdditional table information: table: company_office"} -{"question": "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", "answer": "Show the names of the buildings that have more than one company offices.\nAdditional table information: table: company_office"} -{"question": "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", "answer": "Which buildings have more than one company offices? Give me the building names.\nAdditional table information: table: company_office"} -{"question": "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", "answer": "Show the name of the building that has the most company offices.\nAdditional table information: table: company_office"} -{"question": "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", "answer": "Which building has the largest number of company offices? Give me the building name.\nAdditional table information: table: company_office"} -{"question": "SELECT name FROM buildings WHERE Status = 'on-hold' ORDER BY Stories ASC NULLS FIRST", "answer": "Please show the names of the buildings whose status is 'on-hold', in ascending order of stories.\nAdditional table information: table: company_office"} -{"question": "SELECT name FROM buildings WHERE Status = 'on-hold' ORDER BY Stories ASC NULLS FIRST", "answer": "Find the names of the buildings in 'on-hold' status, and sort them in ascending order of building stories.\nAdditional table information: table: company_office"} -{"question": "SELECT Industry, COUNT(*) FROM Companies GROUP BY Industry", "answer": "Please show each industry and the corresponding number of companies in that industry.\nAdditional table information: table: company_office"} -{"question": "SELECT Industry, COUNT(*) FROM Companies GROUP BY Industry", "answer": "Whah are the name of each industry and the number of companies in that industry?\nAdditional table information: table: company_office"} -{"question": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC", "answer": "Please show the industries of companies in descending order of the number of companies.\nAdditional table information: table: company_office"} -{"question": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC", "answer": "Sort all the industries in descending order of the count of companies in each industry\nAdditional table information: table: company_office"} -{"question": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the industry shared by the most companies.\nAdditional table information: table: company_office"} -{"question": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which industry has the most companies?\nAdditional table information: table: company_office"} -{"question": "SELECT name FROM buildings WHERE NOT id IN (SELECT building_id FROM Office_locations)", "answer": "List the names of buildings that have no company office.\nAdditional table information: table: company_office"} -{"question": "SELECT name FROM buildings WHERE NOT id IN (SELECT building_id FROM Office_locations)", "answer": "Which buildings do not have any company office? Give me the building names.\nAdditional table information: table: company_office"} -{"question": "SELECT Industry FROM Companies WHERE Headquarters = 'USA' INTERSECT SELECT Industry FROM Companies WHERE Headquarters = 'China'", "answer": "Show the industries shared by companies whose headquarters are 'USA' and companies whose headquarters are 'China'.\nAdditional table information: table: company_office"} -{"question": "SELECT Industry FROM Companies WHERE Headquarters = 'USA' INTERSECT SELECT Industry FROM Companies WHERE Headquarters = 'China'", "answer": "Which industries have both companies with headquarter in 'USA' and companies with headquarter in 'China'?\nAdditional table information: table: company_office"} -{"question": "SELECT COUNT(*) FROM Companies WHERE Industry = 'Banking' OR Industry = 'Conglomerate'", "answer": "Find the number of companies whose industry is 'Banking' or 'Conglomerate',\nAdditional table information: table: company_office"} -{"question": "SELECT COUNT(*) FROM Companies WHERE Industry = 'Banking' OR Industry = 'Conglomerate'", "answer": "How many companies are in either 'Banking' industry or 'Conglomerate' industry?\nAdditional table information: table: company_office"} -{"question": "SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2", "answer": "Show the headquarters shared by more than two companies.\nAdditional table information: table: company_office"} -{"question": "SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2", "answer": "Which headquarter locations are used by more than 2 companies?\nAdditional table information: table: company_office"} -{"question": "SELECT COUNT(*) FROM Products", "answer": "How many products are there?\nAdditional table information: table: solvency_ii"} -{"question": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC NULLS FIRST", "answer": "List the name of products in ascending order of price.\nAdditional table information: table: solvency_ii"} -{"question": "SELECT Product_Name, Product_Type_Code FROM Products", "answer": "What are the names and type codes of products?\nAdditional table information: table: solvency_ii"} -{"question": "SELECT Product_Price FROM Products WHERE Product_Name = 'Dining' OR Product_Name = 'Trading Policy'", "answer": "Show the prices of the products named 'Dining' or 'Trading Policy'.\nAdditional table information: table: solvency_ii"} -{"question": "SELECT AVG(Product_Price) FROM Products", "answer": "What is the average price for products?\nAdditional table information: table: solvency_ii"} -{"question": "SELECT Product_Name FROM Products ORDER BY Product_Price DESC LIMIT 1", "answer": "What is the name of the product with the highest price?\nAdditional table information: table: solvency_ii"} -{"question": "SELECT Product_Type_Code, COUNT(*) FROM Products GROUP BY Product_Type_Code", "answer": "Show different type codes of products and the number of products with each type code.\nAdditional table information: table: solvency_ii"} -{"question": "SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common type code across products.\nAdditional table information: table: solvency_ii"} -{"question": "SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code HAVING COUNT(*) >= 2", "answer": "Show the product type codes that have at least two products.\nAdditional table information: table: solvency_ii"} -{"question": "SELECT Product_Type_Code FROM Products WHERE Product_Price > 4500 INTERSECT SELECT Product_Type_Code FROM Products WHERE Product_Price < 3000", "answer": "Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000.\nAdditional table information: table: solvency_ii"} -{"question": "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", "answer": "Show the names of products and the number of events they are in.\nAdditional table information: table: solvency_ii"} -{"question": "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", "answer": "Show the names of products and the number of events they are in, sorted by the number of events in descending order.\nAdditional table information: table: solvency_ii"} -{"question": "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", "answer": "Show the names of products that are in at least two events.\nAdditional table information: table: solvency_ii"} -{"question": "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 NULLS FIRST", "answer": "Show the names of products that are in at least two events in ascending alphabetical order of product name.\nAdditional table information: table: solvency_ii"} -{"question": "SELECT Product_Name FROM Products WHERE NOT Product_ID IN (SELECT Product_ID FROM Products_in_Events)", "answer": "List the names of products that are not in any event.\nAdditional table information: table: solvency_ii"} -{"question": "SELECT COUNT(*) FROM artwork", "answer": "How many artworks are there?\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT Name FROM artwork ORDER BY Name ASC NULLS FIRST", "answer": "List the name of artworks in ascending alphabetical order.\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT Name FROM artwork WHERE TYPE <> 'Program Talent Show'", "answer": "List the name of artworks whose type is not 'Program Talent Show'.\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT Festival_Name, LOCATION FROM festival_detail", "answer": "What are the names and locations of festivals?\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT Chair_Name FROM festival_detail ORDER BY YEAR ASC NULLS FIRST", "answer": "What are the names of the chairs of festivals, sorted in ascending order of the year held?\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1", "answer": "What is the location of the festival with the largest number of audience?\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT Festival_Name FROM festival_detail WHERE YEAR = 2007", "answer": "What are the names of festivals held in year 2007?\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT AVG(Num_of_Audience) FROM festival_detail", "answer": "What is the average number of audience for festivals?\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT Festival_Name FROM festival_detail ORDER BY YEAR DESC LIMIT 3", "answer": "Show the names of the three most recent festivals.\nAdditional table information: table: entertainment_awards"} -{"question": "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", "answer": "For each nomination, show the name of the artwork and name of the festival where it is nominated.\nAdditional table information: table: entertainment_awards"} -{"question": "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", "answer": "Show distinct types of artworks that are nominated in festivals in 2007.\nAdditional table information: table: entertainment_awards"} -{"question": "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 NULLS FIRST", "answer": "Show the names of artworks in ascending order of the year they are nominated in.\nAdditional table information: table: entertainment_awards"} -{"question": "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'", "answer": "Show the names of festivals that have nominated artworks of type 'Program Talent Show'.\nAdditional table information: table: entertainment_awards"} -{"question": "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", "answer": "Show the ids and names of festivals that have at least two nominations for artworks.\nAdditional table information: table: entertainment_awards"} -{"question": "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", "answer": "Show the id, name of each festival and the number of artworks it has nominated.\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT TYPE, COUNT(*) FROM artwork GROUP BY TYPE", "answer": "Please show different types of artworks with the corresponding number of artworks of each type.\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT TYPE FROM artwork GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the most common type of artworks.\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*) > 1", "answer": "List the year in which there are more than one festivals.\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT Name FROM Artwork WHERE NOT Artwork_ID IN (SELECT Artwork_ID FROM nomination)", "answer": "List the name of artworks that are not nominated.\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT Num_of_Audience FROM festival_detail WHERE YEAR = 2008 OR YEAR = 2010", "answer": "Show the number of audience in year 2008 or 2010.\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT SUM(Num_of_Audience) FROM festival_detail", "answer": "What are the total number of the audiences who visited any of the festivals?\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT YEAR FROM festival_detail WHERE LOCATION = 'United States' INTERSECT SELECT YEAR FROM festival_detail WHERE LOCATION <> 'United States'", "answer": "In which year are there festivals both inside the 'United States' and outside the 'United States'?\nAdditional table information: table: entertainment_awards"} -{"question": "SELECT COUNT(*) FROM premises", "answer": "How many premises are there?\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "SELECT DISTINCT premises_type FROM premises", "answer": "What are all the distinct premise types?\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "SELECT premises_type, premise_details FROM premises ORDER BY premises_type NULLS FIRST", "answer": "Find the types and details for all premises and order by the premise type.\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "SELECT premises_type, COUNT(*) FROM premises GROUP BY premises_type", "answer": "Show each premise type and the number of premises in that type.\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "SELECT product_category, COUNT(*) FROM mailshot_campaigns GROUP BY product_category", "answer": "Show all distinct product categories along with the number of mailshots in each category.\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "SELECT customer_name, customer_phone FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM mailshot_customers)", "answer": "Show the name and phone of the customer without any mailshot.\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "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'", "answer": "Show the name and phone for customers with a mailshot with outcome code 'No Response'.\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "SELECT outcome_code, COUNT(*) FROM mailshot_customers GROUP BY outcome_code", "answer": "Show the outcome code of mailshots along with the number of mailshots in each outcome code.\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "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", "answer": "Show the names of customers who have at least 2 mailshots with outcome code 'Order'.\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "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", "answer": "Show the names of customers who have the most mailshots.\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "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'", "answer": "What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome.\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "SELECT T2.premises_type, T1.address_type_code FROM customer_addresses AS T1 JOIN premises AS T2 ON T1.premise_id = T2.premise_id", "answer": "Show the premise type and address type code for all customer addresses.\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "SELECT DISTINCT address_type_code FROM customer_addresses", "answer": "What are the distinct address type codes for all customer addresses?\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "SELECT order_shipping_charges, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' OR order_status_code = 'Paid'", "answer": "Show the shipping charge and customer id for customer orders with order status Cancelled or Paid.\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "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'", "answer": "Show the names of customers having an order with shipping method FedEx and order status Paid.\nAdditional table information: table: customers_campaigns_ecommerce"} -{"question": "SELECT COUNT(*) FROM COURSE", "answer": "How many courses are there in total?\nAdditional table information: table: college_3"} -{"question": "SELECT COUNT(*) FROM COURSE", "answer": "Count the number of courses.\nAdditional table information: table: college_3"} -{"question": "SELECT COUNT(*) FROM COURSE WHERE Credits > 2", "answer": "How many courses have more than 2 credits?\nAdditional table information: table: college_3"} -{"question": "SELECT COUNT(*) FROM COURSE WHERE Credits > 2", "answer": "Count the number of courses with more than 2 credits.\nAdditional table information: table: college_3"} -{"question": "SELECT CName FROM COURSE WHERE Credits = 1", "answer": "List all names of courses with 1 credit?\nAdditional table information: table: college_3"} -{"question": "SELECT CName FROM COURSE WHERE Credits = 1", "answer": "What are the names of courses with 1 credit?\nAdditional table information: table: college_3"} -{"question": "SELECT CName FROM COURSE WHERE Days = 'MTW'", "answer": "Which courses are taught on days MTW?\nAdditional table information: table: college_3"} -{"question": "SELECT CName FROM COURSE WHERE Days = 'MTW'", "answer": "What are the course names for courses taught on MTW?\nAdditional table information: table: college_3"} -{"question": "SELECT COUNT(*) FROM DEPARTMENT WHERE Division = 'AS'", "answer": "What is the number of departments in Division 'AS'?\nAdditional table information: table: college_3"} -{"question": "SELECT COUNT(*) FROM DEPARTMENT WHERE Division = 'AS'", "answer": "How many departments are in the division AS?\nAdditional table information: table: college_3"} -{"question": "SELECT DPhone FROM DEPARTMENT WHERE Room = 268", "answer": "What are the phones of departments in Room 268?\nAdditional table information: table: college_3"} -{"question": "SELECT DPhone FROM DEPARTMENT WHERE Room = 268", "answer": "Give the phones for departments in room 268.\nAdditional table information: table: college_3"} -{"question": "SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = 'B'", "answer": "Find the number of students that have at least one grade 'B'.\nAdditional table information: table: college_3"} -{"question": "SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = 'B'", "answer": "How many students have had at least one 'B' grade?\nAdditional table information: table: college_3"} -{"question": "SELECT MAX(gradepoint), MIN(gradepoint) FROM GRADECONVERSION", "answer": "Find the max and min grade point for all letter grade.\nAdditional table information: table: college_3"} -{"question": "SELECT MAX(gradepoint), MIN(gradepoint) FROM GRADECONVERSION", "answer": "What are the maximum and minumum grade points?\nAdditional table information: table: college_3"} -{"question": "SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'", "answer": "Find the first names of students whose first names contain letter 'a'.\nAdditional table information: table: college_3"} -{"question": "SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'", "answer": "What are the first names for students who have an 'a' in their first name?\nAdditional table information: table: college_3"} -{"question": "SELECT Fname, Lname FROM FACULTY WHERE sex = 'M' AND Building = 'NEB'", "answer": "Find the first names and last names of male (sex is M) faculties who live in building NEB.\nAdditional table information: table: college_3"} -{"question": "SELECT Fname, Lname FROM FACULTY WHERE sex = 'M' AND Building = 'NEB'", "answer": "What are the full names of faculties with sex M and who live in building NEB?\nAdditional table information: table: college_3"} -{"question": "SELECT Room FROM FACULTY WHERE Rank = 'Professor' AND Building = 'NEB'", "answer": "Find the rooms of faculties with rank professor who live in building NEB.\nAdditional table information: table: college_3"} -{"question": "SELECT Room FROM FACULTY WHERE Rank = 'Professor' AND Building = 'NEB'", "answer": "What are the rooms for members of the faculty who are professors and who live in building NEB?\nAdditional table information: table: college_3"} -{"question": "SELECT DName FROM DEPARTMENT WHERE Building = 'Mergenthaler'", "answer": "Find the department name that is in Building 'Mergenthaler'.\nAdditional table information: table: college_3"} -{"question": "SELECT DName FROM DEPARTMENT WHERE Building = 'Mergenthaler'", "answer": "What is the name of the department in the Building Mergenthaler?\nAdditional table information: table: college_3"} -{"question": "SELECT * FROM COURSE ORDER BY Credits NULLS FIRST", "answer": "List all information about courses sorted by credits in the ascending order.\nAdditional table information: table: college_3"} -{"question": "SELECT * FROM COURSE ORDER BY Credits NULLS FIRST", "answer": "What is all the information about courses, ordered by credits ascending?\nAdditional table information: table: college_3"} -{"question": "SELECT CName FROM COURSE ORDER BY Credits NULLS FIRST", "answer": "List the course name of courses sorted by credits.\nAdditional table information: table: college_3"} -{"question": "SELECT CName FROM COURSE ORDER BY Credits NULLS FIRST", "answer": "What are the course names, ordered by credits?\nAdditional table information: table: college_3"} -{"question": "SELECT Fname FROM STUDENT ORDER BY Age DESC", "answer": "Find the first name of students in the descending order of age.\nAdditional table information: table: college_3"} -{"question": "SELECT Fname FROM STUDENT ORDER BY Age DESC", "answer": "What are the first names of students, ordered by age from greatest to least?\nAdditional table information: table: college_3"} -{"question": "SELECT LName FROM STUDENT WHERE Sex = 'F' ORDER BY Age DESC", "answer": "Find the last name of female (sex is F) students in the descending order of age.\nAdditional table information: table: college_3"} -{"question": "SELECT LName FROM STUDENT WHERE Sex = 'F' ORDER BY Age DESC", "answer": "What are the last names of female students, ordered by age descending?\nAdditional table information: table: college_3"} -{"question": "SELECT Lname FROM FACULTY WHERE Building = 'Barton' ORDER BY Lname NULLS FIRST", "answer": "Find the last names of faculties in building Barton in alphabetic order.\nAdditional table information: table: college_3"} -{"question": "SELECT Lname FROM FACULTY WHERE Building = 'Barton' ORDER BY Lname NULLS FIRST", "answer": "What are the last names of faculty in building Barton, sorted by last name?\nAdditional table information: table: college_3"} -{"question": "SELECT Fname FROM FACULTY WHERE Rank = 'Professor' ORDER BY Fname NULLS FIRST", "answer": "Find the first names of faculties of rank Professor in alphabetic order.\nAdditional table information: table: college_3"} -{"question": "SELECT Fname FROM FACULTY WHERE Rank = 'Professor' ORDER BY Fname NULLS FIRST", "answer": "What are the first names for all faculty professors, ordered by first name?\nAdditional table information: table: college_3"} -{"question": "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", "answer": "Find the name of the department that has the biggest number of students minored in?\nAdditional table information: table: college_3"} -{"question": "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", "answer": "What is the name of the department with the most students minoring in it?\nAdditional table information: table: college_3"} -{"question": "SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO", "answer": "Find the name of the department that has no students minored in?\nAdditional table information: table: college_3"} -{"question": "SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO", "answer": "What is the name of the department htat has no students minoring in it?\nAdditional table information: table: college_3"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Find the name of the department that has the fewest members.\nAdditional table information: table: college_3"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the name of the department with the fewest members?\nAdditional table information: table: college_3"} -{"question": "SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Find the rank of the faculty that the fewest faculties belong to.\nAdditional table information: table: college_3"} -{"question": "SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the least common faculty rank?\nAdditional table information: table: college_3"} -{"question": "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", "answer": "What are the first and last names of the instructors who teach the top 3 number of courses?\nAdditional table information: table: college_3"} -{"question": "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", "answer": "What are the full names of the 3 instructors who teach the most courses?\nAdditional table information: table: college_3"} -{"question": "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", "answer": "Which building does the instructor who teaches the most number of courses live in?\nAdditional table information: table: college_3"} -{"question": "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", "answer": "Give the building that the instructor who teaches the greatest number of courses lives in.\nAdditional table information: table: college_3"} -{"question": "SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID HAVING COUNT(*) >= 5", "answer": "What are the name of courses that have at least five enrollments?\nAdditional table information: table: college_3"} -{"question": "SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID HAVING COUNT(*) >= 5", "answer": "Give the names of the courses with at least five enrollments.\nAdditional table information: table: college_3"} -{"question": "SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = 'COMPUTER LITERACY'", "answer": "Find the first name and last name of the instructor of course that has course name\nAdditional table information: table: college_3"} -{"question": "SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = 'COMPUTER LITERACY'", "answer": "What is the full name of the instructor who has a course named COMPUTER LITERACY?\nAdditional table information: table: college_3"} -{"question": "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'", "answer": "Find the department name and room of the course INTRODUCTION TO COMPUTER SCIENCE.\nAdditional table information: table: college_3"} -{"question": "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'", "answer": "What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE?\nAdditional table information: table: college_3"} -{"question": "SELECT T3.Fname, T3.LName, T2.gradepoint FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID", "answer": "Find the student first and last names and grade points of all enrollments.\nAdditional table information: table: college_3"} -{"question": "SELECT T3.Fname, T3.LName, T2.gradepoint FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID", "answer": "What are the full names and gradepoints for all enrollments?\nAdditional table information: table: college_3"} -{"question": "SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T2.gradepoint >= 3.8", "answer": "Find the distinct student first names of all students that have grade point at least 3.8 in one course.\nAdditional table information: table: college_3"} -{"question": "SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T2.gradepoint >= 3.8", "answer": "What are the distinct first names for students with a grade point of 3.8 or above in at least one course?\nAdditional table information: table: college_3"} -{"question": "SELECT T1.Fname, T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520", "answer": "Find the full names of faculties who are members of department with department number 520.\nAdditional table information: table: college_3"} -{"question": "SELECT T1.Fname, T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520", "answer": "What are the full names of faculty members who are a part of department 520?\nAdditional table information: table: college_3"} -{"question": "SELECT T2.Fname, T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140", "answer": "What are the first names and last names of the students that minor in the department with DNO 140.\nAdditional table information: table: college_3"} -{"question": "SELECT T2.Fname, T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140", "answer": "What are the full names of students minoring in department 140?\nAdditional table information: table: college_3"} -{"question": "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'", "answer": "Find the last names of faculties who are members of computer science department.\nAdditional table information: table: college_3"} -{"question": "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'", "answer": "What are the last names of faculty who are part of the computer science department?\nAdditional table information: table: college_3"} -{"question": "SELECT AVG(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = 'Smith'", "answer": "Find the average grade point of student whose last name is Smith.\nAdditional table information: table: college_3"} -{"question": "SELECT AVG(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = 'Smith'", "answer": "What is the average gradepoint for students with the last name Smith?\nAdditional table information: table: college_3"} -{"question": "SELECT MAX(T2.gradepoint), MIN(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = 'NYC'", "answer": "What is the maximum and minimum grade point of students who live in NYC?\nAdditional table information: table: college_3"} -{"question": "SELECT MAX(T2.gradepoint), MIN(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = 'NYC'", "answer": "Give the maximum and minimum gradepoints for students living in NYC?\nAdditional table information: table: college_3"} -{"question": "SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4", "answer": "Find the names of courses that have either 3 credits or 1 credit but 4 hours.\nAdditional table information: table: college_3"} -{"question": "SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4", "answer": "What are the names of courses that give either 3 credits, or 1 credit and 4 hours?\nAdditional table information: table: college_3"} -{"question": "SELECT DName FROM DEPARTMENT WHERE Division = 'AS' UNION SELECT DName FROM DEPARTMENT WHERE Division = 'EN' AND Building = 'NEB'", "answer": "Find the names of departments that are either in division AS or in division EN and in Building NEB.\nAdditional table information: table: college_3"} -{"question": "SELECT DName FROM DEPARTMENT WHERE Division = 'AS' UNION SELECT DName FROM DEPARTMENT WHERE Division = 'EN' AND Building = 'NEB'", "answer": "What are the names of departments either in division AS, or in division EN and in building NEB?\nAdditional table information: table: college_3"} -{"question": "SELECT Fname FROM STUDENT WHERE NOT StuID IN (SELECT StuID FROM ENROLLED_IN)", "answer": "Find the first name of students not enrolled in any course.\nAdditional table information: table: college_3"} -{"question": "SELECT Fname FROM STUDENT WHERE NOT StuID IN (SELECT StuID FROM ENROLLED_IN)", "answer": "What are the first names of all students that are not enrolled in courses?\nAdditional table information: table: college_3"} -{"question": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3", "answer": "What are the ids of the top three products that were purchased in the largest amount?\nAdditional table information: table: department_store"} -{"question": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3", "answer": "Give the ids of the three products purchased in the largest amounts.\nAdditional table information: table: department_store"} -{"question": "SELECT product_id, product_type_code FROM products ORDER BY product_price NULLS FIRST LIMIT 1", "answer": "What are the product id and product type of the cheapest product?\nAdditional table information: table: department_store"} -{"question": "SELECT product_id, product_type_code FROM products ORDER BY product_price NULLS FIRST LIMIT 1", "answer": "Give the id and product type of the product with the lowest price.\nAdditional table information: table: department_store"} -{"question": "SELECT COUNT(DISTINCT product_type_code) FROM products", "answer": "Find the number of different product types.\nAdditional table information: table: department_store"} -{"question": "SELECT COUNT(DISTINCT product_type_code) FROM products", "answer": "Count the number of distinct product types.\nAdditional table information: table: department_store"} -{"question": "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", "answer": "Return the address of customer 10.\nAdditional table information: table: department_store"} -{"question": "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", "answer": "What is the address for the customer with id 10?\nAdditional table information: table: department_store"} -{"question": "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'", "answer": "What are the staff ids and genders of all staffs whose job title is Department Manager?\nAdditional table information: table: department_store"} -{"question": "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'", "answer": "Return the staff ids and genders for any staff with the title Department Manager.\nAdditional table information: table: department_store"} -{"question": "SELECT payment_method_code, COUNT(*) FROM customers GROUP BY payment_method_code", "answer": "For each payment method, return how many customers use it.\nAdditional table information: table: department_store"} -{"question": "SELECT payment_method_code, COUNT(*) FROM customers GROUP BY payment_method_code", "answer": "How many customers use each payment method?\nAdditional table information: table: department_store"} -{"question": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id of the product that was ordered the most often?\nAdditional table information: table: department_store"} -{"question": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Give the product id for the product that was ordered most frequently.\nAdditional table information: table: department_store"} -{"question": "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", "answer": "What are the name, phone number and email address of the customer who made the largest number of orders?\nAdditional table information: table: department_store"} -{"question": "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", "answer": "Return the name, phone number and email address for the customer with the most orders.\nAdditional table information: table: department_store"} -{"question": "SELECT product_type_code, AVG(product_price) FROM products GROUP BY product_type_code", "answer": "What is the average price for each type of product?\nAdditional table information: table: department_store"} -{"question": "SELECT product_type_code, AVG(product_price) FROM products GROUP BY product_type_code", "answer": "Return the average price for each product type.\nAdditional table information: table: department_store"} -{"question": "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'", "answer": "How many department stores does the store chain South have?\nAdditional table information: table: department_store"} -{"question": "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'", "answer": "Count the number of stores the chain South has.\nAdditional table information: table: department_store"} -{"question": "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", "answer": "What is the name and job title of the staff who was assigned the latest?\nAdditional table information: table: department_store"} -{"question": "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", "answer": "Return the name and job title of the staff with the latest date assigned.\nAdditional table information: table: department_store"} -{"question": "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", "answer": "Give me the product type, name and price for all the products supplied by supplier id 3.\nAdditional table information: table: department_store"} -{"question": "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", "answer": "Return the product type, name, and price for products supplied by supplier 3.\nAdditional table information: table: department_store"} -{"question": "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 NULLS FIRST", "answer": "Return the distinct name of customers whose order status is Pending, in the order of customer id.\nAdditional table information: table: department_store"} -{"question": "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 NULLS FIRST", "answer": "What are the distinct names of customers with an order status of Pending, sorted by customer id?\nAdditional table information: table: department_store"} -{"question": "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'", "answer": "Find the name and address of the customers who have both New and Pending orders.\nAdditional table information: table: department_store"} -{"question": "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'", "answer": "What are the names and addressed of customers who have both New and Pending orders?\nAdditional table information: table: department_store"} -{"question": "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)", "answer": "Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products.\nAdditional table information: table: department_store"} -{"question": "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)", "answer": "What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products?\nAdditional table information: table: department_store"} -{"question": "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'", "answer": "What is the id and name of the department store that has both marketing and managing department?\nAdditional table information: table: department_store"} -{"question": "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'", "answer": "What are the ids and names of department stores with both marketing and managing departments?\nAdditional table information: table: department_store"} -{"question": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY COUNT(*) DESC LIMIT 2", "answer": "What are the ids of the two department store chains with the largest number of department stores?\nAdditional table information: table: department_store"} -{"question": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY COUNT(*) DESC LIMIT 2", "answer": "Return the ids of the two department store chains with the most department stores.\nAdditional table information: table: department_store"} -{"question": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "What is the id of the department with the least number of staff?\nAdditional table information: table: department_store"} -{"question": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Return the id of the department with the fewest staff assignments.\nAdditional table information: table: department_store"} -{"question": "SELECT product_type_code, MAX(product_price), MIN(product_price) FROM products GROUP BY product_type_code", "answer": "For each product type, return the maximum and minimum price.\nAdditional table information: table: department_store"} -{"question": "SELECT product_type_code, MAX(product_price), MIN(product_price) FROM products GROUP BY product_type_code", "answer": "What are the maximum and minimum product prices for each product type?\nAdditional table information: table: department_store"} -{"question": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING AVG(product_price) > (SELECT AVG(product_price) FROM products)", "answer": "Find the product type whose average price is higher than the average price of all products.\nAdditional table information: table: department_store"} -{"question": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING AVG(product_price) > (SELECT AVG(product_price) FROM products)", "answer": "What is the code of the product type with an average price higher than the average price of all products?\nAdditional table information: table: department_store"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Find the id and name of the staff who has been assigned for the shortest period.\nAdditional table information: table: department_store"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the id and name of the staff who has been assigned for the least amount of time?\nAdditional table information: table: department_store"} -{"question": "SELECT product_name, product_id FROM products WHERE product_price BETWEEN 600 AND 700", "answer": "Return the names and ids of all products whose price is between 600 and 700.\nAdditional table information: table: department_store"} -{"question": "SELECT product_name, product_id FROM products WHERE product_price BETWEEN 600 AND 700", "answer": "What are the names and ids of products costing between 600 and 700?\nAdditional table information: table: department_store"} -{"question": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT MIN(order_date) FROM Customer_Orders WHERE order_status_code = 'Cancelled')", "answer": "Find the ids of all distinct customers who made order after some orders that were Cancelled.\nAdditional table information: table: department_store"} -{"question": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT MIN(order_date) FROM Customer_Orders WHERE order_status_code = 'Cancelled')", "answer": "What are the distinct ids of customers who made an order after any order that was Cancelled?\nAdditional table information: table: department_store"} -{"question": "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')", "answer": "What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?\nAdditional table information: table: department_store"} -{"question": "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')", "answer": "Return the id of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff.\nAdditional table information: table: department_store"} -{"question": "SELECT customer_name, customer_id FROM customers WHERE customer_address LIKE '%TN%'", "answer": "What are the names and ids of customers whose address contains TN?\nAdditional table information: table: department_store"} -{"question": "SELECT customer_name, customer_id FROM customers WHERE customer_address LIKE '%TN%'", "answer": "Return the names and ids of customers who have TN in their address.\nAdditional table information: table: department_store"} -{"question": "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%'", "answer": "Return the name and gender of the staff who was assigned in 2016.\nAdditional table information: table: department_store"} -{"question": "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%'", "answer": "What are the names and genders of staff who were assigned in 2016?\nAdditional table information: table: department_store"} -{"question": "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", "answer": "List the name of staff who has been assigned multiple jobs.\nAdditional table information: table: department_store"} -{"question": "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", "answer": "What are the names of staff who have been assigned multiple jobs?\nAdditional table information: table: department_store"} -{"question": "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 NULLS FIRST", "answer": "List the name and phone number of all suppliers in the alphabetical order of their addresses.\nAdditional table information: table: department_store"} -{"question": "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 NULLS FIRST", "answer": "What are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed?\nAdditional table information: table: department_store"} -{"question": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers", "answer": "What are the phone numbers of all customers and suppliers.\nAdditional table information: table: department_store"} -{"question": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers", "answer": "Return the phone numbers for all customers and suppliers.\nAdditional table information: table: department_store"} -{"question": "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", "answer": "Return the ids of all products that were ordered more than three times or supplied more than 80000.\nAdditional table information: table: department_store"} -{"question": "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", "answer": "What are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000?\nAdditional table information: table: department_store"} -{"question": "SELECT product_id, product_name FROM products WHERE product_price < 600 OR product_price > 900", "answer": "What are id and name of the products whose price is lower than 600 or higher than 900?\nAdditional table information: table: department_store"} -{"question": "SELECT product_id, product_name FROM products WHERE product_price < 600 OR product_price > 900", "answer": "Give the ids and names of products with price lower than 600 or higher than 900.\nAdditional table information: table: department_store"} -{"question": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000", "answer": "Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.\nAdditional table information: table: department_store"} -{"question": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000", "answer": "What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000?\nAdditional table information: table: department_store"} -{"question": "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)", "answer": "What are the average amount purchased and value purchased for the supplier who supplies the most products.\nAdditional table information: table: department_store"} -{"question": "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)", "answer": "Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products.\nAdditional table information: table: department_store"} -{"question": "SELECT MAX(customer_code), MIN(customer_code) FROM Customers", "answer": "What is the largest and smallest customer codes?\nAdditional table information: table: department_store"} -{"question": "SELECT MAX(customer_code), MIN(customer_code) FROM Customers", "answer": "Return the maximum and minimum customer codes.\nAdditional table information: table: department_store"} -{"question": "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'", "answer": "List the names of all the distinct customers who bought a keyboard.\nAdditional table information: table: department_store"} -{"question": "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'", "answer": "What are the distinct names of customers who have purchased a keyboard?\nAdditional table information: table: department_store"} -{"question": "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'", "answer": "List the names and phone numbers of all the distinct suppliers who supply red jeans.\nAdditional table information: table: department_store"} -{"question": "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'", "answer": "What are the distinct names and phone numbers for suppliers who have red jeans?\nAdditional table information: table: department_store"} -{"question": "SELECT MAX(product_price), MIN(product_price), product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code NULLS FIRST", "answer": "What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type?\nAdditional table information: table: department_store"} -{"question": "SELECT MAX(product_price), MIN(product_price), product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code NULLS FIRST", "answer": "Give the maximum and minimum product prices for each product type, grouped and ordered by product type.\nAdditional table information: table: department_store"} -{"question": "SELECT order_id, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' ORDER BY order_date NULLS FIRST", "answer": "List the order id, customer id for orders in Cancelled status, ordered by their order dates.\nAdditional table information: table: department_store"} -{"question": "SELECT order_id, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' ORDER BY order_date NULLS FIRST", "answer": "What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates?\nAdditional table information: table: department_store"} -{"question": "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", "answer": "Find the names of products that were bought by at least two distinct customers.\nAdditional table information: table: department_store"} -{"question": "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", "answer": "What are the distinct names of products purchased by at least two different customers?\nAdditional table information: table: department_store"} -{"question": "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", "answer": "Find the names of customers who have bought by at least three distinct products.\nAdditional table information: table: department_store"} -{"question": "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", "answer": "What are the distinct names of customers who have purchased at least three different products?\nAdditional table information: table: department_store"} -{"question": "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'", "answer": "Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff.\nAdditional table information: table: department_store"} -{"question": "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'", "answer": "What are the names and genders of staff who have held the title Sales Person, but never Clerical Staff?\nAdditional table information: table: department_store"} -{"question": "SELECT customer_id, customer_name FROM customers WHERE customer_address LIKE '%WY%' AND payment_method_code <> 'Credit Card'", "answer": "Find the id and name of customers whose address contains WY state and do not use credit card for payment.\nAdditional table information: table: department_store"} -{"question": "SELECT customer_id, customer_name FROM customers WHERE customer_address LIKE '%WY%' AND payment_method_code <> 'Credit Card'", "answer": "What are the ids and names of customers with addressed that contain WY and who do not use a credit card for payment?\nAdditional table information: table: department_store"} -{"question": "SELECT AVG(product_price) FROM products WHERE product_type_code = 'Clothes'", "answer": "Find the average price of all product clothes.\nAdditional table information: table: department_store"} -{"question": "SELECT AVG(product_price) FROM products WHERE product_type_code = 'Clothes'", "answer": "What is the average price of clothes?\nAdditional table information: table: department_store"} -{"question": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1", "answer": "Find the name of the most expensive hardware product.\nAdditional table information: table: department_store"} -{"question": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1", "answer": "What is the name of the hardware product with the greatest price?\nAdditional table information: table: department_store"} -{"question": "SELECT COUNT(*) FROM aircraft", "answer": "How many aircrafts are there?\nAdditional table information: table: aircraft"} -{"question": "SELECT COUNT(*) FROM aircraft", "answer": "What is the number of aircraft?\nAdditional table information: table: aircraft"} -{"question": "SELECT Description FROM aircraft", "answer": "List the description of all aircrafts.\nAdditional table information: table: aircraft"} -{"question": "SELECT Description FROM aircraft", "answer": "What are the descriptions for the aircrafts?\nAdditional table information: table: aircraft"} -{"question": "SELECT AVG(International_Passengers) FROM airport", "answer": "What is the average number of international passengers of all airports?\nAdditional table information: table: aircraft"} -{"question": "SELECT AVG(International_Passengers) FROM airport", "answer": "What is the average number of international passengers for an airport?\nAdditional table information: table: aircraft"} -{"question": "SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = 'London Heathrow'", "answer": "What are the number of international and domestic passengers of the airport named London 'Heathrow'?\nAdditional table information: table: aircraft"} -{"question": "SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = 'London Heathrow'", "answer": "How many international and domestic passengers are there in the airport London Heathrow?\nAdditional table information: table: aircraft"} -{"question": "SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE '%London%'", "answer": "What are the total number of Domestic Passengers of airports that contain the word 'London'.\nAdditional table information: table: aircraft"} -{"question": "SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE '%London%'", "answer": "What are the total number of domestic passengers at all London airports?\nAdditional table information: table: aircraft"} -{"question": "SELECT MAX(Transit_Passengers), MIN(Transit_Passengers) FROM airport", "answer": "What are the maximum and minimum number of transit passengers of all aiports.\nAdditional table information: table: aircraft"} -{"question": "SELECT MAX(Transit_Passengers), MIN(Transit_Passengers) FROM airport", "answer": "What is the maximum and mininum number of transit passengers for all airports?\nAdditional table information: table: aircraft"} -{"question": "SELECT Name FROM pilot WHERE Age >= 25", "answer": "What are the name of pilots aged 25 or older?\nAdditional table information: table: aircraft"} -{"question": "SELECT Name FROM pilot WHERE Age >= 25", "answer": "what is the name of every pilot who is at least 25 years old?\nAdditional table information: table: aircraft"} -{"question": "SELECT Name FROM pilot ORDER BY Name ASC NULLS FIRST", "answer": "List all pilot names in ascending alphabetical order.\nAdditional table information: table: aircraft"} -{"question": "SELECT Name FROM pilot ORDER BY Name ASC NULLS FIRST", "answer": "What are the names of the pilots in alphabetical order?\nAdditional table information: table: aircraft"} -{"question": "SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC", "answer": "List names of all pilot aged 30 or younger in descending alphabetical order.\nAdditional table information: table: aircraft"} -{"question": "SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC", "answer": "What are the names of all pilots 30 years old or young in descending alphabetical order?\nAdditional table information: table: aircraft"} -{"question": "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'", "answer": "Please show the names of aircrafts associated with airport with name 'London Gatwick'.\nAdditional table information: table: aircraft"} -{"question": "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'", "answer": "What are the names of all the aircrafts associated with London Gatwick airport?\nAdditional table information: table: aircraft"} -{"question": "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", "answer": "Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.\nAdditional table information: table: aircraft"} -{"question": "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", "answer": "What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?\nAdditional table information: table: aircraft"} -{"question": "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'", "answer": "What is the average total number of passengers of airports that are associated with aircraft 'Robinson R-22'?\nAdditional table information: table: aircraft"} -{"question": "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'", "answer": "What is the average total number of passengers for all airports that the aircraft 'Robinson R-22' visits?\nAdditional table information: table: aircraft"} -{"question": "SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft", "answer": "Please list the location and the winning aircraft name.\nAdditional table information: table: aircraft"} -{"question": "SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft", "answer": "What is the location and name of the winning aircraft?\nAdditional table information: table: aircraft"} -{"question": "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", "answer": "List the name of the aircraft that has been named winning aircraft the most number of times.\nAdditional table information: table: aircraft"} -{"question": "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", "answer": "What is the name of the aircraft that has won an award the most?\nAdditional table information: table: aircraft"} -{"question": "SELECT T1.Aircraft, COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft", "answer": "List the names of aircrafts and the number of times it won matches.\nAdditional table information: table: aircraft"} -{"question": "SELECT T1.Aircraft, COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft", "answer": "For each aircraft that has won an award, what is its name and how many time has it won?\nAdditional table information: table: aircraft"} -{"question": "SELECT Name FROM pilot ORDER BY Age DESC", "answer": "List names of all pilot in descending order of age.\nAdditional table information: table: aircraft"} -{"question": "SELECT Name FROM pilot ORDER BY Age DESC", "answer": "What are the names of all pilots listed by descending age?\nAdditional table information: table: aircraft"} -{"question": "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", "answer": "List the names of aircrafts and that won matches at least twice.\nAdditional table information: table: aircraft"} -{"question": "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", "answer": "What are the names of all aircrafts that have won a match at least twice?\nAdditional table information: table: aircraft"} -{"question": "SELECT Aircraft FROM aircraft WHERE NOT Aircraft_ID IN (SELECT Winning_Aircraft FROM MATCH)", "answer": "List the names of aircrafts and that did not win any match.\nAdditional table information: table: aircraft"} -{"question": "SELECT Aircraft FROM aircraft WHERE NOT Aircraft_ID IN (SELECT Winning_Aircraft FROM MATCH)", "answer": "What are the names of all aicrafts that have never won any match?\nAdditional table information: table: aircraft"} -{"question": "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'", "answer": "Show the names of aircrafts that are associated with both an airport named 'London Heathrow' and an airport named 'London Gatwick'\nAdditional table information: table: aircraft"} -{"question": "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'", "answer": "What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports?\nAdditional table information: table: aircraft"} -{"question": "SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1", "answer": "Show all information on the airport that has the largest number of international passengers.\nAdditional table information: table: aircraft"} -{"question": "SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1", "answer": "What is all the information on the airport with the largest number of international passengers?\nAdditional table information: table: aircraft"} -{"question": "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", "answer": "find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.\nAdditional table information: table: aircraft"} -{"question": "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", "answer": "What is the name and age of the pilot younger than 30 who has won the most number of times?\nAdditional table information: table: aircraft"} -{"question": "SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age NULLS FIRST LIMIT 1", "answer": "what is the name and age of the youngest winning pilot?\nAdditional table information: table: aircraft"} -{"question": "SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age NULLS FIRST LIMIT 1", "answer": "How old is the youngest winning pilot and what is their name?\nAdditional table information: table: aircraft"} -{"question": "SELECT name FROM pilot WHERE NOT pilot_id IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')", "answer": "find the name of pilots who did not win the matches held in the country of Australia.\nAdditional table information: table: aircraft"} -{"question": "SELECT name FROM pilot WHERE NOT pilot_id IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')", "answer": "What are the names of the pilots that have not won any matches in Australia?\nAdditional table information: table: aircraft"} -{"question": "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", "answer": "How many residents does each property have? List property id and resident count.\nAdditional table information: table: local_govt_and_lot"} -{"question": "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'", "answer": "What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'?\nAdditional table information: table: local_govt_and_lot"} -{"question": "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", "answer": "How many services has each resident requested? List the resident id, details, and the count in descending order of the count.\nAdditional table information: table: local_govt_and_lot"} -{"question": "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", "answer": "What is the maximum number that a certain service is provided? List the service id, details and number.\nAdditional table information: table: local_govt_and_lot"} -{"question": "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", "answer": "List the id and type of each thing, and the details of the organization that owns it.\nAdditional table information: table: local_govt_and_lot"} -{"question": "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", "answer": "What are the id and details of the customers who have at least 3 events?\nAdditional table information: table: local_govt_and_lot"} -{"question": "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", "answer": "What is each customer's move in date, and the corresponding customer id and details?\nAdditional table information: table: local_govt_and_lot"} -{"question": "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", "answer": "Which events have the number of notes between one and three? List the event id and the property id.\nAdditional table information: table: local_govt_and_lot"} -{"question": "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'", "answer": "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'\nAdditional table information: table: local_govt_and_lot"} -{"question": "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'", "answer": "How many distinct locations have the things with service detail 'Unsatisfied' been located in?\nAdditional table information: table: local_govt_and_lot"} -{"question": "SELECT COUNT(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things", "answer": "How many different status codes of things are there?\nAdditional table information: table: local_govt_and_lot"} -{"question": "SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations", "answer": "Which organizations are not a parent organization of others? List the organization id.\nAdditional table information: table: local_govt_and_lot"} -{"question": "SELECT MAX(date_moved_in) FROM Residents", "answer": "When is the last day any resident moved in?\nAdditional table information: table: local_govt_and_lot"} -{"question": "SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'", "answer": "What are the resident details containing the substring 'Miss'?\nAdditional table information: table: local_govt_and_lot"} -{"question": "SELECT customer_event_id, date_moved_in, property_id FROM customer_events", "answer": "List the customer event id and the corresponding move in date and property id.\nAdditional table information: table: local_govt_and_lot"} -{"question": "SELECT COUNT(*) FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM customer_events)", "answer": "How many customers did not have any event?\nAdditional table information: table: local_govt_and_lot"} -{"question": "SELECT DISTINCT date_moved_in FROM residents", "answer": "What are the distinct move in dates of the residents?\nAdditional table information: table: local_govt_and_lot"} -{"question": "SELECT COUNT(*) FROM school", "answer": "How many schools are there?\nAdditional table information: table: school_player"} -{"question": "SELECT COUNT(*) FROM school", "answer": "Count the number of schools.\nAdditional table information: table: school_player"} -{"question": "SELECT LOCATION FROM school ORDER BY Enrollment ASC NULLS FIRST", "answer": "List the locations of schools in ascending order of enrollment.\nAdditional table information: table: school_player"} -{"question": "SELECT LOCATION FROM school ORDER BY Enrollment ASC NULLS FIRST", "answer": "What is the list of school locations sorted in ascending order of school enrollment?\nAdditional table information: table: school_player"} -{"question": "SELECT LOCATION FROM school ORDER BY Founded DESC", "answer": "List the locations of schools in descending order of founded year.\nAdditional table information: table: school_player"} -{"question": "SELECT LOCATION FROM school ORDER BY Founded DESC", "answer": "What is the list of school locations sorted in descending order of school foundation year?\nAdditional table information: table: school_player"} -{"question": "SELECT Enrollment FROM school WHERE Denomination <> 'Catholic'", "answer": "What are the enrollments of schools whose denomination is not 'Catholic'?\nAdditional table information: table: school_player"} -{"question": "SELECT Enrollment FROM school WHERE Denomination <> 'Catholic'", "answer": "List the enrollment for each school that does not have 'Catholic' as denomination.\nAdditional table information: table: school_player"} -{"question": "SELECT AVG(Enrollment) FROM school", "answer": "What is the average enrollment of schools?\nAdditional table information: table: school_player"} -{"question": "SELECT AVG(Enrollment) FROM school", "answer": "Take the average of the school enrollment.\nAdditional table information: table: school_player"} -{"question": "SELECT Team FROM player ORDER BY Team ASC NULLS FIRST", "answer": "What are the teams of the players, sorted in ascending alphabetical order?\nAdditional table information: table: school_player"} -{"question": "SELECT Team FROM player ORDER BY Team ASC NULLS FIRST", "answer": "Find the team of each player and sort them in ascending alphabetical order.\nAdditional table information: table: school_player"} -{"question": "SELECT COUNT(DISTINCT POSITION) FROM player", "answer": "How many different positions of players are there?\nAdditional table information: table: school_player"} -{"question": "SELECT COUNT(DISTINCT POSITION) FROM player", "answer": "Count the number of distinct player positions.\nAdditional table information: table: school_player"} -{"question": "SELECT Team FROM player ORDER BY Age DESC LIMIT 1", "answer": "Find the team of the player of the highest age.\nAdditional table information: table: school_player"} -{"question": "SELECT Team FROM player ORDER BY Age DESC LIMIT 1", "answer": "Which team has the oldest player?\nAdditional table information: table: school_player"} -{"question": "SELECT Team FROM player ORDER BY Age DESC LIMIT 5", "answer": "List the teams of the players with the top 5 largest ages.\nAdditional table information: table: school_player"} -{"question": "SELECT Team FROM player ORDER BY Age DESC LIMIT 5", "answer": "What are the teams that have the 5 oldest players?\nAdditional table information: table: school_player"} -{"question": "SELECT T1.Team, T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID", "answer": "For each player, show the team and the location of school they belong to.\nAdditional table information: table: school_player"} -{"question": "SELECT T1.Team, T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID", "answer": "What are the team and the location of school each player belongs to?\nAdditional table information: table: school_player"} -{"question": "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", "answer": "Show the locations of schools that have more than 1 player.\nAdditional table information: table: school_player"} -{"question": "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", "answer": "Which schools have more than 1 player? Give me the school locations.\nAdditional table information: table: school_player"} -{"question": "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", "answer": "Show the denomination of the school that has the most players.\nAdditional table information: table: school_player"} -{"question": "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", "answer": "What is the denomination of the school the most players belong to?\nAdditional table information: table: school_player"} -{"question": "SELECT T1.Location, T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID", "answer": "Show locations and nicknames of schools.\nAdditional table information: table: school_player"} -{"question": "SELECT T1.Location, T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID", "answer": "What are the location and nickname of each school?\nAdditional table information: table: school_player"} -{"question": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination", "answer": "Please show different denominations and the corresponding number of schools.\nAdditional table information: table: school_player"} -{"question": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination", "answer": "For each denomination, return the denomination and the count of schools with that denomination.\nAdditional table information: table: school_player"} -{"question": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC", "answer": "Please show different denominations and the corresponding number of schools in descending order.\nAdditional table information: table: school_player"} -{"question": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC", "answer": "Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.\nAdditional table information: table: school_player"} -{"question": "SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1", "answer": "List the school color of the school that has the largest enrollment.\nAdditional table information: table: school_player"} -{"question": "SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1", "answer": "What is the school color of the school with the largest enrollment?\nAdditional table information: table: school_player"} -{"question": "SELECT LOCATION FROM school WHERE NOT School_ID IN (SELECT School_ID FROM Player)", "answer": "List the locations of schools that do not have any player.\nAdditional table information: table: school_player"} -{"question": "SELECT LOCATION FROM school WHERE NOT School_ID IN (SELECT School_ID FROM Player)", "answer": "Which schools do not have any player? Give me the school locations.\nAdditional table information: table: school_player"} -{"question": "SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900", "answer": "Show the denomination shared by schools founded before 1890 and schools founded after 1900\nAdditional table information: table: school_player"} -{"question": "SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900", "answer": "What are the denominations used by both schools founded before 1890 and schools founded after 1900?\nAdditional table information: table: school_player"} -{"question": "SELECT Nickname FROM school_details WHERE Division <> 'Division 1'", "answer": "Show the nicknames of schools that are not in division 1.\nAdditional table information: table: school_player"} -{"question": "SELECT Nickname FROM school_details WHERE Division <> 'Division 1'", "answer": "What are the nicknames of schools whose division is not 1?\nAdditional table information: table: school_player"} -{"question": "SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1", "answer": "Show the denomination shared by more than one school.\nAdditional table information: table: school_player"} -{"question": "SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1", "answer": "What are the denomination more than one school have?\nAdditional table information: table: school_player"} -{"question": "SELECT DISTINCT District_name FROM district ORDER BY city_area DESC", "answer": "Find all the distinct district names ordered by city area in descending.\nAdditional table information: table: store_product"} -{"question": "SELECT DISTINCT District_name FROM district ORDER BY city_area DESC", "answer": "What are the different district names in order of descending city area?\nAdditional table information: table: store_product"} -{"question": "SELECT max_page_size FROM product GROUP BY max_page_size HAVING COUNT(*) > 3", "answer": "Find the list of page size which have more than 3 product listed\nAdditional table information: table: store_product"} -{"question": "SELECT max_page_size FROM product GROUP BY max_page_size HAVING COUNT(*) > 3", "answer": "What is the maximum page size for everything that has more than 3 products listed?\nAdditional table information: table: store_product"} -{"question": "SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000", "answer": "Find the name and population of district with population between 200000 and 2000000\nAdditional table information: table: store_product"} -{"question": "SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000", "answer": "What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?\nAdditional table information: table: store_product"} -{"question": "SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000", "answer": "Find the name all districts with city area greater than 10 or population larger than 100000\nAdditional table information: table: store_product"} -{"question": "SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000", "answer": "What are the names of all districts with a city area greater than 10 or have more than 100000 people living there?\nAdditional table information: table: store_product"} -{"question": "SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1", "answer": "Which district has the largest population?\nAdditional table information: table: store_product"} -{"question": "SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1", "answer": "What is the name of the district with the most residents?\nAdditional table information: table: store_product"} -{"question": "SELECT district_name FROM district ORDER BY city_area ASC NULLS FIRST LIMIT 1", "answer": "Which district has the least area?\nAdditional table information: table: store_product"} -{"question": "SELECT district_name FROM district ORDER BY city_area ASC NULLS FIRST LIMIT 1", "answer": "What is the name of the district with the smallest area?\nAdditional table information: table: store_product"} -{"question": "SELECT SUM(city_population) FROM district ORDER BY city_area DESC LIMIT 3", "answer": "Find the total population of the top 3 districts with the largest area.\nAdditional table information: table: store_product"} -{"question": "SELECT SUM(city_population) FROM district ORDER BY city_area DESC LIMIT 3", "answer": "What is the total number of residents for the districts with the 3 largest areas?\nAdditional table information: table: store_product"} -{"question": "SELECT TYPE, COUNT(*) FROM store GROUP BY TYPE", "answer": "Find all types of store and number of them.\nAdditional table information: table: store_product"} -{"question": "SELECT TYPE, COUNT(*) FROM store GROUP BY TYPE", "answer": "For each type of store, how many of them are there?\nAdditional table information: table: store_product"} -{"question": "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'", "answer": "Find the names of all stores in Khanewal District.\nAdditional table information: table: store_product"} -{"question": "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'", "answer": "What are the names of all the stores located in Khanewal District?\nAdditional table information: table: store_product"} -{"question": "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)", "answer": "Find all the stores in the district with the most population.\nAdditional table information: table: store_product"} -{"question": "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)", "answer": "What are the names of all the stores in the largest district by population?\nAdditional table information: table: store_product"} -{"question": "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'", "answer": "Which city is the headquarter of the store named 'Blackville' in?\nAdditional table information: table: store_product"} -{"question": "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'", "answer": "What city is the headquarter of the store Blackville?\nAdditional table information: table: store_product"} -{"question": "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", "answer": "Find the number of stores in each city.\nAdditional table information: table: store_product"} -{"question": "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", "answer": "How many stores are headquarted in each city?\nAdditional table information: table: store_product"} -{"question": "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", "answer": "Find the city with the most number of stores.\nAdditional table information: table: store_product"} -{"question": "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", "answer": "What is the city with the most number of flagship stores?\nAdditional table information: table: store_product"} -{"question": "SELECT AVG(pages_per_minute_color) FROM product", "answer": "What is the average pages per minute color?\nAdditional table information: table: store_product"} -{"question": "SELECT AVG(pages_per_minute_color) FROM product", "answer": "What is the average number of pages per minute color?\nAdditional table information: table: store_product"} -{"question": "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'", "answer": "What products are available at store named 'Miramichi'?\nAdditional table information: table: store_product"} -{"question": "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'", "answer": "What products are sold at the store named Miramichi?\nAdditional table information: table: store_product"} -{"question": "SELECT product FROM product WHERE max_page_size = 'A4' AND pages_per_minute_color < 5", "answer": "Find products with max page size as 'A4' and pages per minute color smaller than 5.\nAdditional table information: table: store_product"} -{"question": "SELECT product FROM product WHERE max_page_size = 'A4' AND pages_per_minute_color < 5", "answer": "What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5?\nAdditional table information: table: store_product"} -{"question": "SELECT product FROM product WHERE max_page_size = 'A4' OR pages_per_minute_color < 5", "answer": "Find products with max page size as 'A4' or pages per minute color smaller than 5.\nAdditional table information: table: store_product"} -{"question": "SELECT product FROM product WHERE max_page_size = 'A4' OR pages_per_minute_color < 5", "answer": "What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5?\nAdditional table information: table: store_product"} -{"question": "SELECT product FROM product WHERE product LIKE '%Scanner%'", "answer": "Find all the product whose name contains the word 'Scanner'.\nAdditional table information: table: store_product"} -{"question": "SELECT product FROM product WHERE product LIKE '%Scanner%'", "answer": "What are all of the products whose name includes the substring 'Scanner'?\nAdditional table information: table: store_product"} -{"question": "SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the most prominent max page size among all the products.\nAdditional table information: table: store_product"} -{"question": "SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common maximum page size?\nAdditional table information: table: store_product"} -{"question": "SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "Find the name of the products that are not using the most frequently-used max page size.\nAdditional table information: table: store_product"} -{"question": "SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "What are the names of all products that are not the most frequently-used maximum page size?\nAdditional table information: table: store_product"} -{"question": "SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district)", "answer": "Find the total population of the districts where the area is bigger than the average city area.\nAdditional table information: table: store_product"} -{"question": "SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district)", "answer": "What is the total population for all the districts that have an area larger tahn the average city area?\nAdditional table information: table: store_product"} -{"question": "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'", "answer": "Find the names of districts where have both city mall and village store type stores.\nAdditional table information: table: store_product"} -{"question": "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'", "answer": "What are the names of the districts that have both mall and village store style shops?\nAdditional table information: table: store_product"} -{"question": "SELECT SUM(enr) FROM College", "answer": "What is the total enrollment number of all colleges?\nAdditional table information: table: soccer_2"} -{"question": "SELECT SUM(enr) FROM College", "answer": "How many students are enrolled in college?\nAdditional table information: table: soccer_2"} -{"question": "SELECT AVG(enr) FROM College", "answer": "What is the average enrollment number?\nAdditional table information: table: soccer_2"} -{"question": "SELECT AVG(enr) FROM College", "answer": "How many students, on average, does each college have enrolled?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*) FROM College", "answer": "How many colleges in total?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*) FROM College", "answer": "How many different colleges are there?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*) FROM Player WHERE HS > 1000", "answer": "How many players have more than 1000 hours of training?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*) FROM Player WHERE HS > 1000", "answer": "How many different players trained for more than 1000 hours?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*) FROM College WHERE enr > 15000", "answer": "How many colleges has more than 15000 students?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*) FROM College WHERE enr > 15000", "answer": "What is the number of colleges with a student population greater than 15000?\nAdditional table information: table: soccer_2"} -{"question": "SELECT AVG(HS) FROM Player", "answer": "What is the average training hours of all players?\nAdditional table information: table: soccer_2"} -{"question": "SELECT AVG(HS) FROM Player", "answer": "How many hours do the players train on average?\nAdditional table information: table: soccer_2"} -{"question": "SELECT pName, HS FROM Player WHERE HS < 1500", "answer": "Find the name and training hours of players whose hours are below 1500.\nAdditional table information: table: soccer_2"} -{"question": "SELECT pName, HS FROM Player WHERE HS < 1500", "answer": "What are the names and number of hours spent training for each player who trains for less than 1500 hours?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(DISTINCT cName) FROM tryout", "answer": "How many different colleges do attend the tryout test?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(DISTINCT cName) FROM tryout", "answer": "How many different colleges were represented at tryouts?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(DISTINCT pPos) FROM tryout", "answer": "What are the unique types of player positions in the tryout?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(DISTINCT pPos) FROM tryout", "answer": "What are the different types of player positions?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*) FROM tryout WHERE decision = 'yes'", "answer": "How many students got accepted after the tryout?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*) FROM tryout WHERE decision = 'yes'", "answer": "How many students received a yes from tryouts?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*) FROM tryout WHERE pPos = 'goalie'", "answer": "How many students whose are playing the role of goalie?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*) FROM tryout WHERE pPos = 'goalie'", "answer": "What is the number of students playing as a goalie?\nAdditional table information: table: soccer_2"} -{"question": "SELECT AVG(HS), MAX(HS), MIN(HS) FROM Player", "answer": "Find the max, average and min training hours of all players.\nAdditional table information: table: soccer_2"} -{"question": "SELECT AVG(HS), MAX(HS), MIN(HS) FROM Player", "answer": "What is the average, maximum, and minimum for the number of hours spent training?\nAdditional table information: table: soccer_2"} -{"question": "SELECT AVG(enr) FROM College WHERE state = 'FL'", "answer": "What is average enrollment of colleges in the state FL?\nAdditional table information: table: soccer_2"} -{"question": "SELECT AVG(enr) FROM College WHERE state = 'FL'", "answer": "What is average number of students enrolled in Florida colleges?\nAdditional table information: table: soccer_2"} -{"question": "SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500", "answer": "What are the names of players whose training hours is between 500 and 1500?\nAdditional table information: table: soccer_2"} -{"question": "SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500", "answer": "What are the names of players who train between 500 and 1500 hours?\nAdditional table information: table: soccer_2"} -{"question": "SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'", "answer": "Find the players whose names contain letter 'a'.\nAdditional table information: table: soccer_2"} -{"question": "SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'", "answer": "Who are the players that have names containing the letter a?\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName, enr FROM College WHERE enr > 10000 AND state = 'LA'", "answer": "Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName, enr FROM College WHERE enr > 10000 AND state = 'LA'", "answer": "What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana?\nAdditional table information: table: soccer_2"} -{"question": "SELECT * FROM College ORDER BY enr NULLS FIRST", "answer": "List all information about college sorted by enrollment number in the ascending order.\nAdditional table information: table: soccer_2"} -{"question": "SELECT * FROM College ORDER BY enr NULLS FIRST", "answer": "What information do you have on colleges sorted by increasing enrollment numbers?\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName FROM College WHERE enr > 18000 ORDER BY cName NULLS FIRST", "answer": "List the name of the colleges whose enrollment is greater 18000 sorted by the college's name.\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName FROM College WHERE enr > 18000 ORDER BY cName NULLS FIRST", "answer": "What is the name of every college in alphabetical order that has more than 18000 students enrolled?\nAdditional table information: table: soccer_2"} -{"question": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC", "answer": "Find the name of players whose card is yes in the descending order of training hours.\nAdditional table information: table: soccer_2"} -{"question": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC", "answer": "What are the name of the players who received a card in descending order of the hours of training?\nAdditional table information: table: soccer_2"} -{"question": "SELECT DISTINCT cName FROM tryout ORDER BY cName NULLS FIRST", "answer": "Find the name of different colleges involved in the tryout in alphabetical order.\nAdditional table information: table: soccer_2"} -{"question": "SELECT DISTINCT cName FROM tryout ORDER BY cName NULLS FIRST", "answer": "What are the different names of the colleges involved in the tryout in alphabetical order?\nAdditional table information: table: soccer_2"} -{"question": "SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which position is most popular among players in the tryout?\nAdditional table information: table: soccer_2"} -{"question": "SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What was the most popular position at tryouts?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*), cName FROM tryout GROUP BY cName ORDER BY COUNT(*) DESC", "answer": "Find the number of students who participate in the tryout for each college ordered by descending count.\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*), cName FROM tryout GROUP BY cName ORDER BY COUNT(*) DESC", "answer": "How many students participated in tryouts for each college by descennding count?\nAdditional table information: table: soccer_2"} -{"question": "SELECT MIN(T2.HS), T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos", "answer": "What is minimum hours of the students playing in different position?\nAdditional table information: table: soccer_2"} -{"question": "SELECT MIN(T2.HS), T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos", "answer": "For each position, what is the minimum time students spent practicing?\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName FROM college ORDER BY enr DESC LIMIT 3", "answer": "What are the names of schools with the top 3 largest size?\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName FROM college ORDER BY enr DESC LIMIT 3", "answer": "What are the names of the schools with the top 3 largest class sizes?\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName, state, MIN(enr) FROM college GROUP BY state", "answer": "What is the name of school that has the smallest enrollment in each state?\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName, state, MIN(enr) FROM college GROUP BY state", "answer": "What is the name of the school with smallest enrollment size per state?\nAdditional table information: table: soccer_2"} -{"question": "SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName", "answer": "Find the states where have some college students in tryout.\nAdditional table information: table: soccer_2"} -{"question": "SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName", "answer": "What are the different states that have students trying out?\nAdditional table information: table: soccer_2"} -{"question": "SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'", "answer": "Find the states where have some college students in tryout and their decisions are yes.\nAdditional table information: table: soccer_2"} -{"question": "SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'", "answer": "What are the different states that had students successfully try out?\nAdditional table information: table: soccer_2"} -{"question": "SELECT T1.pName, T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "answer": "Find the name and college of students whose decisions are yes in the tryout.\nAdditional table information: table: soccer_2"} -{"question": "SELECT T1.pName, T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "answer": "What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges?\nAdditional table information: table: soccer_2"} -{"question": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName NULLS FIRST", "answer": "Find the name of all students who were in the tryout sorted in alphabetic order.\nAdditional table information: table: soccer_2"} -{"question": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName NULLS FIRST", "answer": "What are the names of all students who tried out in alphabetical order?\nAdditional table information: table: soccer_2"} -{"question": "SELECT T1.pName, T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "answer": "Find the name and hours of the students whose tryout decision is yes.\nAdditional table information: table: soccer_2"} -{"question": "SELECT T1.pName, T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "answer": "What are the names and hours spent practicing of every student who received a yes at tryouts?\nAdditional table information: table: soccer_2"} -{"question": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'", "answer": "Find the states of the colleges that have students in the tryout who played in striker position.\nAdditional table information: table: soccer_2"} -{"question": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'", "answer": "What are the states of the colleges where students who tried out for the striker position attend?\nAdditional table information: table: soccer_2"} -{"question": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'", "answer": "Find the names of the students who are in the position of striker and got a yes tryout decision.\nAdditional table information: table: soccer_2"} -{"question": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'", "answer": "What are the names of all students who successfully tried out for the position of striker?\nAdditional table information: table: soccer_2"} -{"question": "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'", "answer": "Find the state of the college which player Charles is attending.\nAdditional table information: table: soccer_2"} -{"question": "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'", "answer": "In which state is the college that Charles attends?\nAdditional table information: table: soccer_2"} -{"question": "SELECT AVG(T1.HS), MAX(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "answer": "Find the average and maximum hours for the students whose tryout decision is yes.\nAdditional table information: table: soccer_2"} -{"question": "SELECT AVG(T1.HS), MAX(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "answer": "What is the average and maximum number of hours students who made the team practiced?\nAdditional table information: table: soccer_2"} -{"question": "SELECT AVG(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'", "answer": "Find the average hours for the students whose tryout decision is no.\nAdditional table information: table: soccer_2"} -{"question": "SELECT AVG(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'", "answer": "What is the average number of hours spent practicing for students who got rejected?\nAdditional table information: table: soccer_2"} -{"question": "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", "answer": "What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?\nAdditional table information: table: soccer_2"} -{"question": "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", "answer": "For each position, what is the maximum number of hours for students who spent more than 1000 hours training?\nAdditional table information: table: soccer_2"} -{"question": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'", "answer": "Which colleges do the tryout players whose name starts with letter D go to?\nAdditional table information: table: soccer_2"} -{"question": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'", "answer": "Which colleges does each player with a name that starts with the letter D who tried out go to?\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'", "answer": "Which college has any student who is a goalie and succeeded in the tryout.\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'", "answer": "What college has a student who successfully made the team in the role of a goalie?\nAdditional table information: table: soccer_2"} -{"question": "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)", "answer": "Find the name of the tryout players who are from the college with largest size.\nAdditional table information: table: soccer_2"} -{"question": "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)", "answer": "What are the names of all tryout participants who are from the largest college?\nAdditional table information: table: soccer_2"} -{"question": "SELECT DISTINCT T1.state, T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'", "answer": "What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision.\nAdditional table information: table: soccer_2"} -{"question": "SELECT DISTINCT T1.state, T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'", "answer": "How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges?\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName FROM College WHERE enr < 13000 AND state = 'AZ' UNION SELECT cName FROM College WHERE enr > 15000 AND state = 'LA'", "answer": "Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName FROM College WHERE enr < 13000 AND state = 'AZ' UNION SELECT cName FROM College WHERE enr > 15000 AND state = 'LA'", "answer": "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?\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'", "answer": "Find the names of schools that have some students playing in goalie and mid positions.\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'", "answer": "What are the names of all schools that have students trying out for the position of goal and 'mid'-field.\nAdditional table information: table: soccer_2"} -{"question": "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'", "answer": "Find the names of states that have some college students playing in goalie and mid positions.\nAdditional table information: table: soccer_2"} -{"question": "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'", "answer": "What are the names of the states that have some college students playing in the positions of goalie and mid-field?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')", "answer": "How many schools have some students playing in goalie and mid positions.\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')", "answer": "How many schools have students playing in goalie and mid-field positions?\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'", "answer": "Find the names of schools that have some players in the mid position but not in the goalie position.\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'", "answer": "What are the names of the schools with some players in the mid position but no goalies?\nAdditional table information: table: soccer_2"} -{"question": "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'", "answer": "Find the names of states that have some college students playing in the mid position but not in the goalie position.\nAdditional table information: table: soccer_2"} -{"question": "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'", "answer": "What are the names of all the states with college students playing in the mid position but no goalies?\nAdditional table information: table: soccer_2"} -{"question": "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')", "answer": "How many states that have some college students playing in the mid position but not in the goalie position.\nAdditional table information: table: soccer_2"} -{"question": "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')", "answer": "What is the count of states with college students playing in the mid position but not as goalies?\nAdditional table information: table: soccer_2"} -{"question": "SELECT DISTINCT state FROM college WHERE enr < (SELECT MAX(enr) FROM college)", "answer": "Find the states where have the colleges whose enrollments are less than the largest size.\nAdditional table information: table: soccer_2"} -{"question": "SELECT DISTINCT state FROM college WHERE enr < (SELECT MAX(enr) FROM college)", "answer": "What are the states with colleges that have enrollments less than the some other college?\nAdditional table information: table: soccer_2"} -{"question": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT MIN(enr) FROM college WHERE state = 'FL')", "answer": "Find names of colleges with enrollment greater than that of some (at least one) college in the FL state.\nAdditional table information: table: soccer_2"} -{"question": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT MIN(enr) FROM college WHERE state = 'FL')", "answer": "What are the names of the colleges that are larger than at least one college in Florida?\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName FROM college WHERE enr > (SELECT MAX(enr) FROM college WHERE state = 'FL')", "answer": "Find names of all colleges whose enrollment is greater than that of all colleges in the FL state.\nAdditional table information: table: soccer_2"} -{"question": "SELECT cName FROM college WHERE enr > (SELECT MAX(enr) FROM college WHERE state = 'FL')", "answer": "What are the names of all colleges with a larger enrollment than the largest college in Florida?\nAdditional table information: table: soccer_2"} -{"question": "SELECT SUM(enr) FROM college WHERE NOT cName IN (SELECT cName FROM tryout WHERE pPos = 'goalie')", "answer": "What is the total number of enrollment of schools that do not have any goalie player?\nAdditional table information: table: soccer_2"} -{"question": "SELECT SUM(enr) FROM college WHERE NOT cName IN (SELECT cName FROM tryout WHERE pPos = 'goalie')", "answer": "What is the total number of students enrolled in schools without any goalies?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(DISTINCT state) FROM college WHERE enr > (SELECT AVG(enr) FROM college)", "answer": "What is the number of states that has some college whose enrollment is larger than the average enrollment?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(DISTINCT state) FROM college WHERE enr > (SELECT AVG(enr) FROM college)", "answer": "How many states have a college with more students than average?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(DISTINCT state) FROM college WHERE enr < (SELECT AVG(enr) FROM college)", "answer": "What is the number of states that has some colleges whose enrollment is smaller than the average enrollment?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(DISTINCT state) FROM college WHERE enr < (SELECT AVG(enr) FROM college)", "answer": "How many states have smaller colleges than average?\nAdditional table information: table: soccer_2"} -{"question": "SELECT COUNT(*) FROM device", "answer": "How many devices are there?\nAdditional table information: table: device"} -{"question": "SELECT COUNT(*) FROM device", "answer": "Count the number of devices.\nAdditional table information: table: device"} -{"question": "SELECT Carrier FROM device ORDER BY Carrier ASC NULLS FIRST", "answer": "List the carriers of devices in ascending alphabetical order.\nAdditional table information: table: device"} -{"question": "SELECT Carrier FROM device ORDER BY Carrier ASC NULLS FIRST", "answer": "What are the different carriers for devices, listed in alphabetical order?\nAdditional table information: table: device"} -{"question": "SELECT Carrier FROM device WHERE Software_Platform <> 'Android'", "answer": "What are the carriers of devices whose software platforms are not 'Android'?\nAdditional table information: table: device"} -{"question": "SELECT Carrier FROM device WHERE Software_Platform <> 'Android'", "answer": "Return the device carriers that do not have Android as their software platform.\nAdditional table information: table: device"} -{"question": "SELECT Shop_Name FROM shop ORDER BY Open_Year ASC NULLS FIRST", "answer": "What are the names of shops in ascending order of open year?\nAdditional table information: table: device"} -{"question": "SELECT Shop_Name FROM shop ORDER BY Open_Year ASC NULLS FIRST", "answer": "Return the names of shops, ordered by year of opening ascending.\nAdditional table information: table: device"} -{"question": "SELECT AVG(Quantity) FROM stock", "answer": "What is the average quantity of stocks?\nAdditional table information: table: device"} -{"question": "SELECT AVG(Quantity) FROM stock", "answer": "Give the average quantity of stocks.\nAdditional table information: table: device"} -{"question": "SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name ASC NULLS FIRST", "answer": "What are the names and location of the shops in ascending alphabetical order of name.\nAdditional table information: table: device"} -{"question": "SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name ASC NULLS FIRST", "answer": "Return the names and locations of shops, ordered by name in alphabetical order.\nAdditional table information: table: device"} -{"question": "SELECT COUNT(DISTINCT Software_Platform) FROM device", "answer": "How many different software platforms are there for devices?\nAdditional table information: table: device"} -{"question": "SELECT COUNT(DISTINCT Software_Platform) FROM device", "answer": "Count the number of different software platforms.\nAdditional table information: table: device"} -{"question": "SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = 'Apple'", "answer": "List the open date of open year of the shop named 'Apple'.\nAdditional table information: table: device"} -{"question": "SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = 'Apple'", "answer": "What are the open dates and years for the shop named Apple?\nAdditional table information: table: device"} -{"question": "SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1", "answer": "List the name of the shop with the latest open year.\nAdditional table information: table: device"} -{"question": "SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1", "answer": "What is the shop name corresponding to the shop that opened in the most recent year?\nAdditional table information: table: device"} -{"question": "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", "answer": "Show names of shops and the carriers of devices they have in stock.\nAdditional table information: table: device"} -{"question": "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", "answer": "What are the names of device shops, and what are the carriers that they carry devices in stock for?\nAdditional table information: table: device"} -{"question": "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", "answer": "Show names of shops that have more than one kind of device in stock.\nAdditional table information: table: device"} -{"question": "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", "answer": "What are the names of shops that have more than a single kind of device in stock?\nAdditional table information: table: device"} -{"question": "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", "answer": "Show the name of the shop that has the most kind of devices in stock.\nAdditional table information: table: device"} -{"question": "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", "answer": "What is the name of the shop that has the most different kinds of devices in stock?\nAdditional table information: table: device"} -{"question": "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", "answer": "Show the name of the shop that have the largest quantity of devices in stock.\nAdditional table information: table: device"} -{"question": "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", "answer": "What is the name of the shop that has the greatest quantity of devices in stock?\nAdditional table information: table: device"} -{"question": "SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform", "answer": "Please show different software platforms and the corresponding number of devices using each.\nAdditional table information: table: device"} -{"question": "SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform", "answer": "What are the different software platforms for devices, and how many devices have each?\nAdditional table information: table: device"} -{"question": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC", "answer": "Please show the software platforms of devices in descending order of the count.\nAdditional table information: table: device"} -{"question": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC", "answer": "What are the different software platforms for devices, ordered by frequency descending?\nAdditional table information: table: device"} -{"question": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the software platform shared by the greatest number of devices.\nAdditional table information: table: device"} -{"question": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the software platform that is most common amongst all devices?\nAdditional table information: table: device"} -{"question": "SELECT Shop_Name FROM shop WHERE NOT Shop_ID IN (SELECT Shop_ID FROM stock)", "answer": "List the names of shops that have no devices in stock.\nAdditional table information: table: device"} -{"question": "SELECT Shop_Name FROM shop WHERE NOT Shop_ID IN (SELECT Shop_ID FROM stock)", "answer": "What are the names of shops that do not have any devices in stock?\nAdditional table information: table: device"} -{"question": "SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008", "answer": "Show the locations shared by shops with open year later than 2012 and shops with open year before 2008.\nAdditional table information: table: device"} -{"question": "SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008", "answer": "Which locations contains both shops that opened after the year 2012 and shops that opened before 2008?\nAdditional table information: table: device"} -{"question": "SELECT Carrier FROM device WHERE NOT Device_ID IN (SELECT Device_ID FROM stock)", "answer": "List the carriers of devices that have no devices in stock.\nAdditional table information: table: device"} -{"question": "SELECT Carrier FROM device WHERE NOT Device_ID IN (SELECT Device_ID FROM stock)", "answer": "What are the carriers of devices that are not in stock anywhere?\nAdditional table information: table: device"} -{"question": "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", "answer": "Show the carriers of devices in stock at more than one shop.\nAdditional table information: table: device"} -{"question": "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", "answer": "What are the carriers of devices that are in stock in more than a single shop?\nAdditional table information: table: device"} -{"question": "SELECT COUNT(*) FROM BOOKINGS", "answer": "How many bookings do we have?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT COUNT(*) FROM BOOKINGS", "answer": "Count the total number of bookings made.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Order_Date FROM BOOKINGS", "answer": "List the order dates of all the bookings.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Order_Date FROM BOOKINGS", "answer": "What is the order date of each booking?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Planned_Delivery_Date, Actual_Delivery_Date FROM BOOKINGS", "answer": "Show all the planned delivery dates and actual delivery dates of bookings.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Planned_Delivery_Date, Actual_Delivery_Date FROM BOOKINGS", "answer": "What are the planned delivery date and actual delivery date for each booking?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT COUNT(*) FROM CUSTOMERS", "answer": "How many customers do we have?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT COUNT(*) FROM CUSTOMERS", "answer": "Count the number of customers recorded.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Customer_Phone, Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = 'Harold'", "answer": "What are the phone and email for customer Harold?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Customer_Phone, Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = 'Harold'", "answer": "Find the phone number and email address of customer 'Harold'.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Store_Name FROM Drama_Workshop_Groups", "answer": "Show all the Store_Name of drama workshop groups.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Store_Name FROM Drama_Workshop_Groups", "answer": "What are the store names of drama workshop groups?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT MIN(Order_Quantity), AVG(Order_Quantity), MAX(Order_Quantity) FROM INVOICES", "answer": "Show the minimum, average, maximum order quantity of all invoices.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT MIN(Order_Quantity), AVG(Order_Quantity), MAX(Order_Quantity) FROM INVOICES", "answer": "What are the minimum, average, and maximum quantities ordered? Check all the invoices.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT DISTINCT payment_method_code FROM INVOICES", "answer": "What are the distinct payment method codes in all the invoices?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT DISTINCT payment_method_code FROM INVOICES", "answer": "Show me the distinct payment method codes from the invoice record.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = 'China'", "answer": "What is the description of the marketing region China?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = 'China'", "answer": "Find the marketing region description of China?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT AVG(Product_Price) FROM PRODUCTS)", "answer": "Show all the distinct product names with price higher than the average.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT AVG(Product_Price) FROM PRODUCTS)", "answer": "What are the distinct names of the products that cost more than the average?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1", "answer": "What is the name of the most expensive product?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1", "answer": "Tell me the name of the most pricy product.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC NULLS FIRST", "answer": "List all product names in ascending order of price.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC NULLS FIRST", "answer": "Sort the names of products in ascending order of their price.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = 'Ashley'", "answer": "What is the phone number of the performer Ashley?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = 'Ashley'", "answer": "Find the phone number of performer 'Ashley'.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code", "answer": "Show all payment method codes and the number of orders for each code.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code", "answer": "List the distinct payment method codes with the number of orders made\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the payment method code used by the most orders?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the payment method that is used the most often in all the invoices. Give me its code.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "Which city is the address of the store named 'FJA Filming' located in?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "Find the city the store named 'FJA Filming' is in.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "What are the states or counties of the address of the stores with marketing region code 'CA'?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "Find the states or counties where the stores with marketing region code 'CA' are located.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "What is the name of the marketing region that the store Rob Dinning belongs to?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "Return the name of the marketing region the store Rob Dinning is located in.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "What are the descriptions of the service types with product price above 100?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "Give me the descriptions of the service types that cost more than 100.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "What is the description, code and the corresponding count of each service type?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "List the description, code and the number of services for each service type.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "What is the description and code of the type of service that is performed the most often?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "Find the description and code of the service type that is performed the most times.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "What are the phones and emails of workshop groups in which services are performed?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "Give me all the phone numbers and email addresses of the workshop groups where services are performed.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "What are the names of workshop groups in which services with product name 'film' are performed?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "Find the names of the workshop groups where services with product name 'film' are performed.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Product_Name, AVG(Product_Price) FROM PRODUCTS GROUP BY Product_Name", "answer": "What are the different product names? What is the average product price for each of them?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Product_Name, AVG(Product_Price) FROM PRODUCTS GROUP BY Product_Name", "answer": "For each distinct product name, show its average product price.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING AVG(Product_Price) < 1000000", "answer": "What are the product names with average product price smaller than 1000000?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING AVG(Product_Price) < 1000000", "answer": "Find the product names whose average product price is below 1000000.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "What are the total order quantities of photo products?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "Compute the total order quantities of the product 'photo'.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "What are the order details of the products with price higher than 2000?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "Find the order detail for the products with price above 2000.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "What are the actual delivery dates of orders with quantity 1?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "List the actual delivery date for all the orders with quantity 1\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "What are the order dates of orders with price higher than 1000?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "Find the order dates of the orders with price above 1000.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT COUNT(DISTINCT Currency_Code) FROM Drama_Workshop_Groups", "answer": "How many distinct currency codes are there for all drama workshop groups?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT COUNT(DISTINCT Currency_Code) FROM Drama_Workshop_Groups", "answer": "Find the number of distinct currency codes used in drama workshop groups.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "What are the names of the drama workshop groups with address in Feliciaberg city?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "Return the the names of the drama workshop groups that are located in Feliciaberg city.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "What are the email addresses of the drama workshop groups with address in Alaska state?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "List the email addresses of the drama workshop groups located in Alaska state.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "Show all cities along with the number of drama workshop groups in each city.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "How many drama workshop groups are there in each city? Return both the city and the count.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the marketing region code that has the most drama workshop groups?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which marketing region has the most drama workshop groups? Give me the region code.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "Show all cities where at least one customer lives in but no performer lives in.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "Which cities have at least one customer but no performer?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most frequent status of bookings?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which status code is the most common of all the bookings?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "What are the names of the workshop groups that have bookings with status code 'stop'?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "Which workshop groups have bookings with status code 'stop'? Give me the names.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "Show the names of all the clients with no booking.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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", "answer": "What are the names of the clients who do not have any booking?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT AVG(Order_Quantity) FROM Invoices WHERE payment_method_code = 'MasterCard'", "answer": "What is the average quantities ordered with payment method code 'MasterCard' on invoices?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT AVG(Order_Quantity) FROM Invoices WHERE payment_method_code = 'MasterCard'", "answer": "Check the invoices record and compute the average quantities ordered with the payment method 'MasterCard'.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the product ID of the most frequently ordered item on invoices?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the id of the product ordered the most often on invoices.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "What is the description of the service type which offers both the photo product and the film product?\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "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'", "answer": "Give me the description of the service type that offers not only the photo product but also the film product.\nAdditional table information: table: cre_Drama_Workshop_Groups"} -{"question": "SELECT COUNT(*) FROM Band", "answer": "How many bands are there?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(*) FROM Band", "answer": "Find the number of bands.\nAdditional table information: table: music_2"} -{"question": "SELECT DISTINCT label FROM Albums", "answer": "What are all the labels?\nAdditional table information: table: music_2"} -{"question": "SELECT DISTINCT label FROM Albums", "answer": "What are the different album labels listed?\nAdditional table information: table: music_2"} -{"question": "SELECT * FROM Albums WHERE YEAR = 2012", "answer": "Find all the albums in 2012.\nAdditional table information: table: music_2"} -{"question": "SELECT * FROM Albums WHERE YEAR = 2012", "answer": "return all columns of the albums created in the year of 2012.\nAdditional table information: table: music_2"} -{"question": "SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = 'Solveig'", "answer": "Find all the stage positions of the musicians with first name 'Solveig'\nAdditional table information: table: music_2"} -{"question": "SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = 'Solveig'", "answer": "What are the different stage positions for all musicians whose first name is 'Solveig'?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(*) FROM Songs", "answer": "How many songs are there?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(*) FROM Songs", "answer": "Count the number of songs.\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "Find all the songs performed by artist with last name 'Heilo'\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What are the names of the songs by the artist whose last name is 'Heilo'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "Hom many musicians performed in the song 'Flash'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "How many musicians play in the song 'Flash'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "Find all the songs produced by artists with first name 'Marianne'.\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What are the names of all songs produced by the artist with the first name 'Marianne'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "Who performed the song named 'Badlands'? Show the first name and the last name.\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What are the first and last names of the artist who perfomed the song 'Badlands'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "Who is performing in the back stage position for the song 'Badlands'? Show the first name and the last name.\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What are the first and last names of the performer who was in the back stage position for the song 'Badlands'?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(DISTINCT label) FROM albums", "answer": "How many unique labels are there for albums?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(DISTINCT label) FROM albums", "answer": "What are the unique labels for the albums?\nAdditional table information: table: music_2"} -{"question": "SELECT label FROM albums GROUP BY label ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the label that has the most albums?\nAdditional table information: table: music_2"} -{"question": "SELECT label FROM albums GROUP BY label ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the label with the most albums?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "What is the last name of the musician that have produced the most number of songs?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "What is the last name of the musician who was in the most songs?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "What is the last name of the musician that has been at the back position the most?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "What is the last name of the musicians who has played back position the most?\nAdditional table information: table: music_2"} -{"question": "SELECT title FROM songs WHERE title LIKE '% the %'", "answer": "Find all the songs whose name contains the word 'the'.\nAdditional table information: table: music_2"} -{"question": "SELECT title FROM songs WHERE title LIKE '% the %'", "answer": "What are the names of the songs whose title has the word 'the'?\nAdditional table information: table: music_2"} -{"question": "SELECT DISTINCT instrument FROM Instruments", "answer": "What are all the instruments used?\nAdditional table information: table: music_2"} -{"question": "SELECT DISTINCT instrument FROM Instruments", "answer": "What are the different instruments listed in the database?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What instrument did the musician with last name 'Heilo' use in the song 'Le Pop'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What instruments did the musician with the last name 'Heilo' play in the song 'Le Pop'?\nAdditional table information: table: music_2"} -{"question": "SELECT instrument FROM instruments GROUP BY instrument ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most used instrument?\nAdditional table information: table: music_2"} -{"question": "SELECT instrument FROM instruments GROUP BY instrument ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What instrument is used the most?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(*) FROM instruments WHERE instrument = 'drums'", "answer": "How many songs have used the instrument 'drums'?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(*) FROM instruments WHERE instrument = 'drums'", "answer": "How many songs use drums as an instrument?\nAdditional table information: table: music_2"} -{"question": "SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "What instruments does the the song 'Le Pop' use?\nAdditional table information: table: music_2"} -{"question": "SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "What are the instruments are used in the song 'Le Pop'?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "How many instruments does the song 'Le Pop' use?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "How many different instruments are used in the song 'Le Pop'?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo'", "answer": "How many instrument does the musician with last name 'Heilo' use?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo'", "answer": "How many different instruments does the musician with the last name 'Heilo' use?\nAdditional table information: table: music_2"} -{"question": "SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo'", "answer": "Find all the instruments ever used by the musician with last name 'Heilo'?\nAdditional table information: table: music_2"} -{"question": "SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo'", "answer": "What are all the instruments used by the musician with the last name 'Heilo'?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "Which song has the most vocals?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "What is the song with the most vocals?\nAdditional table information: table: music_2"} -{"question": "SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which vocal type is the most frequently appearring type?\nAdditional table information: table: music_2"} -{"question": "SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the type of vocables that appears most frequently?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "Which vocal type has the band mate with last name 'Heilo' played the most?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "What is the type of vocals that the band member with the last name 'Heilo' played the most?\nAdditional table information: table: music_2"} -{"question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "What are the vocal types used in song 'Le Pop'?\nAdditional table information: table: music_2"} -{"question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "What are the types of vocals used in the song 'Le Pop'?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Demon Kitty Rag'", "answer": "Find the number of vocal types used in song 'Demon Kitty Rag'?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Demon Kitty Rag'", "answer": "What are the types of vocals used in the song 'Demon Kitty Rag'?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'lead'", "answer": "How many songs have a lead vocal?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'lead'", "answer": "How many songs have vocals of type lead?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "Which vocal type did the musician with first name 'Solveig' played in the song with title 'A Bar in Amsterdam'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What are the types of vocals that the musician with the first name 'Solveig' played in the song 'A Bar in Amsterdam'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "Find all the songs that do not have a lead vocal.\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What are the names of the songs without a lead vocal?\nAdditional table information: table: music_2"} -{"question": "SELECT DISTINCT TYPE FROM vocals", "answer": "Find all the vocal types.\nAdditional table information: table: music_2"} -{"question": "SELECT DISTINCT TYPE FROM vocals", "answer": "What are the different types of vocals?\nAdditional table information: table: music_2"} -{"question": "SELECT * FROM Albums WHERE YEAR = 2010", "answer": "What are the albums produced in year 2010?\nAdditional table information: table: music_2"} -{"question": "SELECT * FROM Albums WHERE YEAR = 2010", "answer": "What information is there on albums from 2010?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "Who performed the song named 'Le Pop'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What is the first and last name of artist who performed 'Le Pop'?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "What is the last name of the musician that have produced the most songs?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "What is the last name of the artist who sang the most songs?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What instrument did the musician with last name 'Heilo' use in the song 'Badlands'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What instruments did the musician with the last name 'Heilo' play in 'Badlands'?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands'", "answer": "How many instruments does the song 'Badlands' use?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands'", "answer": "How many different instruments are used in the song 'Badlands'?\nAdditional table information: table: music_2"} -{"question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands'", "answer": "What are the vocal types used in song 'Badlands'?\nAdditional table information: table: music_2"} -{"question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands'", "answer": "What types of vocals are used in the song 'Badlands'?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "Find the number of vocal types used in song 'Le Pop'\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "How many vocal types are used in the song 'Le Pop'?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'shared'", "answer": "How many songs have a shared vocal?\nAdditional table information: table: music_2"} -{"question": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'shared'", "answer": "How many different songs have shared vocals?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "Find all the songs that do not have a back vocal.\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What are the different names of all songs without back vocals?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "Which vocal type has the band mate with first name 'Solveig' played the most?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "What are the types of vocals that the band member with the first name 'Solveig' played the most?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "Which vocal type did the musician with last name 'Heilo' played in the song with title 'Der Kapitan'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What are the types of vocals that the musician with the last name 'Heilo' played in 'Der Kapitan'?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "Find the first name of the band mate that has performed in most songs.\nAdditional table information: table: music_2"} -{"question": "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", "answer": "What is the first name of the band mate who perfomed in the most songs?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "Which vocal type has the band mate with first name 'Marianne' played the most?\nAdditional table information: table: music_2"} -{"question": "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", "answer": "What is the vocal type of the band mate whose first name is 'Marianne' played the most?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "Who is performing in the back stage position for the song 'Der Kapitan'? Show the first name and last name.\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What is the first and last name of the artist who performed back stage for the song 'Der Kapitan'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "Find the name of songs that does not have a back vocal.\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What are the names of the songs that do not have back vocals?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What are the songs in album 'A Kiss Before You Go: Live in Hamburg'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What are the song titles on the album 'A Kiss Before You Go: Live in Hamburg'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What are all the songs in albums under label 'Universal Music Group'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "What are the names of all the songs whose album is under the label of 'Universal Music Group'?\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "Find the number of songs in all the studio albums.\nAdditional table information: table: music_2"} -{"question": "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'", "answer": "How many songs appear in studio albums?\nAdditional table information: table: music_2"} -{"question": "SELECT founder FROM manufacturers WHERE name = 'Sony'", "answer": "Who is the founder of Sony?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT founder FROM manufacturers WHERE name = 'Sony'", "answer": "Return the founder of Sony.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT headquarter FROM manufacturers WHERE founder = 'James'", "answer": "Where is the headquarter of the company founded by James?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT headquarter FROM manufacturers WHERE founder = 'James'", "answer": "What is the headquarter of the company whose founder is James?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name, headquarter FROM manufacturers ORDER BY revenue DESC", "answer": "Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name, headquarter FROM manufacturers ORDER BY revenue DESC", "answer": "What are the names and headquarters of all manufacturers, ordered by revenue descending?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT AVG(revenue), MAX(revenue), SUM(revenue) FROM manufacturers", "answer": "What are the average, maximum and total revenues of all companies?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT AVG(revenue), MAX(revenue), SUM(revenue) FROM manufacturers", "answer": "Return the average, maximum, and total revenues across all manufacturers.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy'", "answer": "How many companies were created by Andy?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy'", "answer": "Return the number of companies created by Andy.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT SUM(revenue) FROM manufacturers WHERE headquarter = 'Austin'", "answer": "Find the total revenue created by the companies whose headquarter is located at Austin.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT SUM(revenue) FROM manufacturers WHERE headquarter = 'Austin'", "answer": "What is the sum of revenue from companies with headquarters in Austin?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT DISTINCT headquarter FROM manufacturers", "answer": "What are the different cities listed?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT DISTINCT headquarter FROM manufacturers", "answer": "Give the distinct headquarters of manufacturers.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT COUNT(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing'", "answer": "Find the number of manufactures that are based in Tokyo or Beijing.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT COUNT(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing'", "answer": "How many manufacturers have headquarters in either Tokyo or Beijing?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT founder FROM manufacturers WHERE name LIKE 'S%'", "answer": "Find the founder of the company whose name begins with the letter 'S'.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT founder FROM manufacturers WHERE name LIKE 'S%'", "answer": "Who is the founders of companies whose first letter is S?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150", "answer": "Find the name of companies whose revenue is between 100 and 150.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150", "answer": "What are the names of companies with revenue between 100 and 150?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT SUM(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan'", "answer": "What is the total revenue of all companies whose main office is at Tokyo or Taiwan?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT SUM(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan'", "answer": "Return the total revenue of companies with headquarters in Tokyo or Taiwan.\nAdditional table information: table: manufactory_1"} -{"question": "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'", "answer": "Find the name of product that is produced by both companies Creative Labs and Sony.\nAdditional table information: table: manufactory_1"} -{"question": "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'", "answer": "What are the names of products produced by both Creative Labs and Sony?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1", "answer": "Find the name, headquarter and founder of the manufacturer that has the highest revenue.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1", "answer": "What are the names, headquarters and founders of the company with the highest revenue?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC", "answer": "Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC", "answer": "What are the names, headquarters and revenues for manufacturers, sorted by revenue descending?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name FROM manufacturers WHERE revenue > (SELECT AVG(revenue) FROM manufacturers)", "answer": "Find the name of companies whose revenue is greater than the average revenue of all companies.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name FROM manufacturers WHERE revenue > (SELECT AVG(revenue) FROM manufacturers)", "answer": "What are the names of manufacturers with revenue greater than the average of all revenues?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name FROM manufacturers WHERE revenue < (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin')", "answer": "Find the name of companies whose revenue is smaller than the revenue of all companies based in Austin.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name FROM manufacturers WHERE revenue < (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin')", "answer": "What are the names of companies with revenue less than the lowest revenue of any manufacturer in Austin?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT SUM(revenue) FROM manufacturers WHERE revenue > (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin')", "answer": "Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT SUM(revenue) FROM manufacturers WHERE revenue > (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin')", "answer": "What is the total revenue of companies with revenue greater than the lowest revenue of any manufacturer in Austin?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT SUM(revenue), founder FROM manufacturers GROUP BY founder", "answer": "Find the total revenue of companies of each founder.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT SUM(revenue), founder FROM manufacturers GROUP BY founder", "answer": "What is the total revenue of companies started by founder?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name, MAX(revenue), Headquarter FROM manufacturers GROUP BY Headquarter", "answer": "Find the name and revenue of the company that earns the highest revenue in each city.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name, MAX(revenue), Headquarter FROM manufacturers GROUP BY Headquarter", "answer": "What are the names and revenues of the companies with the highest revenues in each headquarter city?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT SUM(revenue), name FROM manufacturers GROUP BY name", "answer": "Find the total revenue for each manufacturer.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT SUM(revenue), name FROM manufacturers GROUP BY name", "answer": "What is the total revenue of each manufacturer?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT AVG(T1.price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "answer": "Find the average prices of all products from each manufacture, and list each company's name.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT AVG(T1.price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "answer": "What are the average prices of products for each manufacturer?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT COUNT(DISTINCT T1.name), T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.Headquarter", "answer": "Find the number of different products that are produced by companies at different headquarter cities.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT COUNT(DISTINCT T1.name), T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.Headquarter", "answer": "How many different products are produced in each headquarter city?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT COUNT(DISTINCT name) FROM products WHERE NOT name IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Sony')", "answer": "Find number of products which Sony does not make.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT COUNT(DISTINCT name) FROM products WHERE NOT name IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Sony')", "answer": "How many products are not made by Sony?\nAdditional table information: table: manufactory_1"} -{"question": "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'", "answer": "Find the name of companies that do not make DVD drive.\nAdditional table information: table: manufactory_1"} -{"question": "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'", "answer": "What are the names of companies that do not make DVD drives?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT COUNT(*), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "answer": "Find the number of products for each manufacturer, showing the name of each company.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT COUNT(*), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "answer": "How many products are there for each manufacturer?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT Name FROM Products", "answer": "Select the names of all the products in the store.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT Name FROM Products", "answer": "What are the names of all products?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name, price FROM products", "answer": "Select the names and the prices of all the products in the store.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name, price FROM products", "answer": "What are the names and prices of all products in the store?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name FROM products WHERE price <= 200", "answer": "Select the name of the products with a price less than or equal to $200.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name FROM products WHERE price <= 200", "answer": "What are the names of products with price at most 200?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT * FROM products WHERE price BETWEEN 60 AND 120", "answer": "Find all information of all the products with a price between $60 and $120.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT * FROM products WHERE price BETWEEN 60 AND 120", "answer": "What is all the information of all the products that have a price between 60 and 120?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT AVG(price) FROM products", "answer": "Compute the average price of all the products.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT AVG(price) FROM products", "answer": "What is the average price across all products?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT AVG(price) FROM products WHERE manufacturer = 2", "answer": "Compute the average price of all products with manufacturer code equal to 2.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT AVG(price) FROM products WHERE manufacturer = 2", "answer": "What is the average price of products with manufacturer codes equal to 2?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT COUNT(*) FROM products WHERE price >= 180", "answer": "Compute the number of products with a price larger than or equal to $180.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT COUNT(*) FROM products WHERE price >= 180", "answer": "How many products have prices of at least 180?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name, price FROM products WHERE price >= 180 ORDER BY price DESC, name ASC NULLS FIRST", "answer": "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).\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name, price FROM products WHERE price >= 180 ORDER BY price DESC, name ASC NULLS FIRST", "answer": "What are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT * FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code", "answer": "Select all the data from the products and each product's manufacturer.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT * FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code", "answer": "What is all the product data, as well as each product's manufacturer?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT AVG(Price), manufacturer FROM Products GROUP BY manufacturer", "answer": "Select the average price of each manufacturer's products, showing only the manufacturer's code.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT AVG(Price), manufacturer FROM Products GROUP BY manufacturer", "answer": "What are the average prices of products, grouped by manufacturer code?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "answer": "Select the average price of each manufacturer's products, showing the manufacturer's name.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "answer": "What are the average prices of products, grouped by manufacturer name?\nAdditional table information: table: manufactory_1"} -{"question": "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", "answer": "Select the names of manufacturer whose products have an average price higher than or equal to $150.\nAdditional table information: table: manufactory_1"} -{"question": "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", "answer": "What are the names and average prices of products for manufacturers whose products cost on average 150 or more?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name, price FROM Products ORDER BY price ASC NULLS FIRST LIMIT 1", "answer": "Select the name and price of the cheapest product.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT name, price FROM Products ORDER BY price ASC NULLS FIRST LIMIT 1", "answer": "What is the name and price of the cheapest product?\nAdditional table information: table: manufactory_1"} -{"question": "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", "answer": "Select the name of each manufacturer along with the name and price of its most expensive product.\nAdditional table information: table: manufactory_1"} -{"question": "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", "answer": "For each manufacturer name, what are the names and prices of their most expensive product?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT code, name, MIN(price) FROM products GROUP BY name", "answer": "Select the code of the product that is cheapest in each product category.\nAdditional table information: table: manufactory_1"} -{"question": "SELECT code, name, MIN(price) FROM products GROUP BY name", "answer": "What are the codes and names of the cheapest products in each category?\nAdditional table information: table: manufactory_1"} -{"question": "SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1", "answer": "What is the id of the problem log that is created most recently?\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1", "answer": "Which problem log was created most recently? Give me the log id.\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT problem_log_id, problem_id FROM problem_log ORDER BY log_entry_date NULLS FIRST LIMIT 1", "answer": "What is the oldest log id and its corresponding problem id?\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT problem_log_id, problem_id FROM problem_log ORDER BY log_entry_date NULLS FIRST LIMIT 1", "answer": "Find the oldest log id and its corresponding problem id.\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10", "answer": "Find all the ids and dates of the logs for the problem whose id is 10.\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10", "answer": "For the problem with id 10, return the ids and dates of its problem logs.\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT problem_log_id, log_entry_description FROM problem_log", "answer": "List all the log ids and their descriptions from the problem logs.\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT problem_log_id, log_entry_description FROM problem_log", "answer": "What are the log id and entry description of each problem?\nAdditional table information: table: tracking_software_problems"} -{"question": "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", "answer": "List the first and last names of all distinct staff members who are assigned to the problem whose id is 1.\nAdditional table information: table: tracking_software_problems"} -{"question": "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", "answer": "Which staff members are assigned to the problem with id 1? Give me their first and last names.\nAdditional table information: table: tracking_software_problems"} -{"question": "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'", "answer": "List the problem id and log id which are assigned to the staff named Rylan Homenick.\nAdditional table information: table: tracking_software_problems"} -{"question": "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'", "answer": "Which problem id and log id are assigned to the staff named Rylan Homenick?\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT COUNT(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = 'voluptatem'", "answer": "How many problems are there for product voluptatem?\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT COUNT(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = 'voluptatem'", "answer": "How many problems did the product called 'voluptatem' have in record?\nAdditional table information: table: tracking_software_problems"} -{"question": "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", "answer": "How many problems does the product with the most problems have? List the number of the problems and product name.\nAdditional table information: table: tracking_software_problems"} -{"question": "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", "answer": "Which product has the most problems? Give me the number of problems and the product name.\nAdditional table information: table: tracking_software_problems"} -{"question": "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'", "answer": "Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop.\nAdditional table information: table: tracking_software_problems"} -{"question": "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'", "answer": "Which problems are reported by the staff with first name 'Christop'? Show the descriptions of the problems.\nAdditional table information: table: tracking_software_problems"} -{"question": "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'", "answer": "Find the ids of the problems that are reported by the staff whose last name is Bosco.\nAdditional table information: table: tracking_software_problems"} -{"question": "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'", "answer": "Which problems are reported by the staff with last name 'Bosco'? Show the ids of the problems.\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT problem_id FROM problems WHERE date_problem_reported > '1978-06-26'", "answer": "What are the ids of the problems which are reported after 1978-06-26?\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT problem_id FROM problems WHERE date_problem_reported > '1978-06-26'", "answer": "Find the ids of the problems reported after 1978-06-26.\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT problem_id FROM problems WHERE date_problem_reported < '1978-06-26'", "answer": "What are the ids of the problems which are reported before 1978-06-26?\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT problem_id FROM problems WHERE date_problem_reported < '1978-06-26'", "answer": "Which problems are reported before 1978-06-26? Give me the ids of the problems.\nAdditional table information: table: tracking_software_problems"} -{"question": "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", "answer": "For each product which has problems, what are the number of problems and the product id?\nAdditional table information: table: tracking_software_problems"} -{"question": "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", "answer": "For each product with some problems, list the count of problems and the product id.\nAdditional table information: table: tracking_software_problems"} -{"question": "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", "answer": "For each product that has problems, find the number of problems reported after 1986-11-13 and the product id?\nAdditional table information: table: tracking_software_problems"} -{"question": "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", "answer": "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.\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT DISTINCT product_name FROM product ORDER BY product_name NULLS FIRST", "answer": "List the names of all the distinct product names in alphabetical order?\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT DISTINCT product_name FROM product ORDER BY product_name NULLS FIRST", "answer": "Sort all the distinct product names in alphabetical order.\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT DISTINCT product_name FROM product ORDER BY product_id NULLS FIRST", "answer": "List all the distinct product names ordered by product id?\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT DISTINCT product_name FROM product ORDER BY product_id NULLS FIRST", "answer": "What is the list of distinct product names sorted by product id?\nAdditional table information: table: tracking_software_problems"} -{"question": "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'", "answer": "What are the id of problems reported by the staff named Dameon Frami or Jolie Weber?\nAdditional table information: table: tracking_software_problems"} -{"question": "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'", "answer": "Which problems were reported by the staff named Dameon Frami or Jolie Weber? Give me the ids of the problems.\nAdditional table information: table: tracking_software_problems"} -{"question": "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'", "answer": "What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst?\nAdditional table information: table: tracking_software_problems"} -{"question": "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'", "answer": "For which product was there a problem reported by Christop Berge, with closure authorised by Ashley Medhurst? Return the product ids.\nAdditional table information: table: tracking_software_problems"} -{"question": "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')", "answer": "What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte?\nAdditional table information: table: tracking_software_problems"} -{"question": "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')", "answer": "Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems.\nAdditional table information: table: tracking_software_problems"} -{"question": "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')", "answer": "What are the ids of the problems reported after the date of any problems reported by Rylan Homenick?\nAdditional table information: table: tracking_software_problems"} -{"question": "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')", "answer": "Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick.\nAdditional table information: table: tracking_software_problems"} -{"question": "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", "answer": "Find the top 3 products which have the largest number of problems?\nAdditional table information: table: tracking_software_problems"} -{"question": "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", "answer": "What are the three products that have the most problems?s\nAdditional table information: table: tracking_software_problems"} -{"question": "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'", "answer": "List the ids of the problems from the product 'voluptatem' that are reported after 1995?\nAdditional table information: table: tracking_software_problems"} -{"question": "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'", "answer": "What are the ids of the problems that are from the product 'voluptatem' and are reported after 1995?\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1, 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, 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'", "answer": "Find the first and last name of the staff members who reported problems from the product 'rem' but not 'aut'?\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1, 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, 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'", "answer": "Which staff members who reported problems from the product 'rem' but not 'aut'? Give me their first and last names.\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT T2.product_name FROM problems AS T1, 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, 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'", "answer": "Find the products which have problems reported by both Lacey Bosco and Kenton Champlin?\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT T2.product_name FROM problems AS T1, 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, 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'", "answer": "Which products have problems reported by both the staff named Lacey Bosco and the staff named Kenton Champlin?\nAdditional table information: table: tracking_software_problems"} -{"question": "SELECT COUNT(*) FROM branch WHERE membership_amount > (SELECT AVG(membership_amount) FROM branch)", "answer": "How many branches where have more than average number of memberships are there?\nAdditional table information: table: shop_membership"} -{"question": "SELECT COUNT(*) FROM branch WHERE membership_amount > (SELECT AVG(membership_amount) FROM branch)", "answer": "What is the number of branches that have more than the average number of memberships?\nAdditional table information: table: shop_membership"} -{"question": "SELECT name, address_road, city FROM branch ORDER BY open_year NULLS FIRST", "answer": "Show name, address road, and city for all branches sorted by open year.\nAdditional table information: table: shop_membership"} -{"question": "SELECT name, address_road, city FROM branch ORDER BY open_year NULLS FIRST", "answer": "What are the names, address roads, and cities of the branches ordered by opening year?\nAdditional table information: table: shop_membership"} -{"question": "SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3", "answer": "What are names for top three branches with most number of membership?\nAdditional table information: table: shop_membership"} -{"question": "SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3", "answer": "What are the names for the 3 branches that have the most memberships?\nAdditional table information: table: shop_membership"} -{"question": "SELECT DISTINCT city FROM branch WHERE membership_amount >= 100", "answer": "Show all distinct city where branches with at least 100 memberships are located.\nAdditional table information: table: shop_membership"} -{"question": "SELECT DISTINCT city FROM branch WHERE membership_amount >= 100", "answer": "What are the different cities that have more than 100 memberships?\nAdditional table information: table: shop_membership"} -{"question": "SELECT open_year FROM branch GROUP BY open_year HAVING COUNT(*) >= 2", "answer": "List all open years when at least two shops are opened.\nAdditional table information: table: shop_membership"} -{"question": "SELECT open_year FROM branch GROUP BY open_year HAVING COUNT(*) >= 2", "answer": "What are the opening years in which at least two shops opened?\nAdditional table information: table: shop_membership"} -{"question": "SELECT MIN(membership_amount), MAX(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London'", "answer": "Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London.\nAdditional table information: table: shop_membership"} -{"question": "SELECT MIN(membership_amount), MAX(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London'", "answer": "What are the minimum and maximum membership amounts for all branches that either opened in 2011 or are located in London?\nAdditional table information: table: shop_membership"} -{"question": "SELECT city, COUNT(*) FROM branch WHERE open_year < 2010 GROUP BY city", "answer": "Show the city and the number of branches opened before 2010 for each city.\nAdditional table information: table: shop_membership"} -{"question": "SELECT city, COUNT(*) FROM branch WHERE open_year < 2010 GROUP BY city", "answer": "For each city, how many branches opened before 2010?\nAdditional table information: table: shop_membership"} -{"question": "SELECT COUNT(DISTINCT LEVEL) FROM member", "answer": "How many different levels do members have?\nAdditional table information: table: shop_membership"} -{"question": "SELECT COUNT(DISTINCT LEVEL) FROM member", "answer": "What are the different membership levels?\nAdditional table information: table: shop_membership"} -{"question": "SELECT card_number, name, hometown FROM member ORDER BY LEVEL DESC", "answer": "Show card number, name, and hometown for all members in a descending order of level.\nAdditional table information: table: shop_membership"} -{"question": "SELECT card_number, name, hometown FROM member ORDER BY LEVEL DESC", "answer": "What are the card numbers, names, and hometowns of every member ordered by descending level?\nAdditional table information: table: shop_membership"} -{"question": "SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the membership level with most number of members.\nAdditional table information: table: shop_membership"} -{"question": "SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the membership level with the most people?\nAdditional table information: table: shop_membership"} -{"question": "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 NULLS FIRST", "answer": "Show all member names and registered branch names sorted by register year.\nAdditional table information: table: shop_membership"} -{"question": "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 NULLS FIRST", "answer": "What are the names of the members and branches at which they are registered sorted by year of registration?\nAdditional table information: table: shop_membership"} -{"question": "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", "answer": "Show all branch names with the number of members in each branch registered after 2015.\nAdditional table information: table: shop_membership"} -{"question": "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", "answer": "For each branch id, what are the names of the branches that were registered after 2015?\nAdditional table information: table: shop_membership"} -{"question": "SELECT name FROM member WHERE NOT member_id IN (SELECT member_id FROM membership_register_branch)", "answer": "Show member names without any registered branch.\nAdditional table information: table: shop_membership"} -{"question": "SELECT name FROM member WHERE NOT member_id IN (SELECT member_id FROM membership_register_branch)", "answer": "What are the names of the members that have never registered at any branch?\nAdditional table information: table: shop_membership"} -{"question": "SELECT name, city FROM branch WHERE NOT branch_id IN (SELECT branch_id FROM membership_register_branch)", "answer": "List the branch name and city without any registered members.\nAdditional table information: table: shop_membership"} -{"question": "SELECT name, city FROM branch WHERE NOT branch_id IN (SELECT branch_id FROM membership_register_branch)", "answer": "What are the names and cities of the branches that do not have any registered members?\nAdditional table information: table: shop_membership"} -{"question": "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", "answer": "What is the name and open year for the branch with most number of memberships registered in 2016?\nAdditional table information: table: shop_membership"} -{"question": "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", "answer": "What is the name and opening year for the branch that registered the most members in 2016?\nAdditional table information: table: shop_membership"} -{"question": "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", "answer": "Show the member name and hometown who registered a branch in 2016.\nAdditional table information: table: shop_membership"} -{"question": "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", "answer": "What are the member names and hometowns of those who registered at a branch in 2016?\nAdditional table information: table: shop_membership"} -{"question": "SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100", "answer": "Show all city with a branch opened in 2001 and a branch with more than 100 membership.\nAdditional table information: table: shop_membership"} -{"question": "SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100", "answer": "What are the cities that have a branch that opened in 2001 and a branch with more than 100 members?\nAdditional table information: table: shop_membership"} -{"question": "SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100", "answer": "Show all cities without a branch having more than 100 memberships.\nAdditional table information: table: shop_membership"} -{"question": "SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100", "answer": "What are the cities that do not have any branches with more than 100 members?\nAdditional table information: table: shop_membership"} -{"question": "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", "answer": "What is the sum of total pounds of purchase in year 2018 for all branches in London?\nAdditional table information: table: shop_membership"} -{"question": "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", "answer": "How many total pounds were purchased in the year 2018 at all London branches?\nAdditional table information: table: shop_membership"} -{"question": "SELECT COUNT(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6", "answer": "What is the total number of purchases for members with level 6?\nAdditional table information: table: shop_membership"} -{"question": "SELECT COUNT(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6", "answer": "What are the total purchases for members rated at level 6?\nAdditional table information: table: shop_membership"} -{"question": "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'", "answer": "Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia.\nAdditional table information: table: shop_membership"} -{"question": "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'", "answer": "What are the names of the branches that have some members with a hometown in Louisville, Kentucky and also those from Hiram, Goergia?\nAdditional table information: table: shop_membership"} -{"question": "SELECT card_number FROM member WHERE Hometown LIKE '%Kentucky%'", "answer": "list the card number of all members whose hometown address includes word 'Kentucky'.\nAdditional table information: table: shop_membership"} -{"question": "SELECT card_number FROM member WHERE Hometown LIKE '%Kentucky%'", "answer": "What are the card numbers of members from Kentucky?\nAdditional table information: table: shop_membership"} -{"question": "SELECT COUNT(*) FROM STUDENT", "answer": "Find the number of students in total.\nAdditional table information: table: voter_2"} -{"question": "SELECT COUNT(*) FROM STUDENT", "answer": "How many students are there in total?\nAdditional table information: table: voter_2"} -{"question": "SELECT COUNT(*) FROM VOTING_RECORD", "answer": "Find the number of voting records in total.\nAdditional table information: table: voter_2"} -{"question": "SELECT COUNT(*) FROM VOTING_RECORD", "answer": "How many voting records do we have?\nAdditional table information: table: voter_2"} -{"question": "SELECT COUNT(DISTINCT President_Vote) FROM VOTING_RECORD", "answer": "Find the distinct number of president votes.\nAdditional table information: table: voter_2"} -{"question": "SELECT COUNT(DISTINCT President_Vote) FROM VOTING_RECORD", "answer": "How many distinct president votes are recorded?\nAdditional table information: table: voter_2"} -{"question": "SELECT MAX(Age) FROM STUDENT", "answer": "Find the maximum age of all the students.\nAdditional table information: table: voter_2"} -{"question": "SELECT MAX(Age) FROM STUDENT", "answer": "What is the oldest age among the students?\nAdditional table information: table: voter_2"} -{"question": "SELECT LName FROM STUDENT WHERE Major = 50", "answer": "Find the last names of students with major 50.\nAdditional table information: table: voter_2"} -{"question": "SELECT LName FROM STUDENT WHERE Major = 50", "answer": "What are the last names of students studying major 50?\nAdditional table information: table: voter_2"} -{"question": "SELECT Fname FROM STUDENT WHERE Age > 22", "answer": "Find the first names of students with age above 22.\nAdditional table information: table: voter_2"} -{"question": "SELECT Fname FROM STUDENT WHERE Age > 22", "answer": "What are the first names of all the students aged above 22?\nAdditional table information: table: voter_2"} -{"question": "SELECT Major FROM STUDENT WHERE Sex = 'M'", "answer": "What are the majors of male (sex is M) students?\nAdditional table information: table: voter_2"} -{"question": "SELECT Major FROM STUDENT WHERE Sex = 'M'", "answer": "List the major of each male student.\nAdditional table information: table: voter_2"} -{"question": "SELECT AVG(Age) FROM STUDENT WHERE Sex = 'F'", "answer": "What is the average age of female (sex is F) students?\nAdditional table information: table: voter_2"} -{"question": "SELECT AVG(Age) FROM STUDENT WHERE Sex = 'F'", "answer": "Find the average age of female students.\nAdditional table information: table: voter_2"} -{"question": "SELECT MAX(Age), MIN(Age) FROM STUDENT WHERE Major = 600", "answer": "What are the maximum and minimum age of students with major 600?\nAdditional table information: table: voter_2"} -{"question": "SELECT MAX(Age), MIN(Age) FROM STUDENT WHERE Major = 600", "answer": "Tell me the ages of the oldest and youngest students studying major 600.\nAdditional table information: table: voter_2"} -{"question": "SELECT Advisor FROM STUDENT WHERE city_code = 'BAL'", "answer": "Who are the advisors for students that live in a city with city code 'BAL'?\nAdditional table information: table: voter_2"} -{"question": "SELECT Advisor FROM STUDENT WHERE city_code = 'BAL'", "answer": "Show the advisors of the students whose city of residence has city code 'BAL'.\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = 'Fall'", "answer": "What are the distinct secretary votes in the fall election cycle?\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = 'Fall'", "answer": "Return all the distinct secretary votes made in the fall election cycle.\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = '08/30/2015'", "answer": "What are the distinct president votes on 08/30/2015?\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = '08/30/2015'", "answer": "Show all the distinct president votes made on 08/30/2015.\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT Registration_Date, Election_Cycle FROM VOTING_RECORD", "answer": "Report the distinct registration date and the election cycle.\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT Registration_Date, Election_Cycle FROM VOTING_RECORD", "answer": "What are the distinct registration dates and the election cycles?\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT President_Vote, VICE_President_Vote FROM VOTING_RECORD", "answer": "Report the distinct president vote and the vice president vote.\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT President_Vote, VICE_President_Vote FROM VOTING_RECORD", "answer": "List all the distinct president votes and the vice president votes.\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE", "answer": "Find the distinct last names of the students who have class president votes.\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE", "answer": "What are the distinct last names of the students who have class president votes?\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE", "answer": "Find the distinct first names of the students who have class senator votes.\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE", "answer": "What are the distinct first names of the students who have class president votes?\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = 'Fall'", "answer": "Find the distinct ages of students who have secretary votes in the fall election cycle.\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = 'Fall'", "answer": "What are the distinct ages of students who have secretary votes in the fall election cycle?\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = 'Spring'", "answer": "Find the distinct Advisor of students who have treasurer votes in the spring election cycle.\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = 'Spring'", "answer": "Who served as an advisor for students who have treasurer votes in the spring election cycle?\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote", "answer": "Find the distinct majors of students who have treasurer votes.\nAdditional table information: table: voter_2"} -{"question": "SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote", "answer": "What are the distinct majors that students with treasurer votes are studying?\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "Find the first and last names of all the female (sex is F) students who have president votes.\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "What are the first and last names of all the female students who have president votes?\nAdditional table information: table: voter_2"} -{"question": "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", "answer": "Find the first and last name of all the students of age 18 who have vice president votes.\nAdditional table information: table: voter_2"} -{"question": "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", "answer": "What are the first names and last names of the students who are 18 years old and have vice president votes.\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "How many male (sex is M) students have class senator votes in the fall election cycle?\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "Count the number of male students who had class senator votes in the fall election cycle.\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle.\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "Which students live in the city with code 'NYC' and have class senator votes in the spring election cycle? Count the numbers.\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "Find the average age of students who live in the city with code 'NYC' and have secretary votes in the spring election cycle.\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "What is the average age of students who have city code 'NYC' and have secretary votes for the spring election cycle?\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "What is the average age of the female students with secretary votes in the spring election cycle?\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "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?\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "Find the distinct last names of all the students who have president votes and whose advisor is not 2192.\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "What are the distinct last names of the students who have president votes but do not have 2192 as the advisor?\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "Find the distinct last names of all the students who have president votes and whose advisor is 8741.\nAdditional table information: table: voter_2"} -{"question": "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'", "answer": "What are the distinct last names of the students who have president votes and have 8741 as the advisor?\nAdditional table information: table: voter_2"} -{"question": "SELECT Advisor, COUNT(*) FROM STUDENT GROUP BY Advisor", "answer": "For each advisor, report the total number of students advised by him or her.\nAdditional table information: table: voter_2"} -{"question": "SELECT Advisor, COUNT(*) FROM STUDENT GROUP BY Advisor", "answer": "How many students does each advisor have?\nAdditional table information: table: voter_2"} -{"question": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2", "answer": "Report all advisors that advise more than 2 students.\nAdditional table information: table: voter_2"} -{"question": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2", "answer": "Which advisors have more than two students?\nAdditional table information: table: voter_2"} -{"question": "SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3", "answer": "Report all majors that have less than 3 students.\nAdditional table information: table: voter_2"} -{"question": "SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3", "answer": "What are the majors only less than three students are studying?\nAdditional table information: table: voter_2"} -{"question": "SELECT Election_Cycle, COUNT(*) FROM VOTING_RECORD GROUP BY Election_Cycle", "answer": "For each election cycle, report the number of voting records.\nAdditional table information: table: voter_2"} -{"question": "SELECT Election_Cycle, COUNT(*) FROM VOTING_RECORD GROUP BY Election_Cycle", "answer": "Count the number of voting records for each election cycle.\nAdditional table information: table: voter_2"} -{"question": "SELECT Major FROM STUDENT GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which major has the most students?\nAdditional table information: table: voter_2"} -{"question": "SELECT Major FROM STUDENT GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the major that is studied by the largest number of students.\nAdditional table information: table: voter_2"} -{"question": "SELECT Major FROM STUDENT WHERE Sex = 'F' GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common major among female (sex is F) students?\nAdditional table information: table: voter_2"} -{"question": "SELECT Major FROM STUDENT WHERE Sex = 'F' GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the major that is studied by the most female students.\nAdditional table information: table: voter_2"} -{"question": "SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the city_code of the city that the most students live in?\nAdditional table information: table: voter_2"} -{"question": "SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the code of the city that has the most students.\nAdditional table information: table: voter_2"} -{"question": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2", "answer": "Report the distinct advisors who have more than 2 students.\nAdditional table information: table: voter_2"} -{"question": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2", "answer": "Which advisors are advising more than 2 students?\nAdditional table information: table: voter_2"} -{"question": "SELECT COUNT(*) FROM products", "answer": "How many products are there?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT COUNT(*) FROM products", "answer": "Count the number of products.\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT COUNT(*) FROM ref_colors", "answer": "How many colors are there?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT COUNT(*) FROM ref_colors", "answer": "Count the number of colors.\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT COUNT(*) FROM CHARACTERISTICS", "answer": "How many characteristics are there?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT COUNT(*) FROM CHARACTERISTICS", "answer": "Count the number of characteristics.\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT product_name, typical_buying_price FROM products", "answer": "What are the names and buying prices of all the products?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT product_name, typical_buying_price FROM products", "answer": "Return the names and typical buying prices for all products.\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT color_description FROM ref_colors", "answer": "List the description of all the colors.\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT color_description FROM ref_colors", "answer": "What are the descriptions for each color?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT DISTINCT characteristic_name FROM CHARACTERISTICS", "answer": "Find the names of all the product characteristics.\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT DISTINCT characteristic_name FROM CHARACTERISTICS", "answer": "What are the different names of the product characteristics?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT product_name FROM products WHERE product_category_code = 'Spices'", "answer": "What are the names of products with category 'Spices'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT product_name FROM products WHERE product_category_code = 'Spices'", "answer": "Return the names of products in the category 'Spices'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "List the names, color descriptions and product descriptions of products with category 'Herbs'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "What are the names, color descriptions, and product descriptions for products in the 'Herbs' category?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT COUNT(*) FROM products WHERE product_category_code = 'Seeds'", "answer": "How many products are there under the category 'Seeds'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT COUNT(*) FROM products WHERE product_category_code = 'Seeds'", "answer": "Count the number of products in the category 'Seeds'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT COUNT(*) FROM products WHERE product_category_code = 'Spices' AND typical_buying_price > 1000", "answer": "Find the number of products with category 'Spices' and typically sold above 1000.\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT COUNT(*) FROM products WHERE product_category_code = 'Spices' AND typical_buying_price > 1000", "answer": "How many products are in the 'Spices' category and have a typical price of over 1000?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT product_category_code, typical_buying_price FROM products WHERE product_name = 'cumin'", "answer": "What is the category and typical buying price of the product with name 'cumin'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT product_category_code, typical_buying_price FROM products WHERE product_name = 'cumin'", "answer": "Return the category code and typical price of 'cumin'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT product_category_code FROM products WHERE product_name = 'flax'", "answer": "Which category does the product named 'flax' belong to?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT product_category_code FROM products WHERE product_name = 'flax'", "answer": "What is the code of the category that the product with the name 'flax' belongs to?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "What is the name of the product with the color description 'yellow'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Give the name of the products that have a color description 'yellow'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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%'", "answer": "Find the category descriptions of the products whose descriptions include letter 't'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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%'", "answer": "What are the descriptions of the categories that products with product descriptions that contain the letter t are in?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "What is the color description of the product with name 'catnip'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Give the color description for the product 'catnip'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "What is the color code and description of the product named 'chervil'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Return the color code and description for the product with the name 'chervil'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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", "answer": "Find the id and color description of the products with at least 2 characteristics.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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", "answer": "What are the product ids and color descriptions for products with two or more characteristics?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "List all the product names with the color description 'white'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "What are the names of products with 'white' as their color description?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "What are the name and typical buying and selling prices of the products that have color described as 'yellow'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Return the names and typical buying and selling prices for products that have 'yellow' as their color description.\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = 'sesame'", "answer": "How many characteristics does the product named 'sesame' have?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = 'sesame'", "answer": "Count the number of characteristics the product 'sesame' has.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "How many distinct characteristic names does the product 'cumin' have?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Count the number of different characteristic names the product 'cumin' has.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "What are all the characteristic names of product 'sesame'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Return the characteristic names of the 'sesame' product.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "List all the characteristic names and data types of product 'cumin'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "What are the names and data types of the characteristics of the 'cumin' product?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "List all characteristics of product named 'sesame' with type code 'Grade'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "How many characteristics does the product named 'laurel' have?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Count the number of characteristics of the product named 'laurel'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Find the number of characteristics that the product 'flax' has.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Count the number of characteristics of the 'flax' product.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Find the name of the products that have the color description 'red' and have the characteristic name 'fast'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "What are the names of the products that have a color description of 'red' and the 'fast' characteristic?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "How many products have the characteristic named 'hot'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Count the number of products with the 'hot' charactersitic.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "List the all the distinct names of the products with the characteristic name 'warm'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "What are the different product names for products that have the 'warm' characteristic:?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Find the number of the products that have their color described as 'red' and have a characteristic named 'slow'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "How many products have the color description 'red' and the characteristic name 'slow'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Count the products that have the color description 'white' or have the characteristic name 'hot'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "How many products have their color described as 'white' or have a characteristic with the name 'hot'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs'", "answer": "What is the unit of measuerment of the product category code 'Herbs'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs'", "answer": "Return the unit of measure for 'Herb' products.\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT product_category_description FROM ref_product_categories WHERE product_category_code = 'Spices'", "answer": "Find the product category description of the product category with code 'Spices'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT product_category_description FROM ref_product_categories WHERE product_category_code = 'Spices'", "answer": "What is the description of the product category with the code 'Spices'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT product_category_description, unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs'", "answer": "What is the product category description and unit of measurement of category 'Herbs'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT product_category_description, unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs'", "answer": "Return the description and unit of measurement for products in the 'Herbs' category.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "What is the unit of measurement of product named 'cumin'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Give the unit of measure for the product with the name 'cumin'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Find the unit of measurement and product category code of product named 'chervil'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "What are the unit of measure and category code for the 'chervil' product?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "Find the product names that are colored 'white' but do not have unit of measurement 'Handful'.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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'", "answer": "What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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", "answer": "What is the description of the color for most products?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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", "answer": "Return the color description that is most common across all products.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the description of the color used by least products?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Give the color description that is least common across products.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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", "answer": "What is the characteristic name used by most number of the products?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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", "answer": "Return the name of the characteristic that is most common across all products.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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", "answer": "What are the names, details and data types of the characteristics which are never used by any product?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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", "answer": "Give the names, details, and data types of characteristics that are not found in any product.\nAdditional table information: table: products_gen_characteristics"} -{"question": "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", "answer": "What are characteristic names used at least twice across all products?\nAdditional table information: table: products_gen_characteristics"} -{"question": "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", "answer": "Give the names of characteristics that are in two or more products?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT COUNT(*) FROM Ref_colors WHERE NOT color_code IN (SELECT color_code FROM products)", "answer": "How many colors are never used by any product?\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT COUNT(*) FROM Ref_colors WHERE NOT color_code IN (SELECT color_code FROM products)", "answer": "Count the number of colors that are not used in any products.\nAdditional table information: table: products_gen_characteristics"} -{"question": "SELECT COUNT(*) FROM event", "answer": "How many events are there?\nAdditional table information: table: swimming"} -{"question": "SELECT name FROM event ORDER BY YEAR DESC", "answer": "List all the event names by year from the most recent to the oldest.\nAdditional table information: table: swimming"} -{"question": "SELECT name FROM event ORDER BY YEAR DESC LIMIT 1", "answer": "What is the name of the event that happened in the most recent year?\nAdditional table information: table: swimming"} -{"question": "SELECT COUNT(*) FROM stadium", "answer": "How many stadiums are there?\nAdditional table information: table: swimming"} -{"question": "SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1", "answer": "Find the name of the stadium that has the maximum capacity.\nAdditional table information: table: swimming"} -{"question": "SELECT name FROM stadium WHERE capacity < (SELECT AVG(capacity) FROM stadium)", "answer": "Find the names of stadiums whose capacity is smaller than the average capacity.\nAdditional table information: table: swimming"} -{"question": "SELECT country FROM stadium GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the country that has the most stadiums.\nAdditional table information: table: swimming"} -{"question": "SELECT country FROM stadium GROUP BY country HAVING COUNT(*) <= 3", "answer": "Which country has at most 3 stadiums listed?\nAdditional table information: table: swimming"} -{"question": "SELECT country FROM stadium WHERE capacity > 60000 INTERSECT SELECT country FROM stadium WHERE capacity < 50000", "answer": "Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?\nAdditional table information: table: swimming"} -{"question": "SELECT COUNT(DISTINCT city) FROM stadium WHERE opening_year < 2006", "answer": "How many cities have a stadium that was opened before the year of 2006?\nAdditional table information: table: swimming"} -{"question": "SELECT country, COUNT(*) FROM stadium GROUP BY country", "answer": "How many stadiums does each country have?\nAdditional table information: table: swimming"} -{"question": "SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year > 2006", "answer": "Which countries do not have a stadium that was opened after 2006?\nAdditional table information: table: swimming"} -{"question": "SELECT COUNT(*) FROM stadium WHERE country <> 'Russia'", "answer": "How many stadiums are not in country 'Russia'?\nAdditional table information: table: swimming"} -{"question": "SELECT name FROM swimmer ORDER BY meter_100 NULLS FIRST", "answer": "Find the names of all swimmers, sorted by their 100 meter scores in ascending order.\nAdditional table information: table: swimming"} -{"question": "SELECT COUNT(DISTINCT nationality) FROM swimmer", "answer": "How many different countries are all the swimmers from?\nAdditional table information: table: swimming"} -{"question": "SELECT nationality, COUNT(*) FROM swimmer GROUP BY nationality HAVING COUNT(*) > 1", "answer": "List countries that have more than one swimmer.\nAdditional table information: table: swimming"} -{"question": "SELECT meter_200, meter_300 FROM swimmer WHERE nationality = 'Australia'", "answer": "Find all 200 meter and 300 meter results of swimmers with nationality 'Australia'.\nAdditional table information: table: swimming"} -{"question": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win'", "answer": "Find the names of swimmers who has a result of 'win'.\nAdditional table information: table: swimming"} -{"question": "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", "answer": "What is the name of the stadium which held the most events?\nAdditional table information: table: swimming"} -{"question": "SELECT t1.name, t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id WHERE t2.name = 'World Junior'", "answer": "Find the name and capacity of the stadium where the event named 'World Junior' happened.\nAdditional table information: table: swimming"} -{"question": "SELECT name FROM stadium WHERE NOT id IN (SELECT stadium_id FROM event)", "answer": "Find the names of stadiums which have never had any event.\nAdditional table information: table: swimming"} -{"question": "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", "answer": "Find the name of the swimmer who has the most records.\nAdditional table information: table: swimming"} -{"question": "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", "answer": "Find the name of the swimmer who has at least 2 records.\nAdditional table information: table: swimming"} -{"question": "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", "answer": "Find the name and nationality of the swimmer who has won (i.e., has a result of 'win') more than 1 time.\nAdditional table information: table: swimming"} -{"question": "SELECT name FROM swimmer WHERE NOT id IN (SELECT swimmer_id FROM record)", "answer": "Find the names of the swimmers who have no record.\nAdditional table information: table: swimming"} -{"question": "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'", "answer": "Find the names of the swimmers who have both 'win' and 'loss' results in the record.\nAdditional table information: table: swimming"} -{"question": "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'", "answer": "Find the names of stadiums that some Australian swimmers have been to.\nAdditional table information: table: swimming"} -{"question": "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", "answer": "Find the names of stadiums that the most swimmers have been to.\nAdditional table information: table: swimming"} -{"question": "SELECT * FROM swimmer", "answer": "Find all details for each swimmer.\nAdditional table information: table: swimming"} -{"question": "SELECT AVG(capacity) FROM stadium WHERE opening_year = 2005", "answer": "What is the average capacity of the stadiums that were opened in year 2005?\nAdditional table information: table: swimming"} -{"question": "SELECT COUNT(*) FROM railway", "answer": "How many railways are there?\nAdditional table information: table: railway"} -{"question": "SELECT Builder FROM railway ORDER BY Builder ASC NULLS FIRST", "answer": "List the builders of railways in ascending alphabetical order.\nAdditional table information: table: railway"} -{"question": "SELECT Wheels, LOCATION FROM railway", "answer": "List the wheels and locations of the railways.\nAdditional table information: table: railway"} -{"question": "SELECT MAX(LEVEL) FROM manager WHERE Country <> 'Australia\t'", "answer": "What is the maximum level of managers in countries that are not 'Australia'?\nAdditional table information: table: railway"} -{"question": "SELECT AVG(Age) FROM manager", "answer": "What is the average age for all managers?\nAdditional table information: table: railway"} -{"question": "SELECT Name FROM manager ORDER BY LEVEL ASC NULLS FIRST", "answer": "What are the names of managers in ascending order of level?\nAdditional table information: table: railway"} -{"question": "SELECT Name, Arrival FROM train", "answer": "What are the names and arrival times of trains?\nAdditional table information: table: railway"} -{"question": "SELECT Name FROM manager ORDER BY Age DESC LIMIT 1", "answer": "What is the name of the oldest manager?\nAdditional table information: table: railway"} -{"question": "SELECT T2.Name, T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID", "answer": "Show the names of trains and locations of railways they are in.\nAdditional table information: table: railway"} -{"question": "SELECT T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID WHERE T2.Name = 'Andaman Exp'", "answer": "Show the builder of railways associated with the trains named 'Andaman Exp'.\nAdditional table information: table: railway"} -{"question": "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", "answer": "Show id and location of railways that are associated with more than one train.\nAdditional table information: table: railway"} -{"question": "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", "answer": "Show the id and builder of the railway that are associated with the most trains.\nAdditional table information: table: railway"} -{"question": "SELECT Builder, COUNT(*) FROM railway GROUP BY Builder", "answer": "Show different builders of railways, along with the corresponding number of railways using each builder.\nAdditional table information: table: railway"} -{"question": "SELECT Builder FROM railway GROUP BY Builder ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common builder of railways.\nAdditional table information: table: railway"} -{"question": "SELECT LOCATION, COUNT(*) FROM railway GROUP BY LOCATION", "answer": "Show different locations of railways along with the corresponding number of railways at each location.\nAdditional table information: table: railway"} -{"question": "SELECT LOCATION FROM railway GROUP BY LOCATION HAVING COUNT(*) > 1", "answer": "Show the locations that have more than one railways.\nAdditional table information: table: railway"} -{"question": "SELECT ObjectNumber FROM railway WHERE NOT Railway_ID IN (SELECT Railway_ID FROM train)", "answer": "List the object number of railways that do not have any trains.\nAdditional table information: table: railway"} -{"question": "SELECT Country FROM manager WHERE Age > 50 INTERSECT SELECT Country FROM manager WHERE Age < 46", "answer": "Show the countries that have both managers of age above 50 and managers of age below 46.\nAdditional table information: table: railway"} -{"question": "SELECT DISTINCT Country FROM manager", "answer": "Show the distinct countries of managers.\nAdditional table information: table: railway"} -{"question": "SELECT Working_year_starts FROM manager ORDER BY LEVEL DESC", "answer": "Show the working years of managers in descending order of their level.\nAdditional table information: table: railway"} -{"question": "SELECT Country FROM manager WHERE Age > 50 OR Age < 46", "answer": "Show the countries that have managers of age above 50 or below 46.\nAdditional table information: table: railway"} -{"question": "SELECT COUNT(*) FROM addresses WHERE country = 'USA'", "answer": "How many addresses are there in country USA?\nAdditional table information: table: customers_and_products_contacts"} -{"question": "SELECT DISTINCT city FROM addresses", "answer": "Show all distinct cities in the address record.\nAdditional table information: table: customers_and_products_contacts"} -{"question": "SELECT state_province_county, COUNT(*) FROM addresses GROUP BY state_province_county", "answer": "Show each state and the number of addresses in each state.\nAdditional table information: table: customers_and_products_contacts"} -{"question": "SELECT customer_name, customer_phone FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM customer_address_history)", "answer": "Show names and phones of customers who do not have address information.\nAdditional table information: table: customers_and_products_contacts"} -{"question": "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", "answer": "Show the name of the customer who has the most orders.\nAdditional table information: table: customers_and_products_contacts"} -{"question": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING COUNT(*) >= 2", "answer": "Show the product type codes which have at least two products.\nAdditional table information: table: customers_and_products_contacts"} -{"question": "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'", "answer": "Show the names of customers who have both an order in completed status and an order in part status.\nAdditional table information: table: customers_and_products_contacts"} -{"question": "SELECT customer_name, customer_phone, payment_method_code FROM customers ORDER BY customer_number DESC", "answer": "Show the name, phone, and payment method code for all customers in descending order of customer number.\nAdditional table information: table: customers_and_products_contacts"} -{"question": "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", "answer": "Show the product name and total order quantity for each product.\nAdditional table information: table: customers_and_products_contacts"} -{"question": "SELECT MIN(product_price), MAX(product_price), AVG(product_price) FROM products", "answer": "Show the minimum, maximum, average price for all products.\nAdditional table information: table: customers_and_products_contacts"} -{"question": "SELECT COUNT(*) FROM products WHERE product_price > (SELECT AVG(product_price) FROM products)", "answer": "How many products have a price higher than the average?\nAdditional table information: table: customers_and_products_contacts"} -{"question": "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", "answer": "Show the customer name, customer address city, date from, and date to for each customer address history.\nAdditional table information: table: customers_and_products_contacts"} -{"question": "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", "answer": "Show the names of customers who use Credit Card payment method and have more than 2 orders.\nAdditional table information: table: customers_and_products_contacts"} -{"question": "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", "answer": "What are the name and phone of the customer with the most ordered product quantity?\nAdditional table information: table: customers_and_products_contacts"} -{"question": "SELECT product_type_code, product_name FROM products WHERE product_price > 1000 OR product_price < 500", "answer": "Show the product type and name for the products with price higher than 1000 or lower than 500.\nAdditional table information: table: customers_and_products_contacts"} -{"question": "SELECT dorm_name FROM dorm WHERE gender = 'F'", "answer": "Find the name of dorms only for female (F gender).\nAdditional table information: table: dorm_1"} -{"question": "SELECT dorm_name FROM dorm WHERE gender = 'F'", "answer": "What are the names of the all-female dorms?\nAdditional table information: table: dorm_1"} -{"question": "SELECT dorm_name FROM dorm WHERE student_capacity > 300", "answer": "Find the name of dorms that can accommodate more than 300 students.\nAdditional table information: table: dorm_1"} -{"question": "SELECT dorm_name FROM dorm WHERE student_capacity > 300", "answer": "What are the names of all the dorms that can accomdate more than 300 students?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*) FROM student WHERE sex = 'F' AND age < 25", "answer": "How many female students (sex is F) whose age is below 25?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*) FROM student WHERE sex = 'F' AND age < 25", "answer": "How many girl students who are younger than 25?\nAdditional table information: table: dorm_1"} -{"question": "SELECT fname FROM student WHERE age > 20", "answer": "Find the first name of students who is older than 20.\nAdditional table information: table: dorm_1"} -{"question": "SELECT fname FROM student WHERE age > 20", "answer": "What are the first names of all students who are older than 20?\nAdditional table information: table: dorm_1"} -{"question": "SELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25", "answer": "Find the first name of students living in city PHL whose age is between 20 and 25.\nAdditional table information: table: dorm_1"} -{"question": "SELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25", "answer": "What is the first name of the students who are in age 20 to 25 and living in PHL city?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*) FROM dorm", "answer": "How many dorms are there?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*) FROM dorm", "answer": "How many dorms are in the database?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*) FROM dorm_amenity", "answer": "Find the number of distinct amenities.\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*) FROM dorm_amenity", "answer": "How many diffrent dorm amenities are there?\nAdditional table information: table: dorm_1"} -{"question": "SELECT SUM(student_capacity) FROM dorm", "answer": "Find the total capacity of all dorms.\nAdditional table information: table: dorm_1"} -{"question": "SELECT SUM(student_capacity) FROM dorm", "answer": "What is the total student capacity of all dorms?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*) FROM student", "answer": "How many students are there?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*) FROM student", "answer": "How many students exist?\nAdditional table information: table: dorm_1"} -{"question": "SELECT AVG(age), city_code FROM student GROUP BY city_code", "answer": "Find the average age of all students living in the each city.\nAdditional table information: table: dorm_1"} -{"question": "SELECT AVG(age), city_code FROM student GROUP BY city_code", "answer": "What is the average age for each city and what are those cities?\nAdditional table information: table: dorm_1"} -{"question": "SELECT AVG(student_capacity), SUM(student_capacity) FROM dorm WHERE gender = 'X'", "answer": "Find the average and total capacity of dorms for the students with gender X.\nAdditional table information: table: dorm_1"} -{"question": "SELECT AVG(student_capacity), SUM(student_capacity) FROM dorm WHERE gender = 'X'", "answer": "What is the average and total capacity for all dorms who are of gender X?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(DISTINCT dormid) FROM has_amenity", "answer": "Find the number of dorms that have some amenity.\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(DISTINCT dormid) FROM has_amenity", "answer": "How many dorms have amenities?\nAdditional table information: table: dorm_1"} -{"question": "SELECT dorm_name FROM dorm WHERE NOT dormid IN (SELECT dormid FROM has_amenity)", "answer": "Find the name of dorms that do not have any amenity\nAdditional table information: table: dorm_1"} -{"question": "SELECT dorm_name FROM dorm WHERE NOT dormid IN (SELECT dormid FROM has_amenity)", "answer": "What are the names of all the dorms that don't have any amenities?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(DISTINCT gender) FROM dorm", "answer": "Find the number of distinct gender for dorms.\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(DISTINCT gender) FROM dorm", "answer": "How many different genders are there in the dorms?\nAdditional table information: table: dorm_1"} -{"question": "SELECT student_capacity, gender FROM dorm WHERE dorm_name LIKE '%Donor%'", "answer": "Find the capacity and gender type of the dorm whose name has substring \u2018Donor\u2019.\nAdditional table information: table: dorm_1"} -{"question": "SELECT student_capacity, gender FROM dorm WHERE dorm_name LIKE '%Donor%'", "answer": "What is the student capacity and type of gender for the dorm whose name as the phrase Donor in it?\nAdditional table information: table: dorm_1"} -{"question": "SELECT dorm_name, gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100", "answer": "Find the name and gender type of the dorms whose capacity is greater than 300 or less than 100.\nAdditional table information: table: dorm_1"} -{"question": "SELECT dorm_name, gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100", "answer": "What are the names and types of the dorms that have a capacity greater than 300 or less than 100?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(DISTINCT major), COUNT(DISTINCT city_code) FROM student", "answer": "Find the numbers of different majors and cities.\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(DISTINCT major), COUNT(DISTINCT city_code) FROM student", "answer": "How many different majors are there and how many different city codes are there for each student?\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "Find the name of dorms which have both TV Lounge and Study Room as amenities.\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "What is the name of the dorm with both a TV Lounge and Study Room listed as amenities?\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "Find the name of dorms which have TV Lounge but no Study Room as amenity.\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "What is the name of each dorm that has a TV Lounge but no study rooms?\nAdditional table information: table: dorm_1"} -{"question": "SELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20", "answer": "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.\nAdditional table information: table: dorm_1"} -{"question": "SELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20", "answer": "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?\nAdditional table information: table: dorm_1"} -{"question": "SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1", "answer": "Find the name of the dorm with the largest capacity.\nAdditional table information: table: dorm_1"} -{"question": "SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1", "answer": "What are the names of the dorm with the largest capacity?\nAdditional table information: table: dorm_1"} -{"question": "SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name NULLS FIRST", "answer": "List in alphabetic order all different amenities.\nAdditional table information: table: dorm_1"} -{"question": "SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name NULLS FIRST", "answer": "What are the different dorm amenity names in alphabetical order?\nAdditional table information: table: dorm_1"} -{"question": "SELECT city_code FROM student GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the code of city where most of students are living in.\nAdditional table information: table: dorm_1"} -{"question": "SELECT city_code FROM student GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the code of the city with the most students?\nAdditional table information: table: dorm_1"} -{"question": "SELECT fname, lname FROM student WHERE age < (SELECT AVG(age) FROM student)", "answer": "Find the first and last name of students whose age is younger than the average age.\nAdditional table information: table: dorm_1"} -{"question": "SELECT fname, lname FROM student WHERE age < (SELECT AVG(age) FROM student)", "answer": "What is the first and last name of all students who are younger than average?\nAdditional table information: table: dorm_1"} -{"question": "SELECT fname, lname FROM student WHERE city_code <> 'HKG' ORDER BY age NULLS FIRST", "answer": "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.\nAdditional table information: table: dorm_1"} -{"question": "SELECT fname, lname FROM student WHERE city_code <> 'HKG' ORDER BY age NULLS FIRST", "answer": "What are the first and last names of all students who are not living in the city HKG and order the results by age?\nAdditional table information: table: dorm_1"} -{"question": "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 NULLS FIRST", "answer": "List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order.\nAdditional table information: table: dorm_1"} -{"question": "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 NULLS FIRST", "answer": "What are the amenities in alphabetical order that Anonymous Donor Hall has?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*), SUM(student_capacity), gender FROM dorm GROUP BY gender", "answer": "Find the number of dorms and total capacity for each gender.\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*), SUM(student_capacity), gender FROM dorm GROUP BY gender", "answer": "How many dorms are there and what is the total capacity for each gender?\nAdditional table information: table: dorm_1"} -{"question": "SELECT AVG(age), MAX(age), sex FROM student GROUP BY sex", "answer": "Find the average and oldest age for students with different sex.\nAdditional table information: table: dorm_1"} -{"question": "SELECT AVG(age), MAX(age), sex FROM student GROUP BY sex", "answer": "What is the average and oldest age for each gender of student?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*), major FROM student GROUP BY major", "answer": "Find the number of students in each major.\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*), major FROM student GROUP BY major", "answer": "How many students are there in each major?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*), AVG(age), city_code FROM student GROUP BY city_code", "answer": "Find the number and average age of students living in each city.\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*), AVG(age), city_code FROM student GROUP BY city_code", "answer": "How many students live in each city and what are their average ages?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*), AVG(age), city_code FROM student WHERE sex = 'M' GROUP BY city_code", "answer": "Find the average age and number of male students (with sex M) from each city.\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*), AVG(age), city_code FROM student WHERE sex = 'M' GROUP BY city_code", "answer": "What is the average age and how many male students are there in each city?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*), city_code FROM student GROUP BY city_code HAVING COUNT(*) > 1", "answer": "Find the number of students for the cities where have more than one student.\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*), city_code FROM student GROUP BY city_code HAVING COUNT(*) > 1", "answer": "How many students are from each city, and which cities have more than one cities?\nAdditional table information: table: dorm_1"} -{"question": "SELECT fname, lname FROM student WHERE major <> (SELECT major FROM student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "Find the first and last name of students who are not in the largest major.\nAdditional table information: table: dorm_1"} -{"question": "SELECT fname, lname FROM student WHERE major <> (SELECT major FROM student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "What is the first and last name of the students who are not in the largest major?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*), sex FROM student WHERE age > (SELECT AVG(age) FROM student) GROUP BY sex", "answer": "Find the number of students whose age is older than the average age for each gender.\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*), sex FROM student WHERE age > (SELECT AVG(age) FROM student) GROUP BY sex", "answer": "How many students are older than average for each gender?\nAdditional table information: table: dorm_1"} -{"question": "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", "answer": "Find the average age of students living in each dorm and the name of dorm.\nAdditional table information: table: dorm_1"} -{"question": "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", "answer": "What is the average age for each dorm and what are the names of each dorm?\nAdditional table information: table: dorm_1"} -{"question": "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", "answer": "Find the number of amenities for each of the dorms that can accommodate more than 100 students.\nAdditional table information: table: dorm_1"} -{"question": "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", "answer": "For each dorm, how many amenities does it have?\nAdditional table information: table: dorm_1"} -{"question": "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", "answer": "Find the number of students who is older than 20 in each dorm.\nAdditional table information: table: dorm_1"} -{"question": "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", "answer": "How many students are older than 20 in each dorm?\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "Find the first name of students who are living in the Smith Hall.\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "What are the first names of all students in Smith Hall?\nAdditional table information: table: dorm_1"} -{"question": "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)", "answer": "Find the average age of students who are living in the dorm with the largest capacity.\nAdditional table information: table: dorm_1"} -{"question": "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)", "answer": "What is the average age of students who are living in the dorm with the largest capacity?\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "Find the total number of students living in the male dorm (with gender M).\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "What are the total number of students who are living in a male dorm?\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "Find the number of female students (with F sex) living in Smith Hall\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "How many female students live in Smith Hall?\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "Find the name of amenities Smith Hall dorm have.\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "What are the names of the amenities that Smith Hall has?\nAdditional table information: table: dorm_1"} -{"question": "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 NULLS FIRST", "answer": "Find the name of amenities Smith Hall dorm have. ordered the results by amenity names.\nAdditional table information: table: dorm_1"} -{"question": "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 NULLS FIRST", "answer": "What amenities does Smith Hall have in alphabetical order?\nAdditional table information: table: dorm_1"} -{"question": "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", "answer": "Find the name of amenity that is most common in all dorms.\nAdditional table information: table: dorm_1"} -{"question": "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", "answer": "What is the most common amenity in the dorms?\nAdditional table information: table: dorm_1"} -{"question": "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)", "answer": "Find the first name of students who are living in the dorm that has most number of amenities.\nAdditional table information: table: dorm_1"} -{"question": "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)", "answer": "What are the first names of all students who live in the dorm with the most amenities?\nAdditional table information: table: dorm_1"} -{"question": "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(*) NULLS FIRST LIMIT 1", "answer": "Find the name and capacity of the dorm with least number of amenities.\nAdditional table information: table: dorm_1"} -{"question": "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(*) NULLS FIRST LIMIT 1", "answer": "What is the name and capacity of the dorm with the fewest amount of amenities?\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "Find the name of dorms that do not have amenity TV Lounge.\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "What are the names of the dorm that does not have a TV Lounge?\nAdditional table information: table: dorm_1"} -{"question": "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')", "answer": "Find the first and last name of students who are living in the dorms that have amenity TV Lounge.\nAdditional table information: table: dorm_1"} -{"question": "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')", "answer": "What are the first and last names of all students who are living in a dorm with a TV Lounge?\nAdditional table information: table: dorm_1"} -{"question": "SELECT T1.fname, T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE NOT 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')", "answer": "Find the first name and age of students who are living in the dorms that do not have amenity TV Lounge.\nAdditional table information: table: dorm_1"} -{"question": "SELECT T1.fname, T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE NOT 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')", "answer": "What is the first name and age of every student who lives in a dorm with a TV Lounge?\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "Find the name of amenities of the dorm where the student with last name Smith is living in.\nAdditional table information: table: dorm_1"} -{"question": "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'", "answer": "What are the amenities in the dorm that a student who has the last name of Smith lives in?\nAdditional table information: table: dorm_1"} -{"question": "SELECT COUNT(*) FROM customers", "answer": "How many customers are there?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT COUNT(*) FROM customers", "answer": "Count the number of customers.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT email_address, phone_number FROM customers ORDER BY email_address NULLS FIRST, phone_number NULLS FIRST", "answer": "Find the emails and phone numbers of all the customers, ordered by email address and phone number.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT email_address, phone_number FROM customers ORDER BY email_address NULLS FIRST, phone_number NULLS FIRST", "answer": "What are the emails and phone numbers of all customers, sorted by email address and phone number?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT town_city FROM customers WHERE customer_type_code = 'Good Credit Rating' GROUP BY town_city ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Which city has the least number of customers whose type code is 'Good Credit Rating'?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT town_city FROM customers WHERE customer_type_code = 'Good Credit Rating' GROUP BY town_city ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Return the city with the customer type code 'Good Credit Rating' that had the fewest customers.\nAdditional table information: table: customer_complaints"} -{"question": "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", "answer": "List the name of all products along with the number of complaints that they have received.\nAdditional table information: table: customer_complaints"} -{"question": "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", "answer": "What are all the different product names, and how many complains has each received?\nAdditional table information: table: customer_complaints"} -{"question": "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(*) NULLS FIRST LIMIT 1", "answer": "Find the emails of customers who has filed a complaints of the product with the most complaints.\nAdditional table information: table: customer_complaints"} -{"question": "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(*) NULLS FIRST LIMIT 1", "answer": "What are the emails of customers who have filed complaints on the product which has had the greatest number of complaints?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id, customers AS t3 GROUP BY t3.customer_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Which products has been complained by the customer who has filed least amount of complaints?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id, customers AS t3 GROUP BY t3.customer_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Return the names of products that have had complaints filed by the customer who has filed the fewest complaints.\nAdditional table information: table: customer_complaints"} -{"question": "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", "answer": "What is the phone number of the customer who has filed the most recent complaint?\nAdditional table information: table: customer_complaints"} -{"question": "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", "answer": "Return the phone number of the customer who filed the complaint that was raised most recently.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT email_address, phone_number FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM complaints)", "answer": "Find the email and phone number of the customers who have never filed a complaint before.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT email_address, phone_number FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM complaints)", "answer": "What are the emails and phone numbers of custoemrs who have never filed a complaint?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff", "answer": "Find the phone number of all the customers and staff.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff", "answer": "What are the phone numbers of all customers and all staff members?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT product_description FROM products WHERE product_name = 'Chocolate'", "answer": "What is the description of the product named 'Chocolate'?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT product_description FROM products WHERE product_name = 'Chocolate'", "answer": "Return the description of the product called 'Chocolate'.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT product_name, product_category_code FROM products ORDER BY product_price DESC LIMIT 1", "answer": "Find the name and category of the most expensive product.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT product_name, product_category_code FROM products ORDER BY product_price DESC LIMIT 1", "answer": "What is the name and category code of the product with the highest price?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT product_price FROM products WHERE NOT product_id IN (SELECT product_id FROM complaints)", "answer": "Find the prices of products which has never received a single complaint.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT product_price FROM products WHERE NOT product_id IN (SELECT product_id FROM complaints)", "answer": "What are the prices of products that have never gotten a complaint?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT AVG(product_price), product_category_code FROM products GROUP BY product_category_code", "answer": "What is the average price of the products for each category?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT AVG(product_price), product_category_code FROM products GROUP BY product_category_code", "answer": "Return the average price of products that have each category code.\nAdditional table information: table: customer_complaints"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Find the last name of the staff member who processed the complaint of the cheapest product.\nAdditional table information: table: customer_complaints"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the last name of the staff member in charge of the complaint on the product with the lowest price?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING COUNT(*) > 3", "answer": "Which complaint status has more than 3 records on file?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING COUNT(*) > 3", "answer": "Return complaint status codes have more than 3 corresponding complaints?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT last_name FROM staff WHERE email_address LIKE '%wrau%'", "answer": "Find the last name of the staff whose email address contains 'wrau'.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT last_name FROM staff WHERE email_address LIKE '%wrau%'", "answer": "What are the last names of staff with email addressed containing the substring 'wrau'?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT COUNT(*) FROM customers GROUP BY customer_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "How many customers are there in the customer type with the most customers?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT COUNT(*) FROM customers GROUP BY customer_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Count the number of customers that have the customer type that is most common.\nAdditional table information: table: customer_complaints"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the last name of the staff who has handled the first ever complaint?\nAdditional table information: table: customer_complaints"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Return the last name of the staff member who handled the complaint with the earliest date raised.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT COUNT(DISTINCT complaint_type_code) FROM complaints", "answer": "How many distinct complaint type codes are there in the database?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT COUNT(DISTINCT complaint_type_code) FROM complaints", "answer": "Count the number of different complaint type codes.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT address_line_1, address_line_2 FROM customers WHERE email_address = 'vbogisich@example.org'", "answer": "Find the address line 1 and 2 of the customer with email 'vbogisich@example.org'.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT address_line_1, address_line_2 FROM customers WHERE email_address = 'vbogisich@example.org'", "answer": "What are lines 1 and 2 of the addressed of the customer with the email 'vbogisich@example.org'?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = 'Product Failure' GROUP BY complaint_status_code", "answer": "Find the number of complaints with Product Failure type for each complaint status.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = 'Product Failure' GROUP BY complaint_status_code", "answer": "Of complaints with the type code 'Product Failure', how many had each different status code?\nAdditional table information: table: customer_complaints"} -{"question": "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(*) NULLS FIRST LIMIT 5", "answer": "What is first names of the top 5 staff who have handled the greatest number of complaints?\nAdditional table information: table: customer_complaints"} -{"question": "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(*) NULLS FIRST LIMIT 5", "answer": "Return the first names of the 5 staff members who have handled the most complaints.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Which state has the most customers?\nAdditional table information: table: customer_complaints"} -{"question": "SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Give the state that has the most customers.\nAdditional table information: table: customer_complaints"} -{"question": "SELECT COUNT(*) FROM submission", "answer": "How many submissions are there?\nAdditional table information: table: workshop_paper"} -{"question": "SELECT COUNT(*) FROM submission", "answer": "Count the number of submissions.\nAdditional table information: table: workshop_paper"} -{"question": "SELECT Author FROM submission ORDER BY Scores ASC NULLS FIRST", "answer": "List the authors of submissions in ascending order of scores.\nAdditional table information: table: workshop_paper"} -{"question": "SELECT Author FROM submission ORDER BY Scores ASC NULLS FIRST", "answer": "Find the author for each submission and list them in ascending order of submission score.\nAdditional table information: table: workshop_paper"} -{"question": "SELECT Author, College FROM submission", "answer": "What are the authors of submissions and their colleges?\nAdditional table information: table: workshop_paper"} -{"question": "SELECT Author, College FROM submission", "answer": "For each submission, show the author and their affiliated college.\nAdditional table information: table: workshop_paper"} -{"question": "SELECT Author FROM submission WHERE College = 'Florida' OR College = 'Temple'", "answer": "Show the names of authors from college 'Florida' or 'Temple'\nAdditional table information: table: workshop_paper"} -{"question": "SELECT Author FROM submission WHERE College = 'Florida' OR College = 'Temple'", "answer": "Which authors with submissions are from college 'Florida' or 'Temple'?\nAdditional table information: table: workshop_paper"} -{"question": "SELECT AVG(Scores) FROM submission", "answer": "What is the average score of submissions?\nAdditional table information: table: workshop_paper"} -{"question": "SELECT AVG(Scores) FROM submission", "answer": "Compute the average score of submissions.\nAdditional table information: table: workshop_paper"} -{"question": "SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1", "answer": "What is the author of the submission with the highest score?\nAdditional table information: table: workshop_paper"} -{"question": "SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1", "answer": "Find the author who achieved the highest score in a submission.\nAdditional table information: table: workshop_paper"} -{"question": "SELECT College, COUNT(*) FROM submission GROUP BY College", "answer": "Show different colleges along with the number of authors of submission from each college.\nAdditional table information: table: workshop_paper"} -{"question": "SELECT College, COUNT(*) FROM submission GROUP BY College", "answer": "For each college, return the college name and the count of authors with submissions from that college.\nAdditional table information: table: workshop_paper"} -{"question": "SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common college of authors of submissions.\nAdditional table information: table: workshop_paper"} -{"question": "SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which college has the most authors with submissions?\nAdditional table information: table: workshop_paper"} -{"question": "SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80", "answer": "Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80.\nAdditional table information: table: workshop_paper"} -{"question": "SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80", "answer": "Which colleges have both authors with submission score above 90 and authors with submission score below 80?\nAdditional table information: table: workshop_paper"} -{"question": "SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID", "answer": "Show the authors of submissions and the acceptance results of their submissions.\nAdditional table information: table: workshop_paper"} -{"question": "SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID", "answer": "For each submission, find its author and acceptance result.\nAdditional table information: table: workshop_paper"} -{"question": "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", "answer": "Show the result of the submission with the highest score.\nAdditional table information: table: workshop_paper"} -{"question": "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", "answer": "Which submission received the highest score in acceptance result. Show me the result.\nAdditional table information: table: workshop_paper"} -{"question": "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", "answer": "Show each author and the number of workshops they submitted to.\nAdditional table information: table: workshop_paper"} -{"question": "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", "answer": "How many workshops did each author submit to? Return the author name and the number of workshops.\nAdditional table information: table: workshop_paper"} -{"question": "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", "answer": "Show the authors who have submissions to more than one workshop.\nAdditional table information: table: workshop_paper"} -{"question": "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", "answer": "Which authors have submitted to more than one workshop?\nAdditional table information: table: workshop_paper"} -{"question": "SELECT Date, Venue FROM workshop ORDER BY Venue NULLS FIRST", "answer": "Show the date and venue of each workshop in ascending alphabetical order of the venue.\nAdditional table information: table: workshop_paper"} -{"question": "SELECT Date, Venue FROM workshop ORDER BY Venue NULLS FIRST", "answer": "Sort the each workshop in alphabetical order of the venue. Return the date and venue of each workshop.\nAdditional table information: table: workshop_paper"} -{"question": "SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance)", "answer": "List the authors who do not have submission to any workshop.\nAdditional table information: table: workshop_paper"} -{"question": "SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance)", "answer": "Which authors did not submit to any workshop?\nAdditional table information: table: workshop_paper"} -{"question": "SELECT COUNT(*) FROM INVESTORS", "answer": "Find the number of investors in total.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT Investor_details FROM INVESTORS", "answer": "Show all investor details.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT DISTINCT lot_details FROM LOTS", "answer": "Show all distinct lot details.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT MAX(amount_of_transaction) FROM TRANSACTIONS", "answer": "Show the maximum amount of transaction.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT date_of_transaction, share_count FROM TRANSACTIONS", "answer": "Show all date and share count of transactions.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT SUM(share_count) FROM TRANSACTIONS", "answer": "What is the total share of transactions?\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR'", "answer": "Show all transaction ids with transaction code 'PUR'.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = 'SALE'", "answer": "Show all dates of transactions whose type code is 'SALE'.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT AVG(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = 'SALE'", "answer": "Show the average amount of transactions with type code 'SALE'.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code = 'PUR'", "answer": "Show the description of transaction type with code 'PUR'.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT MIN(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = 'PUR' AND share_count > 50", "answer": "Show the minimum amount of transactions whose type code is 'PUR' and whose share count is bigger than 50.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT MAX(share_count) FROM TRANSACTIONS WHERE amount_of_transaction < 10000", "answer": "Show the maximum share count of transactions where the amount is smaller than 10000\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000", "answer": "Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000.\nAdditional table information: table: tracking_share_transactions"} -{"question": "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", "answer": "Show the transaction type descriptions and dates if the share count is smaller than 10.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100", "answer": "Show details of all investors if they make any transaction with share count greater than 100.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS", "answer": "How many distinct transaction types are used in the transactions?\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT lot_details, investor_id FROM LOTS", "answer": "Return the lot details and investor ids.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = 'l'", "answer": "Return the lot details of lots that belong to investors with details 'l'?\nAdditional table information: table: tracking_share_transactions"} -{"question": "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", "answer": "What are the purchase details of transactions with amount bigger than 10000?\nAdditional table information: table: tracking_share_transactions"} -{"question": "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", "answer": "What are the sale details and dates of transactions with amount smaller than 3000?\nAdditional table information: table: tracking_share_transactions"} -{"question": "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", "answer": "What are the lot details of lots associated with transactions with share count smaller than 50?\nAdditional table information: table: tracking_share_transactions"} -{"question": "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'", "answer": "What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is 'PUR'?\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT transaction_type_code, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code", "answer": "Show the average transaction amount for different transaction types.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT transaction_type_code, MAX(share_count), MIN(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code", "answer": "Show the maximum and minimum share count of different transaction types.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id", "answer": "Show the average share count of transactions for different investors.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY AVG(share_count) NULLS FIRST", "answer": "Show the average share count of transactions each each investor, ordered by average share count.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT investor_id, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id", "answer": "Show the average amount of transactions for different investors.\nAdditional table information: table: tracking_share_transactions"} -{"question": "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", "answer": "Show the average amount of transactions for different lots.\nAdditional table information: table: tracking_share_transactions"} -{"question": "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) NULLS FIRST", "answer": "Show the average amount of transactions for different lots, ordered by average amount of transactions.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT investor_id, COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = 'SALE' GROUP BY investor_id", "answer": "Show the number of transactions with transaction type code 'SALE' for different investors if it is larger than 0.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT investor_id, COUNT(*) FROM TRANSACTIONS GROUP BY investor_id", "answer": "Show the number of transactions for different investors.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Show the transaction type code that occurs the fewest times.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the transaction type code that occurs the most frequently.\nAdditional table information: table: tracking_share_transactions"} -{"question": "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", "answer": "Show the description of the transaction type that occurs most frequently.\nAdditional table information: table: tracking_share_transactions"} -{"question": "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", "answer": "Show the id and details of the investor that has the largest number of transactions.\nAdditional table information: table: tracking_share_transactions"} -{"question": "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", "answer": "Show the id and details for the investors who have the top 3 number of transactions.\nAdditional table information: table: tracking_share_transactions"} -{"question": "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", "answer": "Show the ids of the investors who have at least two transactions.\nAdditional table information: table: tracking_share_transactions"} -{"question": "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", "answer": "Show the ids and details of the investors who have at least two transactions with type code 'SALE'.\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100", "answer": "What are the dates of transactions with at least 100 share count or amount bigger than 100?\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases", "answer": "What are the details of all sales and purchases?\nAdditional table information: table: tracking_share_transactions"} -{"question": "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", "answer": "What are the details of the lots which are not used in any transactions?\nAdditional table information: table: tracking_share_transactions"} -{"question": "SELECT COUNT(*) FROM HOTELS", "answer": "How many available hotels are there in total?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT COUNT(*) FROM HOTELS", "answer": "Find the total number of available hotels.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT price_range FROM HOTELS", "answer": "What are the price ranges of hotels?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT price_range FROM HOTELS", "answer": "Tell me the price ranges for all the hotels.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT DISTINCT Location_Name FROM LOCATIONS", "answer": "Show all distinct location names.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT DISTINCT Location_Name FROM LOCATIONS", "answer": "What are the distinct location names?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT Name, Other_Details FROM Staff", "answer": "Show the names and details of all the staff members.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT Name, Other_Details FROM Staff", "answer": "What is the name and detail of each staff member?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT Tourist_Details FROM VISITORS", "answer": "Show details of all visitors.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT Tourist_Details FROM VISITORS", "answer": "What is the detail of each visitor?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT price_range FROM HOTELS WHERE star_rating_code = '5'", "answer": "Show the price ranges of hotels with 5 star ratings.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT price_range FROM HOTELS WHERE star_rating_code = '5'", "answer": "What are the price ranges of five star hotels?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = '5' AND pets_allowed_yn = 1", "answer": "Show the average price range of hotels that have 5 star ratings and allow pets.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = '5' AND pets_allowed_yn = 1", "answer": "What is the average price range of five star hotels that allow pets?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT Address FROM LOCATIONS WHERE Location_Name = 'UK Gallery'", "answer": "What is the address of the location 'UK Gallery'?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT Address FROM LOCATIONS WHERE Location_Name = 'UK Gallery'", "answer": "Find the address of the location named 'UK Gallery'.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT Other_Details FROM LOCATIONS WHERE Location_Name = 'UK Gallery'", "answer": "What is the detail of the location UK Gallery?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT Other_Details FROM LOCATIONS WHERE Location_Name = 'UK Gallery'", "answer": "Return the detail of the location named 'UK Gallery'.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE '%film%'", "answer": "Which location names contain the word 'film'?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE '%film%'", "answer": "Find all the locations whose names contain the word 'film'.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT COUNT(DISTINCT Name) FROM PHOTOS", "answer": "How many distinct names are associated with all the photos?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT COUNT(DISTINCT Name) FROM PHOTOS", "answer": "Count the number of distinct names associated with the photos.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT DISTINCT Visit_Date FROM VISITS", "answer": "What are the distinct visit dates?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT DISTINCT Visit_Date FROM VISITS", "answer": "Find all the distinct visit dates.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus'", "answer": "What are the names of the tourist attractions that can be accessed by bus?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus'", "answer": "Which tourist attractions can we get to by bus? Tell me the names of the attractions.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus' OR How_to_Get_There = 'walk'", "answer": "What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus' OR How_to_Get_There = 'walk'", "answer": "Find the names and opening hours of the tourist attractions that we get to by bus or walk.\nAdditional table information: table: cre_Theme_park"} -{"question": "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", "answer": "What are the star rating descriptions of the hotels with price above 10000?\nAdditional table information: table: cre_Theme_park"} -{"question": "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", "answer": "Give me the star rating descriptions of the hotels that cost more than 10000.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID", "answer": "What are the details and opening hours of the museums?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID", "answer": "Give me the detail and opening hour for each museum.\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "What is the name of the tourist attraction that is associated with the photo 'game1'?\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "Which tourist attraction is associated with the photo 'game1'? Return its name.\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "What are the names and descriptions of the photos taken at the tourist attraction 'film festival'?\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "Find the names and descriptions of the photos taken at the tourist attraction called 'film festival'.\nAdditional table information: table: cre_Theme_park"} -{"question": "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", "answer": "What are the details and ways to get to tourist attractions related to royal family?\nAdditional table information: table: cre_Theme_park"} -{"question": "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", "answer": "Which tourist attractions are related to royal family? Tell me their details and how we can get there.\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "What are the details of the shops that can be accessed by walk?\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "Find the details of the shops that can be reached by walk.\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "What is the name of the staff that is in charge of the attraction named 'US museum'?\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "Tell me the name of the staff in charge of the attraction called 'US museum'.\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "What are the details of the markets that can be accessed by walk or bus?\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "Find the details of all the markets that are accessible by walk or bus.\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "What are the visit date and details of the visitor whose detail is 'Vincent'?\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "Find the visit date and details of the tourist whose detail is 'Vincent'\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "Which tourist attractions does the visitor with detail 'Vincent' visit?\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "Show the tourist attractions visited by the tourist whose detail is 'Vincent'.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1, 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'", "answer": "What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1, 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'", "answer": "For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code", "answer": "Show the average price of hotels for each star rating code.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code", "answer": "What is the average price range of hotels for each each star rating code?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT pets_allowed_yn, AVG(price_range) FROM HOTELS GROUP BY pets_allowed_yn", "answer": "Show the average price of hotels for different pet policy.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT pets_allowed_yn, AVG(price_range) FROM HOTELS GROUP BY pets_allowed_yn", "answer": "What are the average prices of hotels grouped by their pet policy.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST", "answer": "Show the id and star rating of each hotel, ordered by its price from low to high.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST", "answer": "Find the id and star rating of each hotel and sort them in increasing order of price.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3", "answer": "Show the details of the top 3 most expensive hotels.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3", "answer": "What are the details of the three most expensive hotels?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST LIMIT 3", "answer": "Show the details and star ratings of the 3 least expensive hotels.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST LIMIT 3", "answer": "What are the details and star ratings of the three hotels with the lowest price ranges?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the transportation method most people choose to get to tourist attractions.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which transportation method is used the most often to get to tourist attractions?\nAdditional table information: table: cre_Theme_park"} -{"question": "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", "answer": "Show the description and code of the attraction type most tourist attractions belong to.\nAdditional table information: table: cre_Theme_park"} -{"question": "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", "answer": "Which attraction type does the most tourist attractions belong to? Tell me its attraction type description and code.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There", "answer": "Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There", "answer": "List all the possible ways to get to attractions, together with the number of attractions accessible by these methods.\nAdditional table information: table: cre_Theme_park"} -{"question": "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", "answer": "Show different tourist attractions' names, ids, and the corresponding number of visits.\nAdditional table information: table: cre_Theme_park"} -{"question": "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", "answer": "What are the name, id and the corresponding number of visits for each tourist attraction?\nAdditional table information: table: cre_Theme_park"} -{"question": "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", "answer": "Show the names and ids of tourist attractions that are visited at least two times.\nAdditional table information: table: cre_Theme_park"} -{"question": "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", "answer": "Which tourist attractions are visited at least twice? Give me their names and ids.\nAdditional table information: table: cre_Theme_park"} -{"question": "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", "answer": "Show the names and ids of tourist attractions that are visited at most once.\nAdditional table information: table: cre_Theme_park"} -{"question": "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", "answer": "What are the names and ids of the tourist attractions that are visited at most once?\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "What are the names of the tourist attractions that have parking or shopping as their feature details?\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?\nAdditional table information: table: cre_Theme_park"} -{"question": "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'", "answer": "Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT T1.Name FROM Tourist_Attractions AS T1, 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, 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'", "answer": "What are the names of the tourist attractions Vincent and Marcelle visit?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT T1.Name FROM Tourist_Attractions AS T1, 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, 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'", "answer": "Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT T1.Name FROM Tourist_Attractions AS T1, 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, 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'", "answer": "What are the names of tourist attraction that Alison visited but Rosalind did not visit?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT T1.Name FROM Tourist_Attractions AS T1, 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, 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'", "answer": "Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT COUNT(*) FROM Visitors WHERE NOT Tourist_ID IN (SELECT Tourist_ID FROM Visits)", "answer": "How many tourists did not make any visit?\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT COUNT(*) FROM Visitors WHERE NOT Tourist_ID IN (SELECT Tourist_ID FROM Visits)", "answer": "Count the number of tourists who did not visit any place.\nAdditional table information: table: cre_Theme_park"} -{"question": "SELECT COUNT(*) FROM Video_games", "answer": "How many video games exist?\nAdditional table information: table: game_1"} -{"question": "SELECT COUNT(*) FROM Video_games", "answer": "How many video games do you have?\nAdditional table information: table: game_1"} -{"question": "SELECT COUNT(DISTINCT gtype) FROM Video_games", "answer": "How many video game types exist?\nAdditional table information: table: game_1"} -{"question": "SELECT COUNT(DISTINCT gtype) FROM Video_games", "answer": "What is the count of different game types?\nAdditional table information: table: game_1"} -{"question": "SELECT DISTINCT gtype FROM Video_games", "answer": "Show all video game types.\nAdditional table information: table: game_1"} -{"question": "SELECT DISTINCT gtype FROM Video_games", "answer": "What are the different types of video games?\nAdditional table information: table: game_1"} -{"question": "SELECT gname, gtype FROM Video_games ORDER BY gname NULLS FIRST", "answer": "Show all video games and their types in the order of their names.\nAdditional table information: table: game_1"} -{"question": "SELECT gname, gtype FROM Video_games ORDER BY gname NULLS FIRST", "answer": "What are the names of all the video games and their types in alphabetical order?\nAdditional table information: table: game_1"} -{"question": "SELECT gname FROM Video_games WHERE gtype = 'Collectible card game'", "answer": "Show all video games with type Collectible card game.\nAdditional table information: table: game_1"} -{"question": "SELECT gname FROM Video_games WHERE gtype = 'Collectible card game'", "answer": "What are the names of all video games that are collectible cards?\nAdditional table information: table: game_1"} -{"question": "SELECT gtype FROM Video_games WHERE gname = 'Call of Destiny'", "answer": "What is the type of video game Call of Destiny.\nAdditional table information: table: game_1"} -{"question": "SELECT gtype FROM Video_games WHERE gname = 'Call of Destiny'", "answer": "What type of game is Call of Destiny?\nAdditional table information: table: game_1"} -{"question": "SELECT COUNT(*) FROM Video_games WHERE gtype = 'Massively multiplayer online game'", "answer": "How many video games have type Massively multiplayer online game?\nAdditional table information: table: game_1"} -{"question": "SELECT COUNT(*) FROM Video_games WHERE gtype = 'Massively multiplayer online game'", "answer": "Count the number of video games with Massively multiplayer online game type .\nAdditional table information: table: game_1"} -{"question": "SELECT gtype, COUNT(*) FROM Video_games GROUP BY gtype", "answer": "Show all video game types and the number of video games in each type.\nAdditional table information: table: game_1"} -{"question": "SELECT gtype, COUNT(*) FROM Video_games GROUP BY gtype", "answer": "What are the types of video games and how many are in each type?\nAdditional table information: table: game_1"} -{"question": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which game type has most number of games?\nAdditional table information: table: game_1"} -{"question": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What type has the most games?\nAdditional table information: table: game_1"} -{"question": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Which game type has least number of games?\nAdditional table information: table: game_1"} -{"question": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "What is the type with the fewest games?\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Student WHERE city_code = 'CHI'", "answer": "Show ids for all students who live in CHI.\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Student WHERE city_code = 'CHI'", "answer": "What are the ids of all students who live in CHI?\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Student WHERE Advisor = 1121", "answer": "Show ids for all students who have advisor 1121.\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Student WHERE Advisor = 1121", "answer": "What are the ids of all students who have advisor number 1121?\nAdditional table information: table: game_1"} -{"question": "SELECT Fname FROM Student WHERE Major = 600", "answer": "Show first name for all students with major 600.\nAdditional table information: table: game_1"} -{"question": "SELECT Fname FROM Student WHERE Major = 600", "answer": "What are the first names for all students who are from the major numbered 600?\nAdditional table information: table: game_1"} -{"question": "SELECT major, AVG(age), MIN(age), MAX(age) FROM Student GROUP BY major", "answer": "Show the average, minimum, and maximum age for different majors.\nAdditional table information: table: game_1"} -{"question": "SELECT major, AVG(age), MIN(age), MAX(age) FROM Student GROUP BY major", "answer": "What are the average, minimum, and max ages for each of the different majors?\nAdditional table information: table: game_1"} -{"question": "SELECT advisor FROM Student GROUP BY advisor HAVING COUNT(*) >= 2", "answer": "Show all advisors who have at least two students.\nAdditional table information: table: game_1"} -{"question": "SELECT advisor FROM Student GROUP BY advisor HAVING COUNT(*) >= 2", "answer": "What are the advisors\nAdditional table information: table: game_1"} -{"question": "SELECT COUNT(DISTINCT sportname) FROM Sportsinfo", "answer": "How many sports do we have?\nAdditional table information: table: game_1"} -{"question": "SELECT COUNT(DISTINCT sportname) FROM Sportsinfo", "answer": "How many different types of sports do we offer?\nAdditional table information: table: game_1"} -{"question": "SELECT COUNT(DISTINCT StuID) FROM Sportsinfo", "answer": "How many students play sports?\nAdditional table information: table: game_1"} -{"question": "SELECT COUNT(DISTINCT StuID) FROM Sportsinfo", "answer": "How many different students are involved in sports?\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'", "answer": "List ids for all student who are on scholarship.\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'", "answer": "What are the ids for all sporty students who are on scholarship?\nAdditional table information: table: game_1"} -{"question": "SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'", "answer": "Show last names for all student who are on scholarship.\nAdditional table information: table: game_1"} -{"question": "SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'", "answer": "What are the last names for all scholarship students?\nAdditional table information: table: game_1"} -{"question": "SELECT SUM(gamesplayed) FROM Sportsinfo", "answer": "How many games are played for all students?\nAdditional table information: table: game_1"} -{"question": "SELECT SUM(gamesplayed) FROM Sportsinfo", "answer": "What is the total number of games played?\nAdditional table information: table: game_1"} -{"question": "SELECT SUM(gamesplayed) FROM Sportsinfo WHERE sportname = 'Football' AND onscholarship = 'Y'", "answer": "How many games are played for all football games by students on scholarship?\nAdditional table information: table: game_1"} -{"question": "SELECT SUM(gamesplayed) FROM Sportsinfo WHERE sportname = 'Football' AND onscholarship = 'Y'", "answer": "What is the total number of all football games played by scholarship students?\nAdditional table information: table: game_1"} -{"question": "SELECT sportname, COUNT(*) FROM Sportsinfo GROUP BY sportname", "answer": "Show all sport name and the number of students.\nAdditional table information: table: game_1"} -{"question": "SELECT sportname, COUNT(*) FROM Sportsinfo GROUP BY sportname", "answer": "How many students play each sport?\nAdditional table information: table: game_1"} -{"question": "SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID", "answer": "Show all student IDs with the number of sports and total number of games played\nAdditional table information: table: game_1"} -{"question": "SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID", "answer": "What are the ids of all students along with how many sports and games did they play?\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM(hoursperweek) > 10", "answer": "Show all student IDs with more than total 10 hours per week on all sports played.\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM(hoursperweek) > 10", "answer": "What are the student IDs for everybody who worked for more than 10 hours per week on all sports?\nAdditional table information: table: game_1"} -{"question": "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", "answer": "What is the first name and last name of the student who have most number of sports?\nAdditional table information: table: game_1"} -{"question": "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", "answer": "What is the first and last name of the student who played the most sports?\nAdditional table information: table: game_1"} -{"question": "SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which sport has most number of students on scholarship?\nAdditional table information: table: game_1"} -{"question": "SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the sport with the most scholarship students?\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo", "answer": "Show student ids who don't have any sports.\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo", "answer": "What are the ids of all students who don't play sports?\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'", "answer": "Show student ids who are on scholarship and have major 600.\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'", "answer": "What are the student ids for those on scholarship in major number 600?\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football'", "answer": "Show student ids who are female and play football.\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football'", "answer": "What are the ids of all female students who play football?\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football'", "answer": "Show all male student ids who don't play football.\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football'", "answer": "What are the ids of all male students who do not play football?\nAdditional table information: table: game_1"} -{"question": "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'", "answer": "Show total hours per week and number of games played for student David Shieber.\nAdditional table information: table: game_1"} -{"question": "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'", "answer": "What is the total number of hours per work and number of games played by David Shieber?\nAdditional table information: table: game_1"} -{"question": "SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20", "answer": "Show total hours per week and number of games played for students under 20.\nAdditional table information: table: game_1"} -{"question": "SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20", "answer": "What is the total number of hours per week and number of games played by students under 20?\nAdditional table information: table: game_1"} -{"question": "SELECT COUNT(DISTINCT StuID) FROM Plays_games", "answer": "How many students play video games?\nAdditional table information: table: game_1"} -{"question": "SELECT COUNT(DISTINCT StuID) FROM Plays_games", "answer": "How many different students play games?\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games", "answer": "Show ids of students who don't play video game.\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games", "answer": "What are the ids of all students who are not video game players?\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games", "answer": "Show ids of students who play video game and play sports.\nAdditional table information: table: game_1"} -{"question": "SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games", "answer": "What are the ids of all students who played video games and sports?\nAdditional table information: table: game_1"} -{"question": "SELECT gameid, SUM(hours_played) FROM Plays_games GROUP BY gameid", "answer": "Show all game ids and the number of hours played.\nAdditional table information: table: game_1"} -{"question": "SELECT gameid, SUM(hours_played) FROM Plays_games GROUP BY gameid", "answer": "What are ids and total number of hours played for each game?\nAdditional table information: table: game_1"} -{"question": "SELECT Stuid, SUM(hours_played) FROM Plays_games GROUP BY Stuid", "answer": "Show all student ids and the number of hours played.\nAdditional table information: table: game_1"} -{"question": "SELECT Stuid, SUM(hours_played) FROM Plays_games GROUP BY Stuid", "answer": "What are the ids of all students and number of hours played?\nAdditional table information: table: game_1"} -{"question": "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", "answer": "Show the game name that has most number of hours played.\nAdditional table information: table: game_1"} -{"question": "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", "answer": "What is the name of the game that has been played the most?\nAdditional table information: table: game_1"} -{"question": "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", "answer": "Show all game names played by at least 1000 hours.\nAdditional table information: table: game_1"} -{"question": "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", "answer": "What are the names of all the games that have been played for at least 1000 hours?\nAdditional table information: table: game_1"} -{"question": "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'", "answer": "Show all game names played by Linda Smith\nAdditional table information: table: game_1"} -{"question": "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'", "answer": "What are the names of all games played by Linda Smith?\nAdditional table information: table: game_1"} -{"question": "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'", "answer": "Find the last and first name of students who are playing Football or Lacrosse.\nAdditional table information: table: game_1"} -{"question": "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'", "answer": "What is the first and last name of all students who play Football or Lacrosse?\nAdditional table information: table: game_1"} -{"question": "SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = 'Football' INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = 'Lacrosse')", "answer": "Find the first name and age of the students who are playing both Football and Lacrosse.\nAdditional table information: table: game_1"} -{"question": "SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = 'Football' INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = 'Lacrosse')", "answer": "What are the first names and ages of all students who are playing both Football and Lacrosse?\nAdditional table information: table: game_1"} -{"question": "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')", "answer": "Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games.\nAdditional table information: table: game_1"} -{"question": "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')", "answer": "what is the last name and gender of all students who played both Call of Destiny and Works of Widenius?\nAdditional table information: table: game_1"} -{"question": "SELECT customer_name FROM customers", "answer": "Find the name of all customers.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT customer_name FROM customers", "answer": "What are the names of all the customers?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT COUNT(*) FROM customers", "answer": "How many customers are there?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT COUNT(*) FROM customers", "answer": "Return the total number of distinct customers.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT AVG(order_quantity) FROM order_items", "answer": "What is the average amount of items ordered in each order?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT AVG(order_quantity) FROM order_items", "answer": "Find the average order quantity per order.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT customer_name FROM customers WHERE payment_method = 'Cash'", "answer": "What are the names of customers who use payment method 'Cash'?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT customer_name FROM customers WHERE payment_method = 'Cash'", "answer": "Which customers use 'Cash' for payment method? Return the customer names.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20", "answer": "Find the 'date became customers' of the customers whose ID is between 10 and 20.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20", "answer": "What are the dates when customers with ids between 10 and 20 became customers?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which payment method is used by most customers?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the payment method that is used most frequently.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "What are the names of customers using the most popular payment method?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "Find the name of the customers who use the most frequently used payment method.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT DISTINCT payment_method FROM customers", "answer": "What are all the payment methods?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT DISTINCT payment_method FROM customers", "answer": "Return all the distinct payment methods used by customers.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT DISTINCT product_details FROM products", "answer": "What are the details of all products?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT DISTINCT product_details FROM products", "answer": "Return the the details of all products.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT customer_name FROM customers WHERE customer_name LIKE '%Alex%'", "answer": "Find the name of all customers whose name contains 'Alex'.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT customer_name FROM customers WHERE customer_name LIKE '%Alex%'", "answer": "Which customer's name contains 'Alex'? Find the full name.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT product_details FROM products WHERE product_details LIKE '%Latte%' OR product_details LIKE '%Americano%'", "answer": "Find the detail of products whose detail contains the word 'Latte' or the word 'Americano'\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT product_details FROM products WHERE product_details LIKE '%Latte%' OR product_details LIKE '%Americano%'", "answer": "Which product's detail contains the word 'Latte' or 'Americano'? Return the full detail.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "What is the address content of the customer named 'Maudie Kertzmann'?\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Return the address content for the customer whose name is 'Maudie Kertzmann'.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "How many customers are living in city 'Lake Geovannyton'?\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Find the number of customers who live in the city called Lake Geovannyton.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Find the name of customers who are living in Colorado?\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "What are the names of customers who live in Colorado state?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT city FROM addresses WHERE NOT city 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)", "answer": "Find the list of cities that no customer is living in.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT city FROM addresses WHERE NOT city 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)", "answer": "What are the cities no customers live in?\nAdditional table information: table: customers_and_addresses"} -{"question": "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", "answer": "Which city has the most customers living in?\nAdditional table information: table: customers_and_addresses"} -{"question": "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", "answer": "Find the city where the most customers live.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT DISTINCT city FROM addresses", "answer": "Retrieve the list of all cities.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT DISTINCT city FROM addresses", "answer": "List all the distinct cities\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT city FROM addresses WHERE zip_postcode = 255", "answer": "Find the city with post code 255.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT city FROM addresses WHERE zip_postcode = 255", "answer": "Which city is post code 255 located in?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT state_province_county, country FROM addresses WHERE zip_postcode LIKE '4%'", "answer": "Find the state and country of all cities with post code starting with 4.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT state_province_county, country FROM addresses WHERE zip_postcode LIKE '4%'", "answer": "What are the state and country of all the cities that have post codes starting with 4.\\\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT country FROM addresses GROUP BY country HAVING COUNT(address_id) > 4", "answer": "List the countries having more than 4 addresses listed.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT country FROM addresses GROUP BY country HAVING COUNT(address_id) > 4", "answer": "For which countries are there more than four distinct addresses listed?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING COUNT(customer_id) < 5", "answer": "List all the contact channel codes that were used less than 5 times.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING COUNT(customer_id) < 5", "answer": "Which contact channel codes were used less than 5 times?\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Which contact channel has been used by the customer with name 'Tillman Ernser'?\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Find the contact channel code that was used by the customer named 'Tillman Ernser'.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "What is the 'active to date' of the latest contact channel used by 'Tillman Ernser'?\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Return the the 'active to date' of the latest contact channel used by the customer named 'Tillman Ernser'.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT AVG(active_to_date - active_from_date) FROM customer_contact_channels", "answer": "What is the average time span of contact channels in the database?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT AVG(active_to_date - active_from_date) FROM customer_contact_channels", "answer": "Compute the average active time span of contact channels.\nAdditional table information: table: customers_and_addresses"} -{"question": "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)", "answer": "What is the channel code and contact number of the customer contact channel that was active for the longest time?\nAdditional table information: table: customers_and_addresses"} -{"question": "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)", "answer": "Return the channel code and contact number of the customer contact channel whose active duration was the longest.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Find the name and active date of the customer that use email as the contact channel.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "What are the name and active date of the customers whose contact channel code is email?\nAdditional table information: table: customers_and_addresses"} -{"question": "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)", "answer": "What is the name of the customer that made the order with the largest quantity?\nAdditional table information: table: customers_and_addresses"} -{"question": "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)", "answer": "Find the name of the customer who made the order of the largest amount of goods.\nAdditional table information: table: customers_and_addresses"} -{"question": "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", "answer": "What is the name of the customer that has purchased the most items?\nAdditional table information: table: customers_and_addresses"} -{"question": "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", "answer": "Give me the name of the customer who ordered the most items in total.\nAdditional table information: table: customers_and_addresses"} -{"question": "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) NULLS FIRST LIMIT 1", "answer": "What is the payment method of the customer that has purchased the least quantity of items?\nAdditional table information: table: customers_and_addresses"} -{"question": "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) NULLS FIRST LIMIT 1", "answer": "Tell me the payment method used by the customer who ordered the least amount of goods in total.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "How many types of products have Rodrick Heaney bought in total?\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Find the number of distinct products Rodrick Heaney has bought so far.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "What is the total quantity of products purchased by 'Rodrick Heaney'?\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Tell me the total quantity of products bought by the customer called 'Rodrick Heaney'.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT COUNT(DISTINCT customer_id) FROM customer_orders WHERE order_status = 'Cancelled'", "answer": "How many customers have at least one order with status 'Cancelled'?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT COUNT(DISTINCT customer_id) FROM customer_orders WHERE order_status = 'Cancelled'", "answer": "Return the number of customers who have at least one order with 'Cancelled' status.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT COUNT(*) FROM customer_orders WHERE order_details = 'Second time'", "answer": "How many orders have detail 'Second time'?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT COUNT(*) FROM customer_orders WHERE order_details = 'Second time'", "answer": "Tell me the number of orders with 'Second time' as order detail.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Find the customer name and date of the orders that have the status 'Delivered'.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "What are the customer name and date of the orders whose status is 'Delivered'.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "What is the total number of products that are in orders with status 'Cancelled'?\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Find the total quantity of products associated with the orders in the 'Cancelled' status.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Find the total amount of products ordered before 2018-03-17 07:13:53.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "What is the total amount of products purchased before 2018-03-17 07:13:53?\nAdditional table information: table: customers_and_addresses"} -{"question": "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", "answer": "Who made the latest order?\nAdditional table information: table: customers_and_addresses"} -{"question": "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", "answer": "Find the name of the customer who made an order most recently.\nAdditional table information: table: customers_and_addresses"} -{"question": "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", "answer": "Which product has been ordered most number of times?\nAdditional table information: table: customers_and_addresses"} -{"question": "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", "answer": "What is the most frequently ordered product? Tell me the detail of the product\nAdditional table information: table: customers_and_addresses"} -{"question": "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) NULLS FIRST LIMIT 1", "answer": "Find the name and ID of the product whose total order quantity is the largest.\nAdditional table information: table: customers_and_addresses"} -{"question": "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) NULLS FIRST LIMIT 1", "answer": "What are the name and ID of the product bought the most.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Find all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "What are all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT customer_name FROM customers WHERE payment_method <> 'Cash'", "answer": "Find the name of customers who did not pay with Cash.\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT customer_name FROM customers WHERE payment_method <> 'Cash'", "answer": "What is the name of customers who do not use Cash as payment method.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Find the names of customers who never ordered product Latte.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "What are names of customers who never ordered product Latte.\nAdditional table information: table: customers_and_addresses"} -{"question": "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", "answer": "Find the names of customers who never placed an order.\nAdditional table information: table: customers_and_addresses"} -{"question": "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", "answer": "What are the names of customers who never made an order.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "Find the names of customers who ordered both products Latte and Americano.\nAdditional table information: table: customers_and_addresses"} -{"question": "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'", "answer": "What are the names of customers who have purchased both products Latte and Americano?\nAdditional table information: table: customers_and_addresses"} -{"question": "SELECT COUNT(*) FROM artist", "answer": "How many artists are there?\nAdditional table information: table: music_4"} -{"question": "SELECT COUNT(*) FROM artist", "answer": "Count the number of artists.\nAdditional table information: table: music_4"} -{"question": "SELECT Age FROM artist", "answer": "List the age of all music artists.\nAdditional table information: table: music_4"} -{"question": "SELECT Age FROM artist", "answer": "What are the ages of all music artists?\nAdditional table information: table: music_4"} -{"question": "SELECT AVG(Age) FROM artist", "answer": "What is the average age of all artists?\nAdditional table information: table: music_4"} -{"question": "SELECT AVG(Age) FROM artist", "answer": "Return the average age across all artists.\nAdditional table information: table: music_4"} -{"question": "SELECT Famous_Title FROM artist WHERE Artist = 'Triumfall'", "answer": "What are the famous titles of the artist 'Triumfall'?\nAdditional table information: table: music_4"} -{"question": "SELECT Famous_Title FROM artist WHERE Artist = 'Triumfall'", "answer": "Return the famous titles of the artist called 'Triumfall'.\nAdditional table information: table: music_4"} -{"question": "SELECT DISTINCT (Famous_Release_date) FROM artist", "answer": "What are the distinct Famous release dates?\nAdditional table information: table: music_4"} -{"question": "SELECT DISTINCT (Famous_Release_date) FROM artist", "answer": "Give the distinct famous release dates for all artists.\nAdditional table information: table: music_4"} -{"question": "SELECT Date_of_ceremony, RESULT FROM music_festival", "answer": "Return the dates of ceremony and the results of all music festivals\nAdditional table information: table: music_4"} -{"question": "SELECT Date_of_ceremony, RESULT FROM music_festival", "answer": "What are the dates of ceremony and results for each music festival?\nAdditional table information: table: music_4"} -{"question": "SELECT Category FROM music_festival WHERE RESULT = 'Awarded'", "answer": "What are the category of music festivals with result 'Awarded'?\nAdditional table information: table: music_4"} -{"question": "SELECT Category FROM music_festival WHERE RESULT = 'Awarded'", "answer": "Return the categories of music festivals that have the result 'Awarded'.\nAdditional table information: table: music_4"} -{"question": "SELECT MAX(Weeks_on_Top), MIN(Weeks_on_Top) FROM volume", "answer": "What are the maximum and minimum week on top of all volumes?\nAdditional table information: table: music_4"} -{"question": "SELECT MAX(Weeks_on_Top), MIN(Weeks_on_Top) FROM volume", "answer": "Give the maximum and minimum weeks on top across all volumes.\nAdditional table information: table: music_4"} -{"question": "SELECT Song FROM volume WHERE Weeks_on_Top > 1", "answer": "What are the songs in volumes with more than 1 week on top?\nAdditional table information: table: music_4"} -{"question": "SELECT Song FROM volume WHERE Weeks_on_Top > 1", "answer": "Give the songs included in volumes that have more than 1 week on top.\nAdditional table information: table: music_4"} -{"question": "SELECT Song FROM volume ORDER BY Song NULLS FIRST", "answer": "Please list all songs in volumes in ascending alphabetical order.\nAdditional table information: table: music_4"} -{"question": "SELECT Song FROM volume ORDER BY Song NULLS FIRST", "answer": "What are the the songs in volumes, listed in ascending order?\nAdditional table information: table: music_4"} -{"question": "SELECT COUNT(DISTINCT Artist_ID) FROM volume", "answer": "How many distinct artists do the volumes associate to?\nAdditional table information: table: music_4"} -{"question": "SELECT COUNT(DISTINCT Artist_ID) FROM volume", "answer": "Count the number of distinct artists who have volumes.\nAdditional table information: table: music_4"} -{"question": "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", "answer": "Please show the date of ceremony of the volumes that last more than 2 weeks on top.\nAdditional table information: table: music_4"} -{"question": "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", "answer": "What are the dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top?\nAdditional table information: table: music_4"} -{"question": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = 'Nominated'", "answer": "Please show the songs that have result 'nominated' at music festivals.\nAdditional table information: table: music_4"} -{"question": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = 'Nominated'", "answer": "What are the songs in volumes that have resulted in a nomination at music festivals?\nAdditional table information: table: music_4"} -{"question": "SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = 'Gorgoroth'", "answer": "What are the issue dates of volumes associated with the artist 'Gorgoroth'?\nAdditional table information: table: music_4"} -{"question": "SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = 'Gorgoroth'", "answer": "Return the issue dates of volumes that are by the artist named Gorgoroth.\nAdditional table information: table: music_4"} -{"question": "SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32", "answer": "What are the songs in volumes associated with the artist aged 32 or older?\nAdditional table information: table: music_4"} -{"question": "SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32", "answer": "Return names of songs in volumes that are by artists that are at least 32 years old.\nAdditional table information: table: music_4"} -{"question": "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", "answer": "What is the average weeks on top of volumes associated with the artist aged 25 or younger?\nAdditional table information: table: music_4"} -{"question": "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", "answer": "Return the average number of weeks on top for volumes by artists that are at most 25 years old.\nAdditional table information: table: music_4"} -{"question": "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", "answer": "What are the famous title of the artists associated with volumes with more than 2 weeks on top?\nAdditional table information: table: music_4"} -{"question": "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", "answer": "Return the famous titles for artists that have volumes that lasted more than 2 weeks on top.\nAdditional table information: table: music_4"} -{"question": "SELECT Famous_Title, Age FROM artist ORDER BY Age DESC", "answer": "Please list the age and famous title of artists in descending order of age.\nAdditional table information: table: music_4"} -{"question": "SELECT Famous_Title, Age FROM artist ORDER BY Age DESC", "answer": "What are the famous titles and ages of each artist, listed in descending order by age?\nAdditional table information: table: music_4"} -{"question": "SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1", "answer": "What is the famous release date of the artist with the oldest age?\nAdditional table information: table: music_4"} -{"question": "SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1", "answer": "Return the famous release date for the oldest artist.\nAdditional table information: table: music_4"} -{"question": "SELECT Category, COUNT(*) FROM music_festival GROUP BY Category", "answer": "Please show the categories of the music festivals and the count.\nAdditional table information: table: music_4"} -{"question": "SELECT Category, COUNT(*) FROM music_festival GROUP BY Category", "answer": "Return the number of music festivals of each category.\nAdditional table information: table: music_4"} -{"question": "SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common result of the music festival?\nAdditional table information: table: music_4"} -{"question": "SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the result that is most frequent at music festivals.\nAdditional table information: table: music_4"} -{"question": "SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1", "answer": "Please show the categories of the music festivals with count more than 1.\nAdditional table information: table: music_4"} -{"question": "SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1", "answer": "What are the categories of music festivals for which there have been more than 1 music festival?\nAdditional table information: table: music_4"} -{"question": "SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1", "answer": "What is the song in the volume with the maximum weeks on top?\nAdditional table information: table: music_4"} -{"question": "SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1", "answer": "Return the song in the volume that has spent the most weeks on top?\nAdditional table information: table: music_4"} -{"question": "SELECT Famous_Title FROM artist WHERE NOT Artist_ID IN (SELECT Artist_ID FROM volume)", "answer": "Find the famous titles of artists that do not have any volume.\nAdditional table information: table: music_4"} -{"question": "SELECT Famous_Title FROM artist WHERE NOT Artist_ID IN (SELECT Artist_ID FROM volume)", "answer": "What are the famous titles of artists who do not have any volumes?\nAdditional table information: table: music_4"} -{"question": "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", "answer": "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.\nAdditional table information: table: music_4"} -{"question": "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", "answer": "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?\nAdditional table information: table: music_4"} -{"question": "SELECT Date_of_ceremony FROM music_festival WHERE Category = 'Best Song' AND RESULT = 'Awarded'", "answer": "What are the date of ceremony of music festivals with category 'Best Song' and result 'Awarded'?\nAdditional table information: table: music_4"} -{"question": "SELECT Date_of_ceremony FROM music_festival WHERE Category = 'Best Song' AND RESULT = 'Awarded'", "answer": "Return the dates of ceremony corresponding to music festivals that had the category 'Best Song' and result 'Awarded'.\nAdditional table information: table: music_4"} -{"question": "SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC NULLS FIRST LIMIT 1", "answer": "What is the issue date of the volume with the minimum weeks on top?\nAdditional table information: table: music_4"} -{"question": "SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC NULLS FIRST LIMIT 1", "answer": "Return the issue date of the volume that has spent the fewest weeks on top.\nAdditional table information: table: music_4"} -{"question": "SELECT COUNT(DISTINCT Artist_ID) FROM volume", "answer": "How many distinct artists have volumes?\nAdditional table information: table: music_4"} -{"question": "SELECT COUNT(DISTINCT Artist_ID) FROM volume", "answer": "Count the number of artists who have had volumes.\nAdditional table information: table: music_4"} -{"question": "SELECT RESULT, COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC", "answer": "Please show the results of music festivals and the number of music festivals that have had each, ordered by this count.\nAdditional table information: table: music_4"} -{"question": "SELECT RESULT, COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC", "answer": "How many music festivals have had each kind of result, ordered descending by count?\nAdditional table information: table: music_4"} -{"question": "SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23", "answer": "What are the issue dates of volumes associated with the artist aged 23 or younger?\nAdditional table information: table: music_4"} -{"question": "SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23", "answer": "Return the issue dates of volumes by artists who are at most 23 years old?\nAdditional table information: table: music_4"} -{"question": "SELECT COUNT(*) FROM roller_coaster", "answer": "How many roller coasters are there?\nAdditional table information: table: roller_coaster"} -{"question": "SELECT Name FROM roller_coaster ORDER BY LENGTH ASC NULLS FIRST", "answer": "List the names of roller coasters by ascending order of length.\nAdditional table information: table: roller_coaster"} -{"question": "SELECT LENGTH, Height FROM roller_coaster", "answer": "What are the lengths and heights of roller coasters?\nAdditional table information: table: roller_coaster"} -{"question": "SELECT Name FROM country WHERE Languages <> 'German'", "answer": "List the names of countries whose language is not 'German'.\nAdditional table information: table: roller_coaster"} -{"question": "SELECT Status FROM roller_coaster WHERE LENGTH > 3300 OR Height > 100", "answer": "Show the statuses of roller coasters longer than 3300 or higher than 100.\nAdditional table information: table: roller_coaster"} -{"question": "SELECT Speed FROM roller_coaster ORDER BY LENGTH DESC LIMIT 1", "answer": "What are the speeds of the longest roller coaster?\nAdditional table information: table: roller_coaster"} -{"question": "SELECT AVG(Speed) FROM roller_coaster", "answer": "What is the average speed of roller coasters?\nAdditional table information: table: roller_coaster"} -{"question": "SELECT Status, COUNT(*) FROM roller_coaster GROUP BY Status", "answer": "Show the different statuses and the numbers of roller coasters for each status.\nAdditional table information: table: roller_coaster"} -{"question": "SELECT Status FROM roller_coaster GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the most common status of roller coasters.\nAdditional table information: table: roller_coaster"} -{"question": "SELECT Status FROM roller_coaster GROUP BY Status HAVING COUNT(*) > 2", "answer": "List the status shared by more than two roller coaster.\nAdditional table information: table: roller_coaster"} -{"question": "SELECT Park FROM roller_coaster ORDER BY Speed DESC LIMIT 1", "answer": "Show the park of the roller coaster with the highest speed.\nAdditional table information: table: roller_coaster"} -{"question": "SELECT T2.Name, T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID", "answer": "Show the names of roller coasters and names of country they are in.\nAdditional table information: table: roller_coaster"} -{"question": "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", "answer": "Show the names of countries that have more than one roller coaster.\nAdditional table information: table: roller_coaster"} -{"question": "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", "answer": "Show the name and population of the country that has the highest roller coaster.\nAdditional table information: table: roller_coaster"} -{"question": "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", "answer": "Show the names of countries and the average speed of roller coasters from each country.\nAdditional table information: table: roller_coaster"} -{"question": "SELECT COUNT(*) FROM country WHERE NOT country_id IN (SELECT country_id FROM roller_coaster WHERE LENGTH > 3000)", "answer": "How many countries do not have an roller coaster longer than 3000?\nAdditional table information: table: roller_coaster"} -{"question": "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", "answer": "What are the country names, area and population which has both roller coasters with speed higher\nAdditional table information: table: roller_coaster"} -{"question": "SELECT COUNT(DISTINCT rank) FROM captain", "answer": "How many different captain ranks are there?\nAdditional table information: table: ship_1"} -{"question": "SELECT COUNT(DISTINCT rank) FROM captain", "answer": "Count the number of different ranks of captain.\nAdditional table information: table: ship_1"} -{"question": "SELECT COUNT(*), rank FROM captain GROUP BY rank", "answer": "How many captains are in each rank?\nAdditional table information: table: ship_1"} -{"question": "SELECT COUNT(*), rank FROM captain GROUP BY rank", "answer": "Count the number of captains that have each rank.\nAdditional table information: table: ship_1"} -{"question": "SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank", "answer": "How many captains with younger than 50 are in each rank?\nAdditional table information: table: ship_1"} -{"question": "SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank", "answer": "Count the number of captains younger than 50 of each rank.\nAdditional table information: table: ship_1"} -{"question": "SELECT name FROM captain ORDER BY age DESC", "answer": "Sort all captain names by their ages from old to young.\nAdditional table information: table: ship_1"} -{"question": "SELECT name FROM captain ORDER BY age DESC", "answer": "What are the names of captains, sorted by age descending?\nAdditional table information: table: ship_1"} -{"question": "SELECT name, CLASS, rank FROM captain", "answer": "Find the name, class and rank of all captains.\nAdditional table information: table: ship_1"} -{"question": "SELECT name, CLASS, rank FROM captain", "answer": "What are the names, classes, and ranks of all captains?\nAdditional table information: table: ship_1"} -{"question": "SELECT rank FROM captain GROUP BY rank ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which rank is the most common among captains?\nAdditional table information: table: ship_1"} -{"question": "SELECT rank FROM captain GROUP BY rank ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the rank for which there are the fewest captains.\nAdditional table information: table: ship_1"} -{"question": "SELECT CLASS FROM captain GROUP BY CLASS HAVING COUNT(*) > 2", "answer": "Which classes have more than two captains?\nAdditional table information: table: ship_1"} -{"question": "SELECT CLASS FROM captain GROUP BY CLASS HAVING COUNT(*) > 2", "answer": "Give the classes that have more than two captains.\nAdditional table information: table: ship_1"} -{"question": "SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant'", "answer": "Find the name of captains whose rank are either Midshipman or Lieutenant.\nAdditional table information: table: ship_1"} -{"question": "SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant'", "answer": "What are the names of captains that have either the rank Midshipman or Lieutenant?\nAdditional table information: table: ship_1"} -{"question": "SELECT AVG(age), MIN(age), CLASS FROM captain GROUP BY CLASS", "answer": "What are the average and minimum age of captains in different class?\nAdditional table information: table: ship_1"} -{"question": "SELECT AVG(age), MIN(age), CLASS FROM captain GROUP BY CLASS", "answer": "Return the average and minimum age of captains in each class.\nAdditional table information: table: ship_1"} -{"question": "SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner'", "answer": "Find the captain rank that has some captains in both Cutter and Armed schooner classes.\nAdditional table information: table: ship_1"} -{"question": "SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner'", "answer": "What are the ranks of captains that are both in the Cutter and Armed schooner classes?\nAdditional table information: table: ship_1"} -{"question": "SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line'", "answer": "Find the captain rank that has no captain in Third-rate ship of the line class.\nAdditional table information: table: ship_1"} -{"question": "SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line'", "answer": "What are the ranks of captains that have no captain that are in the Third-rate ship of the line class?\nAdditional table information: table: ship_1"} -{"question": "SELECT name FROM captain ORDER BY age NULLS FIRST LIMIT 1", "answer": "What is the name of the youngest captain?\nAdditional table information: table: ship_1"} -{"question": "SELECT name FROM captain ORDER BY age NULLS FIRST LIMIT 1", "answer": "Return the name of the youngest captain.\nAdditional table information: table: ship_1"} -{"question": "SELECT COUNT(*) FROM ship", "answer": "how many ships are there?\nAdditional table information: table: ship_1"} -{"question": "SELECT COUNT(*) FROM ship", "answer": "Count the number of ships.\nAdditional table information: table: ship_1"} -{"question": "SELECT name, TYPE, flag FROM ship ORDER BY built_year DESC LIMIT 1", "answer": "Find the name, type, and flag of the ship that is built in the most recent year.\nAdditional table information: table: ship_1"} -{"question": "SELECT name, TYPE, flag FROM ship ORDER BY built_year DESC LIMIT 1", "answer": "What is the name, type, and flag of the ship that was built in the most recent year?\nAdditional table information: table: ship_1"} -{"question": "SELECT COUNT(*), flag FROM ship GROUP BY flag", "answer": "Group by ships by flag, and return number of ships that have each flag.\nAdditional table information: table: ship_1"} -{"question": "SELECT COUNT(*), flag FROM ship GROUP BY flag", "answer": "What are the different ship flags, and how many ships have each?\nAdditional table information: table: ship_1"} -{"question": "SELECT flag FROM ship GROUP BY flag ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which flag is most widely used among all ships?\nAdditional table information: table: ship_1"} -{"question": "SELECT flag FROM ship GROUP BY flag ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the flag that is most common among all ships.\nAdditional table information: table: ship_1"} -{"question": "SELECT name FROM ship ORDER BY built_year NULLS FIRST, CLASS NULLS FIRST", "answer": "List all ship names in the order of built year and class.\nAdditional table information: table: ship_1"} -{"question": "SELECT name FROM ship ORDER BY built_year NULLS FIRST, CLASS NULLS FIRST", "answer": "What are the names of ships, ordered by year they were built and their class?\nAdditional table information: table: ship_1"} -{"question": "SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta'", "answer": "Find the ship type that are used by both ships with Panama and Malta flags.\nAdditional table information: table: ship_1"} -{"question": "SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta'", "answer": "What types of ships have both ships that have Panama Flags and Malta flags?\nAdditional table information: table: ship_1"} -{"question": "SELECT built_year FROM ship GROUP BY built_year ORDER BY COUNT(*) DESC LIMIT 1", "answer": "In which year were most of ships built?\nAdditional table information: table: ship_1"} -{"question": "SELECT built_year FROM ship GROUP BY built_year ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the year in which most ships were built?\nAdditional table information: table: ship_1"} -{"question": "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", "answer": "Find the name of the ships that have more than one captain.\nAdditional table information: table: ship_1"} -{"question": "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", "answer": "What are the names of ships that have more than one captain?\nAdditional table information: table: ship_1"} -{"question": "SELECT name, CLASS FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain)", "answer": "what are the names and classes of the ships that do not have any captain yet?\nAdditional table information: table: ship_1"} -{"question": "SELECT name, CLASS FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain)", "answer": "Return the names and classes of ships that do not have a captain?\nAdditional table information: table: ship_1"} -{"question": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age NULLS FIRST LIMIT 1", "answer": "Find the name of the ship that is steered by the youngest captain.\nAdditional table information: table: ship_1"} -{"question": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age NULLS FIRST LIMIT 1", "answer": "What is the name of the ship that is commanded by the youngest captain?\nAdditional table information: table: ship_1"} -{"question": "SELECT name, flag FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman')", "answer": "Find the name and flag of ships that are not steered by any captain with Midshipman rank.\nAdditional table information: table: ship_1"} -{"question": "SELECT name, flag FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman')", "answer": "What are the names and flags of ships that do not have a captain with the rank of Midshipman?\nAdditional table information: table: ship_1"} -{"question": "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'", "answer": "Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank.\nAdditional table information: table: ship_1"} -{"question": "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'", "answer": "What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant?\nAdditional table information: table: ship_1"} -{"question": "SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1", "answer": "What is id of the city that hosted events in the most recent year?\nAdditional table information: table: city_record"} -{"question": "SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1", "answer": "Find the city that hosted some events in the most recent year. What is the id of this city?\nAdditional table information: table: city_record"} -{"question": "SELECT match_id FROM MATCH WHERE competition = '1994 FIFA World Cup qualification'", "answer": "Find the match ids of the cities that hosted competition '1994 FIFA World Cup qualification'?\nAdditional table information: table: city_record"} -{"question": "SELECT match_id FROM MATCH WHERE competition = '1994 FIFA World Cup qualification'", "answer": "What is the match id of the competition called '1994 FIFA World Cup qualification'?\nAdditional table information: table: city_record"} -{"question": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010", "answer": "Find the cities which were once a host city after 2010?\nAdditional table information: table: city_record"} -{"question": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010", "answer": "Which cities served as a host city after 2010?\nAdditional table information: table: city_record"} -{"question": "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", "answer": "Which city has hosted the most events?\nAdditional table information: table: city_record"} -{"question": "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", "answer": "Find the city that hosted the most events.\nAdditional table information: table: city_record"} -{"question": "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'", "answer": "What is the venue of the competition '1994 FIFA World Cup qualification' hosted by 'Nanjing ( Jiangsu )'?\nAdditional table information: table: city_record"} -{"question": "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'", "answer": "Find the venue of the competition '1994 FIFA World Cup qualification' which was hosted by 'Nanjing ( Jiangsu )'.\nAdditional table information: table: city_record"} -{"question": "SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = 'Shanghai'", "answer": "Give me the temperature of Shanghai in January.\nAdditional table information: table: city_record"} -{"question": "SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = 'Shanghai'", "answer": "What is the temperature of 'Shanghai' city in January?\nAdditional table information: table: city_record"} -{"question": "SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = 'Taizhou ( Zhejiang )'", "answer": "What is the host year of city 'Taizhou ( Zhejiang )'?\nAdditional table information: table: city_record"} -{"question": "SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = 'Taizhou ( Zhejiang )'", "answer": "IN which year did city 'Taizhou ( Zhejiang )' serve as a host city?\nAdditional table information: table: city_record"} -{"question": "SELECT city FROM city ORDER BY regional_population DESC LIMIT 3", "answer": "Which three cities have the largest regional population?\nAdditional table information: table: city_record"} -{"question": "SELECT city FROM city ORDER BY regional_population DESC LIMIT 3", "answer": "What are the three largest cities in terms of regional population?\nAdditional table information: table: city_record"} -{"question": "SELECT city, GDP FROM city ORDER BY GDP NULLS FIRST LIMIT 1", "answer": "Which city has the lowest GDP? Please list the city name and its GDP.\nAdditional table information: table: city_record"} -{"question": "SELECT city, GDP FROM city ORDER BY GDP NULLS FIRST LIMIT 1", "answer": "What is the city with the smallest GDP? Return the city and its GDP.\nAdditional table information: table: city_record"} -{"question": "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", "answer": "Which city has the highest temperature in February?\nAdditional table information: table: city_record"} -{"question": "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", "answer": "In February, which city marks the highest temperature?\nAdditional table information: table: city_record"} -{"question": "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", "answer": "Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct?\nAdditional table information: table: city_record"} -{"question": "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", "answer": "Which cities' temperature in March is lower than that in July or higher than that in Oct?\nAdditional table information: table: city_record"} -{"question": "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", "answer": "Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities?\nAdditional table information: table: city_record"} -{"question": "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", "answer": "Which cities have lower temperature in March than in July and have been once host cities?\nAdditional table information: table: city_record"} -{"question": "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", "answer": "Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities.\nAdditional table information: table: city_record"} -{"question": "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", "answer": "Which cities have lower temperature in March than in Dec and have never served as host cities?\nAdditional table information: table: city_record"} -{"question": "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", "answer": "Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities?\nAdditional table information: table: city_record"} -{"question": "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", "answer": "Which cities have higher temperature in Feb than in Jun or have once served as host cities?\nAdditional table information: table: city_record"} -{"question": "SELECT city FROM city WHERE regional_population > 10000000", "answer": "Please give me a list of cities whose regional population is over 10000000.\nAdditional table information: table: city_record"} -{"question": "SELECT city FROM city WHERE regional_population > 10000000", "answer": "Which cities have regional population above 10000000?\nAdditional table information: table: city_record"} -{"question": "SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000", "answer": "Please give me a list of cities whose regional population is over 8000000 or under 5000000.\nAdditional table information: table: city_record"} -{"question": "SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000", "answer": "Which cities have regional population above 8000000 or below 5000000?\nAdditional table information: table: city_record"} -{"question": "SELECT COUNT(*), Competition FROM MATCH GROUP BY Competition", "answer": "Find the number of matches in different competitions.\nAdditional table information: table: city_record"} -{"question": "SELECT COUNT(*), Competition FROM MATCH GROUP BY Competition", "answer": "For each competition, count the number of matches.\nAdditional table information: table: city_record"} -{"question": "SELECT venue FROM MATCH ORDER BY date DESC", "answer": "List venues of all matches in the order of their dates starting from the most recent one.\nAdditional table information: table: city_record"} -{"question": "SELECT venue FROM MATCH ORDER BY date DESC", "answer": "What are the venues of all the matches? Sort them in the descending order of match date.\nAdditional table information: table: city_record"} -{"question": "SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1", "answer": "what is the GDP of the city with the largest population.\nAdditional table information: table: city_record"} -{"question": "SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1", "answer": "Find the GDP of the city with the largest regional population.\nAdditional table information: table: city_record"} -{"question": "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", "answer": "What are the GDP and population of the city that already served as a host more than once?\nAdditional table information: table: city_record"} -{"question": "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", "answer": "Which cities have served as host cities more than once? Return me their GDP and population.\nAdditional table information: table: city_record"} -{"question": "SELECT individual_first_name, individual_middle_name, individual_last_name FROM individuals ORDER BY individual_last_name NULLS FIRST", "answer": "List every individual's first name, middle name and last name in alphabetical order by last name.\nAdditional table information: table: e_government"} -{"question": "SELECT individual_first_name, individual_middle_name, individual_last_name FROM individuals ORDER BY individual_last_name NULLS FIRST", "answer": "What are the first, middle, and last names of all individuals, ordered by last name?\nAdditional table information: table: e_government"} -{"question": "SELECT DISTINCT form_type_code FROM forms", "answer": "List all the types of forms.\nAdditional table information: table: e_government"} -{"question": "SELECT DISTINCT form_type_code FROM forms", "answer": "What are the different types of forms?\nAdditional table information: table: e_government"} -{"question": "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", "answer": "Find the name of the most popular party form.\nAdditional table information: table: e_government"} -{"question": "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", "answer": "What is the name of the party form that is most common?\nAdditional table information: table: e_government"} -{"question": "SELECT payment_method_code, party_phone FROM parties WHERE party_email = 'enrico09@example.com'", "answer": "Find the payment method and phone of the party with email 'enrico09@example.com'.\nAdditional table information: table: e_government"} -{"question": "SELECT payment_method_code, party_phone FROM parties WHERE party_email = 'enrico09@example.com'", "answer": "What is the payment method code and party phone of the party with the email 'enrico09@example.com'?\nAdditional table information: table: e_government"} -{"question": "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)", "answer": "Find the emails of parties with the most popular party form.\nAdditional table information: table: e_government"} -{"question": "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)", "answer": "What are the party emails associated with parties that used the party form that is the most common?\nAdditional table information: table: e_government"} -{"question": "SELECT organization_name FROM organizations ORDER BY date_formed ASC NULLS FIRST", "answer": "List all the name of organizations in order of the date formed.\nAdditional table information: table: e_government"} -{"question": "SELECT organization_name FROM organizations ORDER BY date_formed ASC NULLS FIRST", "answer": "What are the names of organizations, ordered by the date they were formed, ascending?\nAdditional table information: table: e_government"} -{"question": "SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1", "answer": "Find the name of the youngest organization.\nAdditional table information: table: e_government"} -{"question": "SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1", "answer": "What is the name of the organization that was formed most recently?\nAdditional table information: table: e_government"} -{"question": "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", "answer": "Find the last name of the latest contact individual of the organization 'Labour Party'.\nAdditional table information: table: e_government"} -{"question": "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", "answer": "What is the last name of the contact individual from the Labour party organization who was contacted most recently?\nAdditional table information: table: e_government"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "Find the last name of the first ever contact person of the organization with the highest UK Vat number.\nAdditional table information: table: e_government"} -{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the last name of the first individual contacted from the organization with the maximum UK Vat number across all organizations?\nAdditional table information: table: e_government"} -{"question": "SELECT COUNT(*) FROM services", "answer": "How many services are there?\nAdditional table information: table: e_government"} -{"question": "SELECT COUNT(*) FROM services", "answer": "Count the number of services.\nAdditional table information: table: e_government"} -{"question": "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", "answer": "Find name of the services that has never been used.\nAdditional table information: table: e_government"} -{"question": "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", "answer": "What are the names of the services that have never been used?\nAdditional table information: table: e_government"} -{"question": "SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses", "answer": "Find the name of all the cities and states.\nAdditional table information: table: e_government"} -{"question": "SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses", "answer": "What are the names of all cities and states?\nAdditional table information: table: e_government"} -{"question": "SELECT COUNT(*) FROM addresses WHERE state_province_county = 'Colorado'", "answer": "How many cities are there in state 'Colorado'?\nAdditional table information: table: e_government"} -{"question": "SELECT COUNT(*) FROM addresses WHERE state_province_county = 'Colorado'", "answer": "Count the number of cities in the state of Colorado.\nAdditional table information: table: e_government"} -{"question": "SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING COUNT(*) > 3", "answer": "Find the payment method code used by more than 3 parties.\nAdditional table information: table: e_government"} -{"question": "SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING COUNT(*) > 3", "answer": "What are the payment method codes that have been used by more than 3 parties?\nAdditional table information: table: e_government"} -{"question": "SELECT organization_name FROM organizations WHERE organization_name LIKE '%Party%'", "answer": "Find the name of organizations whose names contain 'Party'.\nAdditional table information: table: e_government"} -{"question": "SELECT organization_name FROM organizations WHERE organization_name LIKE '%Party%'", "answer": "What are the names of organizations that contain the word 'Party'?\nAdditional table information: table: e_government"} -{"question": "SELECT COUNT(DISTINCT payment_method_code) FROM parties", "answer": "How many distinct payment methods are used by parties?\nAdditional table information: table: e_government"} -{"question": "SELECT COUNT(DISTINCT payment_method_code) FROM parties", "answer": "Count the number of different payment method codes used by parties.\nAdditional table information: table: e_government"} -{"question": "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", "answer": "Which is the email of the party that has used the services the most number of times?\nAdditional table information: table: e_government"} -{"question": "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", "answer": "Return the party email that has used party services the greatest number of times.\nAdditional table information: table: e_government"} -{"question": "SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE '%6862 Kaitlyn Knolls%'", "answer": "Which state can address '6862 Kaitlyn Knolls' possibly be in?\nAdditional table information: table: e_government"} -{"question": "SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE '%6862 Kaitlyn Knolls%'", "answer": "Give the state corresponding to the line number building '6862 Kaitlyn Knolls'.\nAdditional table information: table: e_government"} -{"question": "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", "answer": "What is the name of organization that has the greatest number of contact individuals?\nAdditional table information: table: e_government"} -{"question": "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", "answer": "Return the name of the organization which has the most contact individuals.\nAdditional table information: table: e_government"} -{"question": "SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id", "answer": "Find the last name of the individuals that have been contact individuals of an organization.\nAdditional table information: table: e_government"} -{"question": "SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id", "answer": "What are the last names of individuals who have been contact individuals for an organization?\nAdditional table information: table: e_government"} -{"question": "SELECT COUNT(*) FROM driver", "answer": "How many drivers are there?\nAdditional table information: table: school_bus"} -{"question": "SELECT name, home_city, age FROM driver", "answer": "Show the name, home city, and age for all drivers.\nAdditional table information: table: school_bus"} -{"question": "SELECT party, COUNT(*) FROM driver GROUP BY party", "answer": "Show the party and the number of drivers in each party.\nAdditional table information: table: school_bus"} -{"question": "SELECT name FROM driver ORDER BY age DESC", "answer": "Show the name of drivers in descending order of age.\nAdditional table information: table: school_bus"} -{"question": "SELECT DISTINCT home_city FROM driver", "answer": "Show all different home cities.\nAdditional table information: table: school_bus"} -{"question": "SELECT home_city FROM driver GROUP BY home_city ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the home city with the most number of drivers.\nAdditional table information: table: school_bus"} -{"question": "SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40", "answer": "Show the party with drivers from Hartford and drivers older than 40.\nAdditional table information: table: school_bus"} -{"question": "SELECT home_city FROM driver WHERE age > 40 GROUP BY home_city HAVING COUNT(*) >= 2", "answer": "Show home city where at least two drivers older than 40 are from.\nAdditional table information: table: school_bus"} -{"question": "SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age > 40", "answer": "Show all home cities except for those having a driver older than 40.\nAdditional table information: table: school_bus"} -{"question": "SELECT name FROM driver WHERE NOT driver_id IN (SELECT driver_id FROM school_bus)", "answer": "Show the names of the drivers without a school bus.\nAdditional table information: table: school_bus"} -{"question": "SELECT TYPE FROM school GROUP BY TYPE HAVING COUNT(*) = 2", "answer": "Show the types of schools that have two schools.\nAdditional table information: table: school_bus"} -{"question": "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", "answer": "Show the school name and driver name for all school buses.\nAdditional table information: table: school_bus"} -{"question": "SELECT MAX(years_working), MIN(years_working), AVG(years_working) FROM school_bus", "answer": "What is the maximum, minimum and average years spent working on a school bus?\nAdditional table information: table: school_bus"} -{"question": "SELECT school, TYPE FROM school WHERE NOT school_id IN (SELECT school_id FROM school_bus)", "answer": "Show the school name and type for schools without a school bus.\nAdditional table information: table: school_bus"} -{"question": "SELECT T2.type, COUNT(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T2.type", "answer": "Show the type of school and the number of buses for each type.\nAdditional table information: table: school_bus"} -{"question": "SELECT COUNT(*) FROM driver WHERE home_city = 'Hartford' OR age < 40", "answer": "How many drivers are from Hartford city or younger than 40?\nAdditional table information: table: school_bus"} -{"question": "SELECT name FROM driver WHERE home_city = 'Hartford' AND age < 40", "answer": "List names for drivers from Hartford city and younger than 40.\nAdditional table information: table: school_bus"} -{"question": "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", "answer": "find the name of driver who is driving the school bus with the longest working history.\nAdditional table information: table: school_bus"} -{"question": "SELECT COUNT(*) FROM flight WHERE velocity > 200", "answer": "How many flights have a velocity larger than 200?\nAdditional table information: table: flight_company"} -{"question": "SELECT vehicle_flight_number, date, pilot FROM flight ORDER BY altitude ASC NULLS FIRST", "answer": "List the vehicle flight number, date and pilot of all the flights, ordered by altitude.\nAdditional table information: table: flight_company"} -{"question": "SELECT id, country, city, name FROM airport ORDER BY name NULLS FIRST", "answer": "List the id, country, city and name of the airports ordered alphabetically by the name.\nAdditional table information: table: flight_company"} -{"question": "SELECT MAX(group_equity_shareholding) FROM operate_company", "answer": "What is maximum group equity shareholding of the companies?\nAdditional table information: table: flight_company"} -{"question": "SELECT AVG(velocity) FROM flight WHERE pilot = 'Thompson'", "answer": "What is the velocity of the pilot named 'Thompson'?\nAdditional table information: table: flight_company"} -{"question": "SELECT T1.name, T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id", "answer": "What are the names and types of the companies that have ever operated a flight?\nAdditional table information: table: flight_company"} -{"question": "SELECT name FROM airport WHERE country <> 'Iceland'", "answer": "What are the names of the airports which are not in the country 'Iceland'?\nAdditional table information: table: flight_company"} -{"question": "SELECT DISTINCT T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T2.velocity < 200", "answer": "What are the distinct types of the companies that have operated any flights with velocity less than 200?\nAdditional table information: table: flight_company"} -{"question": "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", "answer": "What are the ids and names of the companies that operated more than one flight?\nAdditional table information: table: flight_company"} -{"question": "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", "answer": "What is the id, name and IATA code of the airport that had most number of flights?\nAdditional table information: table: flight_company"} -{"question": "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'", "answer": "What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'?\nAdditional table information: table: flight_company"} -{"question": "SELECT TYPE, COUNT(*) FROM operate_company GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common company type, and how many are there?\nAdditional table information: table: flight_company"} -{"question": "SELECT COUNT(*) FROM airport WHERE NOT id IN (SELECT airport_id FROM flight WHERE pilot = 'Thompson')", "answer": "How many airports haven't the pilot 'Thompson' driven an aircraft?\nAdditional table information: table: flight_company"} -{"question": "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'", "answer": "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.\nAdditional table information: table: flight_company"} -{"question": "SELECT name FROM airport WHERE name LIKE '%international%'", "answer": "Which of the airport names contains the word 'international'?\nAdditional table information: table: flight_company"} -{"question": "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", "answer": "How many companies operates airlines in each airport?\nAdditional table information: table: flight_company"} -{"question": "SELECT COUNT(*), country FROM airport GROUP BY country", "answer": "how many airports are there in each country?\nAdditional table information: table: flight_company"} -{"question": "SELECT country FROM airport GROUP BY country HAVING COUNT(*) > 2", "answer": "which countries have more than 2 airports?\nAdditional table information: table: flight_company"} -{"question": "SELECT pilot FROM flight GROUP BY pilot ORDER BY COUNT(*) DESC LIMIT 1", "answer": "which pilot is in charge of the most number of flights?\nAdditional table information: table: flight_company"} -{"question": "SELECT COUNT(*) FROM Accounts", "answer": "How many accounts do we have?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*) FROM Accounts", "answer": "Count the number of accounts.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT account_id, account_details FROM Accounts", "answer": "Show all account ids and account details.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT account_id, account_details FROM Accounts", "answer": "What are the ids and details of all accounts?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*) FROM Statements", "answer": "How many statements do we have?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*) FROM Statements", "answer": "Count the number of statements.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT STATEMENT_ID, statement_details FROM Statements", "answer": "List all statement ids and statement details.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT STATEMENT_ID, statement_details FROM Statements", "answer": "What are the ids and details of all statements?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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", "answer": "Show statement id, statement detail, account detail for accounts.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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", "answer": "What are the statement ids, statement details, and account details, for all accounts?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT STATEMENT_ID, COUNT(*) FROM Accounts GROUP BY STATEMENT_ID", "answer": "Show all statement id and the number of accounts for each statement.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT STATEMENT_ID, COUNT(*) FROM Accounts GROUP BY STATEMENT_ID", "answer": "What are the different statement ids on accounts, and the number of accounts for each?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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", "answer": "Show the statement id and the statement detail for the statement with most number of accounts.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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", "answer": "What are the statement id and statement detail for the statement that has the most corresponding accounts?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*) FROM Documents", "answer": "Show the number of documents.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*) FROM Documents", "answer": "Count the number of documents.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_type_code, document_name, document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book'", "answer": "List the document type code, document name, and document description for the document with name 'Noel CV' or name 'King Book'.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_type_code, document_name, document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book'", "answer": "What are the type come, name, and description of the document that has either the name 'Noel CV' or 'King Book'?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_id, document_name FROM Documents", "answer": "Show the ids and names of all documents.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_id, document_name FROM Documents", "answer": "What are the ids and names for each of the documents?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_name, document_id FROM Documents WHERE document_type_code = 'BK'", "answer": "Find names and ids of all documents with document type code BK.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_name, document_id FROM Documents WHERE document_type_code = 'BK'", "answer": "What are the names and ids of documents that have the type code BK?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*), project_id FROM Documents WHERE document_type_code = 'BK' GROUP BY project_id", "answer": "How many documents are with document type code BK for each product id?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*), project_id FROM Documents WHERE document_type_code = 'BK' GROUP BY project_id", "answer": "Count the number of documents with the type code BK that correspond to each product id.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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'", "answer": "Show the document name and the document date for all documents on project with details 'Graph Database project'.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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'", "answer": "What are the names and dates for documents corresponding to project that has the details 'Graph Database project'?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT project_id, COUNT(*) FROM Documents GROUP BY project_id", "answer": "Show project ids and the number of documents in each project.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT project_id, COUNT(*) FROM Documents GROUP BY project_id", "answer": "How many documents correspond with each project id?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT project_id FROM Documents GROUP BY project_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the id of the project with least number of documents?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT project_id FROM Documents GROUP BY project_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Return the id of the project that has the fewest corresponding documents.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT project_id FROM Documents GROUP BY project_id HAVING COUNT(*) >= 2", "answer": "Show the ids for projects with at least 2 documents.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT project_id FROM Documents GROUP BY project_id HAVING COUNT(*) >= 2", "answer": "What are project ids of projects that have 2 or more corresponding documents?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_type_code, COUNT(*) FROM Documents GROUP BY document_type_code", "answer": "List document type codes and the number of documents in each code.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_type_code, COUNT(*) FROM Documents GROUP BY document_type_code", "answer": "How many documents are there of each type?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the document type code with most number of documents?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the code of the document type that is most common.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING COUNT(*) < 3", "answer": "Show the document type code with fewer than 3 documents.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING COUNT(*) < 3", "answer": "What are the codes corresponding to document types for which there are less than 3 documents?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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'", "answer": "Show the statement detail and the corresponding document name for the statement with detail 'Private Project'.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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'", "answer": "What are the details for statements with the details 'Private Project', and what are the names of the corresponding documents?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_type_code, document_type_name, document_type_description FROM Ref_document_types", "answer": "Show all document type codes, document type names, document type descriptions.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_type_code, document_type_name, document_type_description FROM Ref_document_types", "answer": "What are the codes, names, and descriptions of the different document types?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_type_description FROM Ref_document_types WHERE document_type_name = 'Film'", "answer": "What is the document type description for document type named Film?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_type_description FROM Ref_document_types WHERE document_type_name = 'Film'", "answer": "Return the description of the document type name 'Film'.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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", "answer": "What is the document type name and the document type description and creation date for all the documents?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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", "answer": "Return the type name, type description, and date of creation for each document.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*) FROM Projects", "answer": "Show the number of projects.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*) FROM Projects", "answer": "How many projects are there?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT project_id, project_details FROM Projects", "answer": "List ids and details for all projects.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT project_id, project_details FROM Projects", "answer": "What are the ids and details for each project?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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", "answer": "What is the project id and detail for the project with at least two documents?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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", "answer": "Return the ids and details corresponding to projects for which there are more than two documents.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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'", "answer": "What is the project detail for the project with document 'King Book'?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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'", "answer": "Give the details of the project with the document name 'King Book'.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*) FROM Ref_budget_codes", "answer": "How many budget types do we have?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*) FROM Ref_budget_codes", "answer": "Count the number of budget codes.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT budget_type_code, budget_type_description FROM Ref_budget_codes", "answer": "List all budget type codes and descriptions.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT budget_type_code, budget_type_description FROM Ref_budget_codes", "answer": "What are the type codes and descriptions of each budget type?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = 'ORG'", "answer": "What is the description for the budget type with code ORG?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = 'ORG'", "answer": "Return the description of the budget type that has the code ORG.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*) FROM Documents_with_expenses", "answer": "How many documents have expenses?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*) FROM Documents_with_expenses", "answer": "Count the number of documents with expenses.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF'", "answer": "What are the document ids for the budget type code 'SF'?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF'", "answer": "Give the ids of documents with expenses that have the budget code 'SF'.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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", "answer": "Show the budget type code and description and the corresponding document id.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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", "answer": "Return the budget type codes, budget type descriptions and document ids for documents with expenses.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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'", "answer": "Show ids for all documents with budget types described as 'Government'.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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'", "answer": "Give the ids for documents that have the budget description 'Government'.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT budget_type_code, COUNT(*) FROM Documents_with_expenses GROUP BY budget_type_code", "answer": "Show budget type codes and the number of documents in each budget type.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT budget_type_code, COUNT(*) FROM Documents_with_expenses GROUP BY budget_type_code", "answer": "What are the different budget type codes, and how many documents are there for each?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the budget type code with most number of documents.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Give the budget type code that is most common among documents with expenses.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses", "answer": "What are the ids of documents which don't have expense budgets?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses", "answer": "Return the ids of documents that do not have expenses.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_id FROM Documents WHERE document_type_code = 'CV' EXCEPT SELECT document_id FROM Documents_with_expenses", "answer": "Show ids for all documents in type CV without expense budgets.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT document_id FROM Documents WHERE document_type_code = 'CV' EXCEPT SELECT document_id FROM Documents_with_expenses", "answer": "What are the ids of documents with the type code CV that do not have expenses.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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%'", "answer": "What are the ids of documents with letter 's' in the name with any expense budgets.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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%'", "answer": "Give the ids of documents that have expenses and contain the letter s in their names.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*) FROM Documents WHERE NOT document_id IN (SELECT document_id FROM Documents_with_expenses)", "answer": "How many documents do not have any expense?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*) FROM Documents WHERE NOT document_id IN (SELECT document_id FROM Documents_with_expenses)", "answer": "Count the number of documents that do not have expenses.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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'", "answer": "What are the dates for the documents with both 'GV' type and 'SF' type expenses?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "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'", "answer": "Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT MAX(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE '%5%'", "answer": "What are the account details with the largest value or with value having char '5' in it?\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT MAX(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE '%5%'", "answer": "Return the account details with the greatest value, as well as those that include the character 5.\nAdditional table information: table: cre_Docs_and_Epenses"} -{"question": "SELECT COUNT(*) FROM scientists", "answer": "Find the total number of scientists.\nAdditional table information: table: scientist_1"} -{"question": "SELECT COUNT(*) FROM scientists", "answer": "How many scientists are there?\nAdditional table information: table: scientist_1"} -{"question": "SELECT SUM(hours) FROM projects", "answer": "Find the total hours of all projects.\nAdditional table information: table: scientist_1"} -{"question": "SELECT SUM(hours) FROM projects", "answer": "What is the total number of hours for all projects?\nAdditional table information: table: scientist_1"} -{"question": "SELECT COUNT(DISTINCT scientist) FROM assignedto", "answer": "How many different scientists are assigned to any project?\nAdditional table information: table: scientist_1"} -{"question": "SELECT COUNT(DISTINCT scientist) FROM assignedto", "answer": "Count the number of different scientists assigned to any project.\nAdditional table information: table: scientist_1"} -{"question": "SELECT COUNT(DISTINCT name) FROM projects", "answer": "Find the number of distinct projects.\nAdditional table information: table: scientist_1"} -{"question": "SELECT COUNT(DISTINCT name) FROM projects", "answer": "How many different projects are there?\nAdditional table information: table: scientist_1"} -{"question": "SELECT AVG(hours) FROM projects", "answer": "Find the average hours of all projects.\nAdditional table information: table: scientist_1"} -{"question": "SELECT AVG(hours) FROM projects", "answer": "What is the average hours across all projects?\nAdditional table information: table: scientist_1"} -{"question": "SELECT name FROM projects ORDER BY hours DESC LIMIT 1", "answer": "Find the name of project that continues for the longest time.\nAdditional table information: table: scientist_1"} -{"question": "SELECT name FROM projects ORDER BY hours DESC LIMIT 1", "answer": "What is the name of the project with the most hours?\nAdditional table information: table: scientist_1"} -{"question": "SELECT name FROM projects WHERE hours > (SELECT AVG(hours) FROM projects)", "answer": "List the name of all projects that are operated longer than the average working hours of all projects.\nAdditional table information: table: scientist_1"} -{"question": "SELECT name FROM projects WHERE hours > (SELECT AVG(hours) FROM projects)", "answer": "What are the names of projects that have taken longer than the average number of hours for all projects?\nAdditional table information: table: scientist_1"} -{"question": "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", "answer": "Find the name and hours of project that has the most number of scientists.\nAdditional table information: table: scientist_1"} -{"question": "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", "answer": "What is the name and hours for the project which has the most scientists assigned to it?\nAdditional table information: table: scientist_1"} -{"question": "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%'", "answer": "Find the name of the project for which a scientist whose name contains \u2018Smith\u2019 is assigned to.\nAdditional table information: table: scientist_1"} -{"question": "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%'", "answer": "What is the name of the project that has a scientist assigned to it whose name contains 'Smith'?\nAdditional table information: table: scientist_1"} -{"question": "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'", "answer": "Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to.\nAdditional table information: table: scientist_1"} -{"question": "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'", "answer": "What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to?\nAdditional table information: table: scientist_1"} -{"question": "SELECT name FROM projects WHERE hours BETWEEN 100 AND 300", "answer": "Find the name of projects that require between 100 and 300 hours of work.\nAdditional table information: table: scientist_1"} -{"question": "SELECT name FROM projects WHERE hours BETWEEN 100 AND 300", "answer": "What are the names of projects that require between 100 and 300 hours?\nAdditional table information: table: scientist_1"} -{"question": "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'", "answer": "Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'.\nAdditional table information: table: scientist_1"} -{"question": "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'", "answer": "What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'?\nAdditional table information: table: scientist_1"} -{"question": "SELECT name FROM scientists ORDER BY name NULLS FIRST", "answer": "List the names of all scientists sorted in alphabetical order.\nAdditional table information: table: scientist_1"} -{"question": "SELECT name FROM scientists ORDER BY name NULLS FIRST", "answer": "What are the names of all the scientists in alphabetical order?\nAdditional table information: table: scientist_1"} -{"question": "SELECT COUNT(*), T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name", "answer": "Find the number of scientists involved for each project name.\nAdditional table information: table: scientist_1"} -{"question": "SELECT COUNT(*), T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name", "answer": "What are the naems of all the projects, and how many scientists were assigned to each of them?\nAdditional table information: table: scientist_1"} -{"question": "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", "answer": "Find the number of scientists involved for the projects that require more than 300 hours.\nAdditional table information: table: scientist_1"} -{"question": "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", "answer": "What are the names of projects that require more than 300 hours, and how many scientists are assigned to each?\nAdditional table information: table: scientist_1"} -{"question": "SELECT COUNT(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name", "answer": "Find the number of projects which each scientist is working on and scientist's name.\nAdditional table information: table: scientist_1"} -{"question": "SELECT COUNT(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name", "answer": "What are the names of the scientists, and how many projects are each of them working on?\nAdditional table information: table: scientist_1"} -{"question": "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)", "answer": "Find the SSN and name of scientists who are assigned to the project with the longest hours.\nAdditional table information: table: scientist_1"} -{"question": "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)", "answer": "What are the SSN and names of scientists working on the project with the most hours?\nAdditional table information: table: scientist_1"} -{"question": "SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn", "answer": "Find the name of scientists who are assigned to some project.\nAdditional table information: table: scientist_1"} -{"question": "SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn", "answer": "What are the names of scientists who are assigned to any project?\nAdditional table information: table: scientist_1"} -{"question": "SELECT Name FROM Projects WHERE NOT Code IN (SELECT Project FROM AssignedTo)", "answer": "Select the project names which are not assigned yet.\nAdditional table information: table: scientist_1"} -{"question": "SELECT Name FROM Projects WHERE NOT Code IN (SELECT Project FROM AssignedTo)", "answer": "What are the names of projects that have not been assigned?\nAdditional table information: table: scientist_1"} -{"question": "SELECT Name FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)", "answer": "Find the name of scientists who are not assigned to any project.\nAdditional table information: table: scientist_1"} -{"question": "SELECT Name FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)", "answer": "What are the names of scientists who have not been assigned a project?\nAdditional table information: table: scientist_1"} -{"question": "SELECT COUNT(*) FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)", "answer": "Find the number of scientists who are not assigned to any project.\nAdditional table information: table: scientist_1"} -{"question": "SELECT COUNT(*) FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)", "answer": "How many scientists do not have any projects assigned to them?\nAdditional table information: table: scientist_1"} -{"question": "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)", "answer": "Find the names of scientists who are not working on the project with the highest hours.\nAdditional table information: table: scientist_1"} -{"question": "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)", "answer": "What are the names of scientists who are not working on the project with the most hours?\nAdditional table information: table: scientist_1"} -{"question": "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 NULLS FIRST, T1.Name NULLS FIRST", "answer": "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.\nAdditional table information: table: scientist_1"} -{"question": "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 NULLS FIRST, T1.Name NULLS FIRST", "answer": "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.\nAdditional table information: table: scientist_1"} -{"question": "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)", "answer": "Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it.\nAdditional table information: table: scientist_1"} -{"question": "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)", "answer": "What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it?\nAdditional table information: table: scientist_1"} -{"question": "SELECT Name FROM WINE ORDER BY Score NULLS FIRST LIMIT 1", "answer": "What is the name of the highest rated wine?\nAdditional table information: table: wine_1"} -{"question": "SELECT Name FROM WINE ORDER BY Score NULLS FIRST LIMIT 1", "answer": "Give the name of the wine with the highest score.\nAdditional table information: table: wine_1"} -{"question": "SELECT Winery FROM WINE ORDER BY SCORE NULLS FIRST LIMIT 1", "answer": "Which winery is the wine that has the highest score from?\nAdditional table information: table: wine_1"} -{"question": "SELECT Winery FROM WINE ORDER BY SCORE NULLS FIRST LIMIT 1", "answer": "What is the winery at which the wine with the highest score was made?\nAdditional table information: table: wine_1"} -{"question": "SELECT Name FROM WINE WHERE YEAR = '2008'", "answer": "Find the names of all wines produced in 2008.\nAdditional table information: table: wine_1"} -{"question": "SELECT Name FROM WINE WHERE YEAR = '2008'", "answer": "What are the names of all wines produced in 2008?\nAdditional table information: table: wine_1"} -{"question": "SELECT Grape, Appelation FROM WINE", "answer": "List the grapes and appelations of all wines.\nAdditional table information: table: wine_1"} -{"question": "SELECT Grape, Appelation FROM WINE", "answer": "What are the grapes and appelations of each wine?\nAdditional table information: table: wine_1"} -{"question": "SELECT Name, Score FROM WINE", "answer": "List the names and scores of all wines.\nAdditional table information: table: wine_1"} -{"question": "SELECT Name, Score FROM WINE", "answer": "What are the names and scores of all wines?\nAdditional table information: table: wine_1"} -{"question": "SELECT Area, County FROM APPELLATIONS", "answer": "List the area and county of all appelations.\nAdditional table information: table: wine_1"} -{"question": "SELECT Area, County FROM APPELLATIONS", "answer": "What are the areas and counties for all appelations?\nAdditional table information: table: wine_1"} -{"question": "SELECT Price FROM WINE WHERE YEAR < 2010", "answer": "What are the prices of wines produced before the year of 2010?\nAdditional table information: table: wine_1"} -{"question": "SELECT Price FROM WINE WHERE YEAR < 2010", "answer": "Return the prices of wines produced before 2010.\nAdditional table information: table: wine_1"} -{"question": "SELECT Name FROM WINE WHERE score > 90", "answer": "List the names of all distinct wines that have scores higher than 90.\nAdditional table information: table: wine_1"} -{"question": "SELECT Name FROM WINE WHERE score > 90", "answer": "What are the names of wines with scores higher than 90?\nAdditional table information: table: wine_1"} -{"question": "SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red'", "answer": "List the names of all distinct wines that are made of red color grape.\nAdditional table information: table: wine_1"} -{"question": "SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red'", "answer": "What are the names of wines made from red grapes?\nAdditional table information: table: wine_1"} -{"question": "SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = 'North Coast'", "answer": "Find the names of all distinct wines that have appellations in North Coast area.\nAdditional table information: table: wine_1"} -{"question": "SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = 'North Coast'", "answer": "What are the distinct names of wines that have appellations in the North Coast area?\nAdditional table information: table: wine_1"} -{"question": "SELECT COUNT(*) FROM WINE WHERE Winery = 'Robert Biale'", "answer": "How many wines are produced at Robert Biale winery?\nAdditional table information: table: wine_1"} -{"question": "SELECT COUNT(*) FROM WINE WHERE Winery = 'Robert Biale'", "answer": "Count the number of wines produced at Robert Biale winery.\nAdditional table information: table: wine_1"} -{"question": "SELECT COUNT(*) FROM APPELLATIONS WHERE County = 'Napa'", "answer": "How many appelations are in Napa Country?\nAdditional table information: table: wine_1"} -{"question": "SELECT COUNT(*) FROM APPELLATIONS WHERE County = 'Napa'", "answer": "Count the number of appelations in Napa County.\nAdditional table information: table: wine_1"} -{"question": "SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma'", "answer": "Give me the average prices of wines that are produced by appelations in Sonoma County.\nAdditional table information: table: wine_1"} -{"question": "SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma'", "answer": "What is the average price of wines produced in appelations in Sonoma County?\nAdditional table information: table: wine_1"} -{"question": "SELECT T2.Name, T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'White'", "answer": "What are the names and scores of wines that are made of white color grapes?\nAdditional table information: table: wine_1"} -{"question": "SELECT T2.Name, T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'White'", "answer": "Give the names and scores of wines made from white grapes.\nAdditional table information: table: wine_1"} -{"question": "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", "answer": "Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005.\nAdditional table information: table: wine_1"} -{"question": "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", "answer": "What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005?\nAdditional table information: table: wine_1"} -{"question": "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", "answer": "Find the the grape whose white color grapes are used to produce wines with scores higher than 90.\nAdditional table information: table: wine_1"} -{"question": "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", "answer": "Find the white grape used to produce wines with scores above 90.\nAdditional table information: table: wine_1"} -{"question": "SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red' AND T2.price > 50", "answer": "What are the wines that have prices higher than 50 and made of Red color grapes?\nAdditional table information: table: wine_1"} -{"question": "SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red' AND T2.price > 50", "answer": "What are the names of wines made from red grapes and with prices above 50?\nAdditional table information: table: wine_1"} -{"question": "SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Monterey' AND T2.price < 50", "answer": "What are the wines that have prices lower than 50 and have appelations in Monterey county?\nAdditional table information: table: wine_1"} -{"question": "SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Monterey' AND T2.price < 50", "answer": "Give the neames of wines with prices below 50 and with appelations in Monterey county.\nAdditional table information: table: wine_1"} -{"question": "SELECT COUNT(*), Grape FROM WINE GROUP BY Grape", "answer": "What are the numbers of wines for different grapes?\nAdditional table information: table: wine_1"} -{"question": "SELECT COUNT(*), Grape FROM WINE GROUP BY Grape", "answer": "How many wines are there for each grape?\nAdditional table information: table: wine_1"} -{"question": "SELECT AVG(Price), YEAR FROM WINE GROUP BY YEAR", "answer": "What are the average prices of wines for different years?\nAdditional table information: table: wine_1"} -{"question": "SELECT AVG(Price), YEAR FROM WINE GROUP BY YEAR", "answer": "What is the average prices of wines for each each?\nAdditional table information: table: wine_1"} -{"question": "SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT MIN(Price) FROM wine WHERE Winery = 'John Anthony')", "answer": "Find the distinct names of all wines that have prices higher than some wines from John Anthony winery.\nAdditional table information: table: wine_1"} -{"question": "SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT MIN(Price) FROM wine WHERE Winery = 'John Anthony')", "answer": "What are the distinct names of wines with prices higher than any wine from John Anthony winery.\nAdditional table information: table: wine_1"} -{"question": "SELECT DISTINCT Name FROM WINE ORDER BY Name NULLS FIRST", "answer": "List the names of all distinct wines in alphabetical order.\nAdditional table information: table: wine_1"} -{"question": "SELECT DISTINCT Name FROM WINE ORDER BY Name NULLS FIRST", "answer": "What are the names of wines, sorted in alphabetical order?\nAdditional table information: table: wine_1"} -{"question": "SELECT DISTINCT Name FROM WINE ORDER BY price NULLS FIRST", "answer": "List the names of all distinct wines ordered by price.\nAdditional table information: table: wine_1"} -{"question": "SELECT DISTINCT Name FROM WINE ORDER BY price NULLS FIRST", "answer": "What are the names of wines, sorted by price ascending?\nAdditional table information: table: wine_1"} -{"question": "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", "answer": "What is the area of the appelation that produces the highest number of wines before the year of 2010?\nAdditional table information: table: wine_1"} -{"question": "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", "answer": "What is the area for the appelation which produced the most wines prior to 2010?\nAdditional table information: table: wine_1"} -{"question": "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", "answer": "What is the color of the grape whose wine products has the highest average price?\nAdditional table information: table: wine_1"} -{"question": "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", "answer": "Give the color of the grape whose wine products have the highest average price?\nAdditional table information: table: wine_1"} -{"question": "SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010", "answer": "Find the distinct names of wines produced before the year of 2000 or after the year of 2010.\nAdditional table information: table: wine_1"} -{"question": "SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010", "answer": "Give the distinct names of wines made before 2000 or after 2010.\nAdditional table information: table: wine_1"} -{"question": "SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100", "answer": "Find the distinct winery of wines having price between 50 and 100.\nAdditional table information: table: wine_1"} -{"question": "SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100", "answer": "What are the distinct wineries which produce wines costing between 50 and 100?\nAdditional table information: table: wine_1"} -{"question": "SELECT AVG(Price), AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = 'Zinfandel'", "answer": "What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape?\nAdditional table information: table: wine_1"} -{"question": "SELECT AVG(Price), AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = 'Zinfandel'", "answer": "Give the average price and case of wines made from Zinfandel grapes in the year 2009.\nAdditional table information: table: wine_1"} -{"question": "SELECT MAX(Price), MAX(Score) FROM WINE WHERE Appelation = 'St. Helena'", "answer": "What are the maximum price and score of wines produced by St. Helena appelation?\nAdditional table information: table: wine_1"} -{"question": "SELECT MAX(Price), MAX(Score) FROM WINE WHERE Appelation = 'St. Helena'", "answer": "Give the maximum price and score for wines produced in the appelation St. Helena.\nAdditional table information: table: wine_1"} -{"question": "SELECT MAX(Price), MAX(Score), YEAR FROM WINE GROUP BY YEAR", "answer": "What are the maximum price and score of wines in each year?\nAdditional table information: table: wine_1"} -{"question": "SELECT MAX(Price), MAX(Score), YEAR FROM WINE GROUP BY YEAR", "answer": "What are the maximum price and score of wines for each year?\nAdditional table information: table: wine_1"} -{"question": "SELECT AVG(Price), AVG(Score), Appelation FROM WINE GROUP BY Appelation", "answer": "What are the average price and score of wines grouped by appelation?\nAdditional table information: table: wine_1"} -{"question": "SELECT AVG(Price), AVG(Score), Appelation FROM WINE GROUP BY Appelation", "answer": "What are the average price and score of wines for each appelation?\nAdditional table information: table: wine_1"} -{"question": "SELECT Winery FROM WINE GROUP BY Winery HAVING COUNT(*) >= 4", "answer": "Find the wineries that have at least four wines.\nAdditional table information: table: wine_1"} -{"question": "SELECT Winery FROM WINE GROUP BY Winery HAVING COUNT(*) >= 4", "answer": "Which wineries produce at least four wines?\nAdditional table information: table: wine_1"} -{"question": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING COUNT(*) <= 3", "answer": "Find the country of all appelations who have at most three wines.\nAdditional table information: table: wine_1"} -{"question": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING COUNT(*) <= 3", "answer": "What are the countries for appelations with at most 3 wines?\nAdditional table information: table: wine_1"} -{"question": "SELECT Name FROM WINE WHERE YEAR < (SELECT MIN(YEAR) FROM WINE WHERE Winery = 'Brander')", "answer": "What are the names of wines whose production year are before the year of all wines by Brander winery?\nAdditional table information: table: wine_1"} -{"question": "SELECT Name FROM WINE WHERE YEAR < (SELECT MIN(YEAR) FROM WINE WHERE Winery = 'Brander')", "answer": "What are the names of wines produced before any wine from the Brander winery?\nAdditional table information: table: wine_1"} -{"question": "SELECT Name FROM WINE WHERE Price > (SELECT MAX(Price) FROM WINE WHERE YEAR = 2006)", "answer": "What are the names of wines that are more expensive then all wines made in the year 2006?\nAdditional table information: table: wine_1"} -{"question": "SELECT Name FROM WINE WHERE Price > (SELECT MAX(Price) FROM WINE WHERE YEAR = 2006)", "answer": "Give the names of wines with prices above any wine produced in 2006.\nAdditional table information: table: wine_1"} -{"question": "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", "answer": "Find the top 3 wineries with the greatest number of wines made of white color grapes.\nAdditional table information: table: wine_1"} -{"question": "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", "answer": "Which 3 wineries produce the most wines made from white grapes?\nAdditional table information: table: wine_1"} -{"question": "SELECT Grape, Winery, YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR NULLS FIRST", "answer": "List the grape, winery and year of the wines whose price is bigger than 100 ordered by year.\nAdditional table information: table: wine_1"} -{"question": "SELECT Grape, Winery, YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR NULLS FIRST", "answer": "What are the grapes, wineries and years for wines with price higher than 100, sorted by year?\nAdditional table information: table: wine_1"} -{"question": "SELECT Grape, Appelation, Name FROM WINE WHERE Score > 93 ORDER BY Name NULLS FIRST", "answer": "List the grape, appelation and name of wines whose score is higher than 93 ordered by Name.\nAdditional table information: table: wine_1"} -{"question": "SELECT Grape, Appelation, Name FROM WINE WHERE Score > 93 ORDER BY Name NULLS FIRST", "answer": "What are the grapes, appelations, and wines with scores above 93, sorted by Name?\nAdditional table information: table: wine_1"} -{"question": "SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = 'Central Coast'", "answer": "Find the appelations that produce wines after the year of 2008 but not in Central Coast area.\nAdditional table information: table: wine_1"} -{"question": "SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = 'Central Coast'", "answer": "What are the appelations for wines produced after 2008 but not in the Central Coast area?\nAdditional table information: table: wine_1"} -{"question": "SELECT AVG(price) FROM wine WHERE NOT Appelation IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma')", "answer": "Find the average price of wines that are not produced from Sonoma county.\nAdditional table information: table: wine_1"} -{"question": "SELECT AVG(price) FROM wine WHERE NOT Appelation IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma')", "answer": "What is the average price for wines not produced in Sonoma county?\nAdditional table information: table: wine_1"} -{"question": "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", "answer": "Find the county where produces the most number of wines with score higher than 90.\nAdditional table information: table: wine_1"} -{"question": "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", "answer": "What is the county that produces the most wines scoring higher than 90?\nAdditional table information: table: wine_1"} -{"question": "SELECT COUNT(*) FROM station", "answer": "How many train stations are there?\nAdditional table information: table: train_station"} -{"question": "SELECT name, LOCATION, number_of_platforms FROM station", "answer": "Show the name, location, and number of platforms for all stations.\nAdditional table information: table: train_station"} -{"question": "SELECT DISTINCT LOCATION FROM station", "answer": "What are all locations of train stations?\nAdditional table information: table: train_station"} -{"question": "SELECT name, total_passengers FROM station WHERE LOCATION <> 'London'", "answer": "Show the names and total passengers for all train stations not in London.\nAdditional table information: table: train_station"} -{"question": "SELECT name, main_services FROM station ORDER BY total_passengers DESC LIMIT 3", "answer": "Show the names and main services for train stations that have the top three total number of passengers.\nAdditional table information: table: train_station"} -{"question": "SELECT AVG(total_passengers), MAX(total_passengers) FROM station WHERE LOCATION = 'London' OR LOCATION = 'Glasgow'", "answer": "What is the average and maximum number of total passengers for train stations in London or Glasgow?\nAdditional table information: table: train_station"} -{"question": "SELECT LOCATION, SUM(number_of_platforms), SUM(total_passengers) FROM station GROUP BY LOCATION", "answer": "Show all locations and the total number of platforms and passengers for all train stations in each location.\nAdditional table information: table: train_station"} -{"question": "SELECT DISTINCT LOCATION FROM station WHERE number_of_platforms >= 15 AND total_passengers > 25", "answer": "Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers.\nAdditional table information: table: train_station"} -{"question": "SELECT LOCATION FROM station EXCEPT SELECT LOCATION FROM station WHERE number_of_platforms >= 15", "answer": "Show all locations which don't have a train station with at least 15 platforms.\nAdditional table information: table: train_station"} -{"question": "SELECT LOCATION FROM station GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the location with most number of train stations.\nAdditional table information: table: train_station"} -{"question": "SELECT name, TIME, service FROM train", "answer": "Show the name, time, and service for all trains.\nAdditional table information: table: train_station"} -{"question": "SELECT COUNT(*) FROM train", "answer": "Show the number of trains\nAdditional table information: table: train_station"} -{"question": "SELECT name, service FROM train ORDER BY TIME NULLS FIRST", "answer": "Show the name and service for all trains in order by time.\nAdditional table information: table: train_station"} -{"question": "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", "answer": "Show the station name and number of trains in each station.\nAdditional table information: table: train_station"} -{"question": "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", "answer": "show the train name and station name for each train.\nAdditional table information: table: train_station"} -{"question": "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", "answer": "Show all train names and times in stations in London in descending order by train time.\nAdditional table information: table: train_station"} -{"question": "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", "answer": "Show the station name with greatest number of trains.\nAdditional table information: table: train_station"} -{"question": "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", "answer": "Show the station name with at least two trains.\nAdditional table information: table: train_station"} -{"question": "SELECT LOCATION FROM station GROUP BY LOCATION HAVING COUNT(*) = 1", "answer": "Show all locations with only 1 station.\nAdditional table information: table: train_station"} -{"question": "SELECT name FROM station WHERE NOT station_id IN (SELECT station_id FROM train_station)", "answer": "Show station names without any trains.\nAdditional table information: table: train_station"} -{"question": "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'", "answer": "What are the names of the stations which serve both 'Ananthapuri Express' and 'Guruvayur Express' trains?\nAdditional table information: table: train_station"} -{"question": "SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id = T2.train_id WHERE NOT T1.station_id 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')", "answer": "Find the names of the trains that do not pass any station located in London.\nAdditional table information: table: train_station"} -{"question": "SELECT name, LOCATION FROM station ORDER BY Annual_entry_exit NULLS FIRST, Annual_interchanges NULLS FIRST", "answer": "List the names and locations of all stations ordered by their yearly entry exit and interchange amounts.\nAdditional table information: table: train_station"} -{"question": "SELECT vehicle_id FROM Vehicles", "answer": "List all vehicle id\nAdditional table information: table: driving_school"} -{"question": "SELECT vehicle_id FROM Vehicles", "answer": "What are the ids of all vehicles?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Vehicles", "answer": "How many vehicle in total?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Vehicles", "answer": "How many vehicles exist?\nAdditional table information: table: driving_school"} -{"question": "SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1", "answer": "Show the detail of vehicle with id 1.\nAdditional table information: table: driving_school"} -{"question": "SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1", "answer": "What are the details of the car with id 1?\nAdditional table information: table: driving_school"} -{"question": "SELECT first_name, middle_name, last_name FROM Staff", "answer": "List the first name middle name and last name of all staff.\nAdditional table information: table: driving_school"} -{"question": "SELECT first_name, middle_name, last_name FROM Staff", "answer": "What are the first, middle, and last names of all staff?\nAdditional table information: table: driving_school"} -{"question": "SELECT date_of_birth FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "What is the birthday of the staff member with first name as Janessa and last name as Sawayn?\nAdditional table information: table: driving_school"} -{"question": "SELECT date_of_birth FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "What is the date of birth for the staff member named Janessa Sawayn?\nAdditional table information: table: driving_school"} -{"question": "SELECT date_joined_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "When did the staff member with first name as Janessa and last name as Sawayn join the company?\nAdditional table information: table: driving_school"} -{"question": "SELECT date_joined_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "When did the staff member named Janessa Sawayn join the company?\nAdditional table information: table: driving_school"} -{"question": "SELECT date_left_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "When did the staff member with first name as Janessa and last name as Sawayn leave the company?\nAdditional table information: table: driving_school"} -{"question": "SELECT date_left_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "When did the staff member Janessa Sawayn leave the company?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Staff WHERE first_name = 'Ludie'", "answer": "How many staff have the first name Ludie?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Staff WHERE first_name = 'Ludie'", "answer": "How many employees have a first name of Ludie?\nAdditional table information: table: driving_school"} -{"question": "SELECT nickname FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "What is the nickname of staff with first name as Janessa and last name as Sawayn?\nAdditional table information: table: driving_school"} -{"question": "SELECT nickname FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "What is the nickname of the employee named Janessa Sawayn?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Staff", "answer": "How many staff in total?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Staff", "answer": "How many employees are there?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "Which city does staff with first name as Janessa and last name as Sawayn live?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "In what city does Janessa Sawayn live?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "Which country and state does staff with first name as Janessa and last name as Sawayn lived?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "In which country and state does Janessa Sawayn live?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "How long is the total lesson time took by the customer named Rylan Goodwin?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "What is the zip code of staff with first name as Janessa and last name as Sawayn lived?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "What is the zip code of the hosue of the employee named Janessa Sawayn?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Addresses WHERE state_province_county = 'Georgia'", "answer": "How many staff live in state Georgia?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Addresses WHERE state_province_county = 'Georgia'", "answer": "How many employees live in Georgia?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "Find out the first name and last name of staff lived in city Damianfort.\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "What is the first and last name of all employees who live in the city Damianfort?\nAdditional table information: table: driving_school"} -{"question": "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", "answer": "Which city lives most of staffs? List the city name and number of staffs.\nAdditional table information: table: driving_school"} -{"question": "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", "answer": "In which city do the most employees live and how many of them live there?\nAdditional table information: table: driving_school"} -{"question": "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", "answer": "List the states which have between 2 to 4 staffs living there.\nAdditional table information: table: driving_school"} -{"question": "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", "answer": "What are the names of the states that have 2 to 4 employees living there?\nAdditional table information: table: driving_school"} -{"question": "SELECT first_name, last_name FROM Customers", "answer": "List the first name and last name of all customers.\nAdditional table information: table: driving_school"} -{"question": "SELECT first_name, last_name FROM Customers", "answer": "What are the first and last names for all customers?\nAdditional table information: table: driving_school"} -{"question": "SELECT email_address, date_of_birth FROM Customers WHERE first_name = 'Carole'", "answer": "List email address and birthday of customer whose first name as Carole.\nAdditional table information: table: driving_school"} -{"question": "SELECT email_address, date_of_birth FROM Customers WHERE first_name = 'Carole'", "answer": "What are the email addresses and date of births for all customers who have a first name of Carole?\nAdditional table information: table: driving_school"} -{"question": "SELECT phone_number, email_address FROM Customers WHERE amount_outstanding > 2000", "answer": "List phone number and email address of customer with more than 2000 outstanding balance.\nAdditional table information: table: driving_school"} -{"question": "SELECT phone_number, email_address FROM Customers WHERE amount_outstanding > 2000", "answer": "What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000?\nAdditional table information: table: driving_school"} -{"question": "SELECT customer_status_code, cell_mobile_phone_number, email_address FROM Customers WHERE first_name = 'Marina' OR last_name = 'Kohler'", "answer": "What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina?\nAdditional table information: table: driving_school"} -{"question": "SELECT customer_status_code, cell_mobile_phone_number, email_address FROM Customers WHERE first_name = 'Marina' OR last_name = 'Kohler'", "answer": "What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina?\nAdditional table information: table: driving_school"} -{"question": "SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'", "answer": "When are the birthdays of customer who are classified as 'Good Customer' status?\nAdditional table information: table: driving_school"} -{"question": "SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'", "answer": "What is the date of birth of every customer whose status code is 'Good Customer'?\nAdditional table information: table: driving_school"} -{"question": "SELECT date_became_customer FROM Customers WHERE first_name = 'Carole' AND last_name = 'Bernhard'", "answer": "When did customer with first name as Carole and last name as Bernhard became a customer?\nAdditional table information: table: driving_school"} -{"question": "SELECT date_became_customer FROM Customers WHERE first_name = 'Carole' AND last_name = 'Bernhard'", "answer": "When did Carole Bernhard first become a customer?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Customers", "answer": "How many customers in total?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Customers", "answer": "How many customers are there?\nAdditional table information: table: driving_school"} -{"question": "SELECT customer_status_code, COUNT(*) FROM Customers GROUP BY customer_status_code", "answer": "List all customer status codes and the number of customers having each status code.\nAdditional table information: table: driving_school"} -{"question": "SELECT customer_status_code, COUNT(*) FROM Customers GROUP BY customer_status_code", "answer": "For each customer status code, how many customers are classified that way?\nAdditional table information: table: driving_school"} -{"question": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Which customer status code has least number of customers?\nAdditional table information: table: driving_school"} -{"question": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the status code with the least number of customers?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "How many lessons did the customer Ryan Goodwin complete?\nAdditional table information: table: driving_school"} -{"question": "SELECT MAX(amount_outstanding), MIN(amount_outstanding), AVG(amount_outstanding) FROM Customers", "answer": "What is maximum, minimum and average amount of outstanding of customer?\nAdditional table information: table: driving_school"} -{"question": "SELECT MAX(amount_outstanding), MIN(amount_outstanding), AVG(amount_outstanding) FROM Customers", "answer": "What is the maximum, minimum, and average amount of money outsanding for all customers?\nAdditional table information: table: driving_school"} -{"question": "SELECT first_name, last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000", "answer": "List the first name and last name of customers have the amount of outstanding between 1000 and 3000.\nAdditional table information: table: driving_school"} -{"question": "SELECT first_name, last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000", "answer": "What are the first and last names of all customers with between 1000 and 3000 dollars outstanding?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "List first name and last name of customers lived in city Lockmanfurt.\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "What are the first and last names of all customers who lived in Lockmanfurt?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "Which country does customer with first name as Carole and last name as Bernhard lived in?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "What is the country in which the customer Carole Bernhard lived?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "What is zip code of customer with first name as Carole and last name as Bernhard?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "What is the zip code of the customer Carole Bernhard?\nAdditional table information: table: driving_school"} -{"question": "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", "answer": "Which city does has most number of customers?\nAdditional table information: table: driving_school"} -{"question": "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", "answer": "What is the city with the most customers?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "How much in total does customer with first name as Carole and last name as Bernhard paid?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "What is the total amount of moeny paid by the customer Carole Bernhard?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Customer_Payments)", "answer": "List the number of customers that did not have any payment history.\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Customer_Payments)", "answer": "How many customers have no payment histories?\nAdditional table information: table: driving_school"} -{"question": "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", "answer": "List first name and last name of customers that have more than 2 payments.\nAdditional table information: table: driving_school"} -{"question": "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", "answer": "What are the first and last names of all customers with more than 2 payments?\nAdditional table information: table: driving_school"} -{"question": "SELECT payment_method_code, COUNT(*) FROM Customer_Payments GROUP BY payment_method_code", "answer": "List all payment methods and number of payments using each payment methods.\nAdditional table information: table: driving_school"} -{"question": "SELECT payment_method_code, COUNT(*) FROM Customer_Payments GROUP BY payment_method_code", "answer": "For each payment method, how many payments were made?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Lessons WHERE lesson_status_code = 'Cancelled'", "answer": "How many lessons were in cancelled state?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Lessons WHERE lesson_status_code = 'Cancelled'", "answer": "How many lessons have been cancelled?\nAdditional table information: table: driving_school"} -{"question": "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%'", "answer": "List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'.\nAdditional table information: table: driving_school"} -{"question": "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%'", "answer": "What are the the lesson ids of all staff taught by Janessa Sawayn whose nickname has the letter s?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE '%a%'", "answer": "How many lessons taught by staff whose first name has letter 'a' in it?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE '%a%'", "answer": "How many lessons were taught by a staff member whose first name has the letter 'a' in it?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "What is the total time for all lessons taught by Janessa Sawayn?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "What is average lesson price taught by staff with first name as Janessa and last name as Sawayn?\nAdditional table information: table: driving_school"} -{"question": "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'", "answer": "What is the average price for a lesson taught by Janessa Sawayn?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Ray'", "answer": "How many lesson does customer with first name Ray took?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Ray'", "answer": "How many lessons did the customer with the first name Ray take?\nAdditional table information: table: driving_school"} -{"question": "SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff", "answer": "Which last names are both used by customers and by staff?\nAdditional table information: table: driving_school"} -{"question": "SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff", "answer": "What are the last names that are used by customers and staff?\nAdditional table information: table: driving_school"} -{"question": "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", "answer": "What is the first name of the staff who did not give any lesson?\nAdditional table information: table: driving_school"} -{"question": "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", "answer": "What is the first name of all employees who do not give any lessons?\nAdditional table information: table: driving_school"} -{"question": "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", "answer": "What is the id and detail of the vehicle used in lessons for most of the times?\nAdditional table information: table: driving_school"} -{"question": "SELECT COUNT(*) FROM Faculty", "answer": "How many faculty do we have?\nAdditional table information: table: activity_1"} -{"question": "SELECT COUNT(*) FROM Faculty", "answer": "What is the total number of faculty members?\nAdditional table information: table: activity_1"} -{"question": "SELECT DISTINCT rank FROM Faculty", "answer": "What ranks do we have for faculty?\nAdditional table information: table: activity_1"} -{"question": "SELECT DISTINCT rank FROM Faculty", "answer": "Find the list of distinct ranks for faculty.\nAdditional table information: table: activity_1"} -{"question": "SELECT DISTINCT building FROM Faculty", "answer": "Show all the distinct buildings that have faculty rooms.\nAdditional table information: table: activity_1"} -{"question": "SELECT DISTINCT building FROM Faculty", "answer": "What buildings have faculty offices?\nAdditional table information: table: activity_1"} -{"question": "SELECT rank, Fname, Lname FROM Faculty", "answer": "Show the rank, first name, and last name for all the faculty.\nAdditional table information: table: activity_1"} -{"question": "SELECT rank, Fname, Lname FROM Faculty", "answer": "What are the rank, first name, and last name of the faculty members?\nAdditional table information: table: activity_1"} -{"question": "SELECT Fname, Lname, phone FROM Faculty WHERE Sex = 'F'", "answer": "Show the first name, last name, and phone number for all female faculty members.\nAdditional table information: table: activity_1"} -{"question": "SELECT Fname, Lname, phone FROM Faculty WHERE Sex = 'F'", "answer": "What are the first name, last name, and phone number of all the female faculty members?\nAdditional table information: table: activity_1"} -{"question": "SELECT FacID FROM Faculty WHERE Sex = 'M'", "answer": "Show ids for all the male faculty.\nAdditional table information: table: activity_1"} -{"question": "SELECT FacID FROM Faculty WHERE Sex = 'M'", "answer": "What are the faculty ids of all the male faculty members?\nAdditional table information: table: activity_1"} -{"question": "SELECT COUNT(*) FROM Faculty WHERE Sex = 'F' AND Rank = 'Professor'", "answer": "How many female Professors do we have?\nAdditional table information: table: activity_1"} -{"question": "SELECT COUNT(*) FROM Faculty WHERE Sex = 'F' AND Rank = 'Professor'", "answer": "Count the number of female Professors we have.\nAdditional table information: table: activity_1"} -{"question": "SELECT phone, room, building FROM Faculty WHERE Fname = 'Jerry' AND Lname = 'Prince'", "answer": "Show the phone, room, and building for the faculty named Jerry Prince.\nAdditional table information: table: activity_1"} -{"question": "SELECT phone, room, building FROM Faculty WHERE Fname = 'Jerry' AND Lname = 'Prince'", "answer": "What are the phone, room, and building of the faculty member called Jerry Prince?\nAdditional table information: table: activity_1"} -{"question": "SELECT COUNT(*) FROM Faculty WHERE Rank = 'Professor' AND building = 'NEB'", "answer": "How many Professors are in building NEB?\nAdditional table information: table: activity_1"} -{"question": "SELECT COUNT(*) FROM Faculty WHERE Rank = 'Professor' AND building = 'NEB'", "answer": "Count the number of Professors who have office in building NEB.\nAdditional table information: table: activity_1"} -{"question": "SELECT fname, lname FROM Faculty WHERE Rank = 'Instructor'", "answer": "Show the first name and last name for all the instructors.\nAdditional table information: table: activity_1"} -{"question": "SELECT fname, lname FROM Faculty WHERE Rank = 'Instructor'", "answer": "What are the first name and last name of all the instructors?\nAdditional table information: table: activity_1"} -{"question": "SELECT building, COUNT(*) FROM Faculty GROUP BY building", "answer": "Show all the buildings along with the number of faculty members the buildings have.\nAdditional table information: table: activity_1"} -{"question": "SELECT building, COUNT(*) FROM Faculty GROUP BY building", "answer": "How many faculty members does each building have? List the result with the name of the building.\nAdditional table information: table: activity_1"} -{"question": "SELECT building FROM Faculty GROUP BY building ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which building has most faculty members?\nAdditional table information: table: activity_1"} -{"question": "SELECT building FROM Faculty GROUP BY building ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the building that has the largest number of faculty members.\nAdditional table information: table: activity_1"} -{"question": "SELECT building FROM Faculty WHERE rank = 'Professor' GROUP BY building HAVING COUNT(*) >= 10", "answer": "Show all the buildings that have at least 10 professors.\nAdditional table information: table: activity_1"} -{"question": "SELECT building FROM Faculty WHERE rank = 'Professor' GROUP BY building HAVING COUNT(*) >= 10", "answer": "In which buildings are there at least ten professors?\nAdditional table information: table: activity_1"} -{"question": "SELECT rank, COUNT(*) FROM Faculty GROUP BY rank", "answer": "For each faculty rank, show the number of faculty members who have it.\nAdditional table information: table: activity_1"} -{"question": "SELECT rank, COUNT(*) FROM Faculty GROUP BY rank", "answer": "How many faculty members do we have for each faculty rank?\nAdditional table information: table: activity_1"} -{"question": "SELECT rank, sex, COUNT(*) FROM Faculty GROUP BY rank, sex", "answer": "Show all the ranks and the number of male and female faculty for each rank.\nAdditional table information: table: activity_1"} -{"question": "SELECT rank, sex, COUNT(*) FROM Faculty GROUP BY rank, sex", "answer": "How many faculty members do we have for each rank and gender?\nAdditional table information: table: activity_1"} -{"question": "SELECT rank FROM Faculty GROUP BY rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Which rank has the smallest number of faculty members?\nAdditional table information: table: activity_1"} -{"question": "SELECT rank FROM Faculty GROUP BY rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Find the faculty rank that has the least members.\nAdditional table information: table: activity_1"} -{"question": "SELECT sex, COUNT(*) FROM Faculty WHERE rank = 'AsstProf' GROUP BY sex", "answer": "Show the number of male and female assistant professors.\nAdditional table information: table: activity_1"} -{"question": "SELECT sex, COUNT(*) FROM Faculty WHERE rank = 'AsstProf' GROUP BY sex", "answer": "How many male and female assistant professors do we have?\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "What are the first name and last name of Linda Smith's advisor?\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "Who is the advisor of Linda Smith? Give me the first name and last name.\nAdditional table information: table: activity_1"} -{"question": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = 'Professor'", "answer": "Show the ids of students whose advisors are professors.\nAdditional table information: table: activity_1"} -{"question": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = 'Professor'", "answer": "Which students have professors as their advisors? Find their student ids.\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "Show first name and last name for all the students advised by Michael Goodrich.\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "Which students are advised by Michael Goodrich? Give me their first and last names.\nAdditional table information: table: activity_1"} -{"question": "SELECT T1.FacID, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID", "answer": "Show the faculty id of each faculty member, along with the number of students he or she advises.\nAdditional table information: table: activity_1"} -{"question": "SELECT T1.FacID, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID", "answer": "What are the faculty id and the number of students each faculty has?\nAdditional table information: table: activity_1"} -{"question": "SELECT T1.rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank", "answer": "Show all the faculty ranks and the number of students advised by each rank.\nAdditional table information: table: activity_1"} -{"question": "SELECT T1.rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank", "answer": "How many students are advised by each rank of faculty? List the rank and the number of students.\nAdditional table information: table: activity_1"} -{"question": "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", "answer": "What are the first and last name of the faculty who has the most students?\nAdditional table information: table: activity_1"} -{"question": "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", "answer": "Give me the the first and last name of the faculty who advises the most students.\nAdditional table information: table: activity_1"} -{"question": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING COUNT(*) >= 2", "answer": "Show the ids for all the faculty members who have at least 2 students.\nAdditional table information: table: activity_1"} -{"question": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING COUNT(*) >= 2", "answer": "Which faculty members advise two ore more students? Give me their faculty ids.\nAdditional table information: table: activity_1"} -{"question": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student", "answer": "Show ids for the faculty members who don't advise any student.\nAdditional table information: table: activity_1"} -{"question": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student", "answer": "What are the ids of the faculty members who do not advise any student.\nAdditional table information: table: activity_1"} -{"question": "SELECT activity_name FROM Activity", "answer": "What activities do we have?\nAdditional table information: table: activity_1"} -{"question": "SELECT activity_name FROM Activity", "answer": "List all the activities we have.\nAdditional table information: table: activity_1"} -{"question": "SELECT COUNT(*) FROM Activity", "answer": "How many activities do we have?\nAdditional table information: table: activity_1"} -{"question": "SELECT COUNT(*) FROM Activity", "answer": "Find the number of activities available.\nAdditional table information: table: activity_1"} -{"question": "SELECT COUNT(DISTINCT FacID) FROM Faculty_participates_in", "answer": "How many faculty members participate in an activity?\nAdditional table information: table: activity_1"} -{"question": "SELECT COUNT(DISTINCT FacID) FROM Faculty_participates_in", "answer": "Give me the number of faculty members who participate in an activity\nAdditional table information: table: activity_1"} -{"question": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in", "answer": "Show the ids of the faculty who don't participate in any activity.\nAdditional table information: table: activity_1"} -{"question": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in", "answer": "Which faculty do not participate in any activity? Find their faculty ids.\nAdditional table information: table: activity_1"} -{"question": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student", "answer": "Show the ids of all the faculty members who participate in an activity and advise a student.\nAdditional table information: table: activity_1"} -{"question": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student", "answer": "What are ids of the faculty members who not only participate in an activity but also advise a student.\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "How many activities does Mark Giuliano participate in?\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "Find the number of activities Mark Giuliano is involved in.\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "Show the names of all the activities Mark Giuliano participates in.\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "What are the names of the activities Mark Giuliano is involved in\nAdditional table information: table: activity_1"} -{"question": "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", "answer": "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.\nAdditional table information: table: activity_1"} -{"question": "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", "answer": "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.\nAdditional table information: table: activity_1"} -{"question": "SELECT T1.activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID", "answer": "Show all the activity names and the number of faculty involved in each activity.\nAdditional table information: table: activity_1"} -{"question": "SELECT T1.activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID", "answer": "How many faculty members participate in each activity? Return the activity names and the number of faculty members.\nAdditional table information: table: activity_1"} -{"question": "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", "answer": "What is the first and last name of the faculty participating in the most activities?\nAdditional table information: table: activity_1"} -{"question": "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", "answer": "Find the first and last name of the faculty who is involved in the largest number of activities.\nAdditional table information: table: activity_1"} -{"question": "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", "answer": "What is the name of the activity that has the most faculty members involved in?\nAdditional table information: table: activity_1"} -{"question": "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", "answer": "Which activity has the most faculty members participating in? Find the activity name.\nAdditional table information: table: activity_1"} -{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in", "answer": "Show the ids of the students who don't participate in any activity.\nAdditional table information: table: activity_1"} -{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in", "answer": "What are the ids of the students who are not involved in any activity\nAdditional table information: table: activity_1"} -{"question": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20", "answer": "Show the ids for all the students who participate in an activity and are under 20.\nAdditional table information: table: activity_1"} -{"question": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20", "answer": "What are the ids of the students who are under 20 years old and are involved in at least one activity.\nAdditional table information: table: activity_1"} -{"question": "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", "answer": "What is the first and last name of the student participating in the most activities?\nAdditional table information: table: activity_1"} -{"question": "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", "answer": "Tell me the first and last name of the student who has the most activities.\nAdditional table information: table: activity_1"} -{"question": "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", "answer": "What is the name of the activity with the most students?\nAdditional table information: table: activity_1"} -{"question": "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", "answer": "Find the name of the activity that has the largest number of student participants.\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "Find the first names of the faculty members who are playing Canoeing or Kayaking.\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "Which faculty members are playing either Canoeing or Kayaking? Tell me their first names.\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "Find the first names of professors who are not playing Canoeing or Kayaking.\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "What are the first names of the professors who do not play Canoeing or Kayaking as activities?\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "Find the first names of the faculty members who participate in Canoeing and Kayaking.\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "What are the first names of the faculty members playing both Canoeing and Kayaking?\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "Find the ids of the students who participate in Canoeing and Kayaking.\nAdditional table information: table: activity_1"} -{"question": "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'", "answer": "Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids.\nAdditional table information: table: activity_1"} -{"question": "SELECT name FROM airports WHERE city = 'Goroka'", "answer": "Find the name of the airport in the city of Goroka.\nAdditional table information: table: flight_4"} -{"question": "SELECT name FROM airports WHERE city = 'Goroka'", "answer": "What are the names of the airports in the city of Goroka?\nAdditional table information: table: flight_4"} -{"question": "SELECT name, city, country, elevation FROM airports WHERE city = 'New York'", "answer": "Find the name, city, country, and altitude (or elevation) of the airports in the city of New York.\nAdditional table information: table: flight_4"} -{"question": "SELECT name, city, country, elevation FROM airports WHERE city = 'New York'", "answer": "What is the name, city, country, and elevation for every airport in the city of New York?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM airlines", "answer": "How many airlines are there?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM airlines", "answer": "What is the total number of airlines?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM airlines WHERE country = 'Russia'", "answer": "How many airlines does Russia has?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM airlines WHERE country = 'Russia'", "answer": "What is the number of airlines based in Russia?\nAdditional table information: table: flight_4"} -{"question": "SELECT MAX(elevation) FROM airports WHERE country = 'Iceland'", "answer": "What is the maximum elevation of all airports in the country of Iceland?\nAdditional table information: table: flight_4"} -{"question": "SELECT MAX(elevation) FROM airports WHERE country = 'Iceland'", "answer": "What is the highest elevation of an airport in the country of Iceland?\nAdditional table information: table: flight_4"} -{"question": "SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina'", "answer": "Find the name of the airports located in Cuba or Argentina.\nAdditional table information: table: flight_4"} -{"question": "SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina'", "answer": "What are the names of all airports in Cuba or Argentina?\nAdditional table information: table: flight_4"} -{"question": "SELECT country FROM airlines WHERE name LIKE 'Orbit%'", "answer": "Find the country of the airlines whose name starts with 'Orbit'.\nAdditional table information: table: flight_4"} -{"question": "SELECT country FROM airlines WHERE name LIKE 'Orbit%'", "answer": "What are the countries of all airlines whose names start with Orbit?\nAdditional table information: table: flight_4"} -{"question": "SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50", "answer": "Find the name of airports whose altitude is between -50 and 50.\nAdditional table information: table: flight_4"} -{"question": "SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50", "answer": "What are the names of all airports whose elevation is between -50 and 50?\nAdditional table information: table: flight_4"} -{"question": "SELECT country FROM airports ORDER BY elevation DESC LIMIT 1", "answer": "Which country is the airport that has the highest altitude located in?\nAdditional table information: table: flight_4"} -{"question": "SELECT country FROM airports ORDER BY elevation DESC LIMIT 1", "answer": "What is the country of the airport with the highest elevation?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM airports WHERE name LIKE '%International%'", "answer": "Find the number of airports whose name contain the word 'International'.\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM airports WHERE name LIKE '%International%'", "answer": "How many airports' names have the word Interanation in them?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland'", "answer": "How many different cities do have some airport in the country of Greenland?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland'", "answer": "In how many cities are there airports in the country of Greenland?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'", "answer": "Find the number of routes operated by American Airlines.\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'", "answer": "How many routes does American Airlines operate?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada'", "answer": "Find the number of routes whose destination airports are in Canada.\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada'", "answer": "How many routes end in a Canadian airport?\nAdditional table information: table: flight_4"} -{"question": "SELECT name, city, country FROM airports ORDER BY elevation NULLS FIRST LIMIT 1", "answer": "Find the name, city, and country of the airport that has the lowest altitude.\nAdditional table information: table: flight_4"} -{"question": "SELECT name, city, country FROM airports ORDER BY elevation NULLS FIRST LIMIT 1", "answer": "What is the name, city, and country of the airport with the lowest altitude?\nAdditional table information: table: flight_4"} -{"question": "SELECT name, city, country FROM airports ORDER BY elevation DESC LIMIT 1", "answer": "Find the name, city, and country of the airport that has the highest latitude.\nAdditional table information: table: flight_4"} -{"question": "SELECT name, city, country FROM airports ORDER BY elevation DESC LIMIT 1", "answer": "What is the name, city, and country of the airport with the highest elevation?\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "Find the name and city of the airport which is the destination of the most number of routes.\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "What is the name and city of the airport that the most routes end at?\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "Find the names of the top 10 airlines that operate the most number of routes.\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "For the airline ids with the top 10 most routes operated, what are their names?\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "Find the name and city of the airport which is the source for the most number of flight routes.\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "What is the name and city of the airport from most of the routes start?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'", "answer": "Find the number of different airports which are the destinations of the American Airlines.\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'", "answer": "What is the number of different different airports that are destinations for American Airlines?\nAdditional table information: table: flight_4"} -{"question": "SELECT country FROM airlines GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which countries has the most number of airlines?\nAdditional table information: table: flight_4"} -{"question": "SELECT country FROM airlines GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the country with the most number of home airlines?\nAdditional table information: table: flight_4"} -{"question": "SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which countries has the most number of airlines whose active status is 'Y'?\nAdditional table information: table: flight_4"} -{"question": "SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the countries with the most airlines whose active status is Y?\nAdditional table information: table: flight_4"} -{"question": "SELECT country, COUNT(*) FROM airlines GROUP BY country ORDER BY COUNT(*) DESC", "answer": "List all countries and their number of airlines in the descending order of number of airlines.\nAdditional table information: table: flight_4"} -{"question": "SELECT country, COUNT(*) FROM airlines GROUP BY country ORDER BY COUNT(*) DESC", "answer": "How many airlines operate out of each country in descending order?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*), country FROM airports GROUP BY country ORDER BY COUNT(*) DESC", "answer": "How many airports are there per country? Order the countries by decreasing number of airports.\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*), country FROM airports GROUP BY country ORDER BY COUNT(*) DESC", "answer": "What is the number of airports per country, ordered from most to least?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*), city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY COUNT(*) DESC", "answer": "How many airports are there per city in the United States? Order the cities by decreasing number of airports.\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*), city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY COUNT(*) DESC", "answer": "How many airports are there per city in the US ordered from most to least?\nAdditional table information: table: flight_4"} -{"question": "SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING COUNT(*) > 3", "answer": "Return the cities with more than 3 airports in the United States.\nAdditional table information: table: flight_4"} -{"question": "SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING COUNT(*) > 3", "answer": "What is the number of cities in the United States with more than 3 airports?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3)", "answer": "How many cities are there that have more than 3 airports?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3)", "answer": "What is the count of cities with more than 3 airports?\nAdditional table information: table: flight_4"} -{"question": "SELECT city, COUNT(*) FROM airports GROUP BY city HAVING COUNT(*) > 1", "answer": "List the cities which have more than one airport and number of airports.\nAdditional table information: table: flight_4"} -{"question": "SELECT city, COUNT(*) FROM airports GROUP BY city HAVING COUNT(*) > 1", "answer": "What are the names of all cities with more than one airport and how many airports do they have?\nAdditional table information: table: flight_4"} -{"question": "SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 2 ORDER BY COUNT(*) NULLS FIRST", "answer": "List the cities which have more than 2 airports sorted by the number of airports.\nAdditional table information: table: flight_4"} -{"question": "SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 2 ORDER BY COUNT(*) NULLS FIRST", "answer": "What are the cities that have more than 2 airports sorted by number of airports?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name", "answer": "Find the number of routes for each source airport and the airport name.\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name", "answer": "For each airport name, how many routes start at that airport?\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "Find the number of routes and airport name for each source airport, order the results by decreasing number of routes.\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "For each airport name, how many routes start at that airport, ordered from most to least?\nAdditional table information: table: flight_4"} -{"question": "SELECT AVG(elevation), country FROM airports GROUP BY country", "answer": "Find the average elevation of all airports for each country.\nAdditional table information: table: flight_4"} -{"question": "SELECT AVG(elevation), country FROM airports GROUP BY country", "answer": "For each country, what is the average elevation of that country's airports?\nAdditional table information: table: flight_4"} -{"question": "SELECT city FROM airports GROUP BY city HAVING COUNT(*) = 2", "answer": "Find the cities which have exactly two airports.\nAdditional table information: table: flight_4"} -{"question": "SELECT city FROM airports GROUP BY city HAVING COUNT(*) = 2", "answer": "What are the cities with exactly two airports?\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "For each country and airline name, how many routes are there?\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "What is the total number of routes for each country and airline in that country?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy'", "answer": "Find the number of routes with destination airports in Italy.\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy'", "answer": "What is the number of routes whose destinations are Italian airports?\nAdditional table information: table: flight_4"} -{"question": "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'", "answer": "Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'.\nAdditional table information: table: flight_4"} -{"question": "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'", "answer": "What is the number of routes operated by the airline American Airlines whose destinations are in Italy?\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport'", "answer": "Find the number of routes that have destination John F Kennedy International Airport.\nAdditional table information: table: flight_4"} -{"question": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport'", "answer": "What is the number of routes that end at John F Kennedy International Airport?\nAdditional table information: table: flight_4"} -{"question": "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')", "answer": "Find the number of routes from the United States to Canada.\nAdditional table information: table: flight_4"} -{"question": "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')", "answer": "How many routes go from the United States to Canada?\nAdditional table information: table: flight_4"} -{"question": "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')", "answer": "Find the id of routes whose source and destination airports are in the United States.\nAdditional table information: table: flight_4"} -{"question": "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')", "answer": "What is the id of the routes whose source and destination airports are in the United States?\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "Find the name of airline which runs the most number of routes.\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "What is the name of the airline with the most routes?\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "Find the busiest source airport that runs most number of routes in China.\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "What is the name of the airport with the most number of routes that start in China?\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "Find the busiest destination airport that runs most number of routes in China.\nAdditional table information: table: flight_4"} -{"question": "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", "answer": "What is the name of the airport that is the destination of the most number of routes that start in China?\nAdditional table information: table: flight_4"} -{"question": "SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1", "answer": "What is the id of the most recent order?\nAdditional table information: table: tracking_orders"} -{"question": "SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1", "answer": "Find the id of the order made most recently.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT order_id, customer_id FROM orders ORDER BY date_order_placed NULLS FIRST LIMIT 1", "answer": "what are the order id and customer id of the oldest order?\nAdditional table information: table: tracking_orders"} -{"question": "SELECT order_id, customer_id FROM orders ORDER BY date_order_placed NULLS FIRST LIMIT 1", "answer": "Find the order id and customer id associated with the oldest order.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT order_id FROM shipments WHERE shipment_tracking_number = '3452'", "answer": "Find the id of the order whose shipment tracking number is '3452'.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT order_id FROM shipments WHERE shipment_tracking_number = '3452'", "answer": "Which order's shipment tracking number is '3452'? Give me the id of the order.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT order_item_id FROM order_items WHERE product_id = 11", "answer": "Find the ids of all the order items whose product id is 11.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT order_item_id FROM order_items WHERE product_id = 11", "answer": "Find all the order items whose product id is 11. What are the order item ids?\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "List the name of all the distinct customers who have orders with status 'Packing'.\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "Which customers have orders with status 'Packing'? Give me the customer names.\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "Find the details of all the distinct customers who have orders with status 'On Road'.\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "What are the distinct customers who have orders with status 'On Road'? Give me the customer details?\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "What is the name of the customer who has the most orders?\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "Which customer made the most orders? Find the customer name.\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "What is the customer id of the customer who has the most orders?\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "Find the id of the customer who made the most orders.\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "Give me a list of id and status of orders which belong to the customer named 'Jeramie'.\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "Which orders are made by the customer named 'Jeramie'? Give me the order ids and status.\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "Find the dates of orders which belong to the customer named 'Jeramie'.\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "What are the dates of the orders made by the customer named 'Jeramie'?\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01.\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "Which customers made orders between 2009-01-01 and 2010-01-01? Find their names.\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01?\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "What are the distinct ids of products ordered between 1975-01-01 and 1976-01-01??\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "Find the names of the customers who have order status both 'On Road' and 'Shipped'.\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "Which customers have both 'On Road' and 'Shipped' as order status? List the customer names.\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "Find the id of the customers who have order status both 'On Road' and 'Shipped'.\nAdditional table information: table: tracking_orders"} -{"question": "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'", "answer": "Which customers have both 'On Road' and 'Shipped' as order status? List the customer ids.\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "When was the order placed whose shipment tracking number is 3452? Give me the date.\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "On which day was the order placed whose shipment tracking number is 3452?\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "What is the placement date of the order whose invoice number is 10?\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "On what day was the order with invoice number 10 placed?\nAdditional table information: table: tracking_orders"} -{"question": "SELECT COUNT(*), T3.product_id FROM orders AS T1, 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", "answer": "List the count and id of each product in all the orders.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT COUNT(*), T3.product_id FROM orders AS T1, 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", "answer": "For each product, return its id and the number of times it was ordered.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT T3.product_name, COUNT(*) FROM orders AS T1, 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", "answer": "List the name and count of each product in all orders.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT T3.product_name, COUNT(*) FROM orders AS T1, 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", "answer": "For each product, show its name and the number of times it was ordered.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT order_id FROM shipments WHERE shipment_date > '2000-01-01'", "answer": "Find the ids of orders which are shipped after 2000-01-01.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT order_id FROM shipments WHERE shipment_date > '2000-01-01'", "answer": "Which orders have shipment after 2000-01-01? Give me the order ids.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT order_id FROM shipments WHERE shipment_date = (SELECT MAX(shipment_date) FROM shipments)", "answer": "Find the id of the order which is shipped most recently.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT order_id FROM shipments WHERE shipment_date = (SELECT MAX(shipment_date) FROM shipments)", "answer": "Which order has the most recent shipment? Give me the order id.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT DISTINCT product_name FROM products ORDER BY product_name NULLS FIRST", "answer": "List the names of all distinct products in alphabetical order.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT DISTINCT product_name FROM products ORDER BY product_name NULLS FIRST", "answer": "Sort all the distinct products in alphabetical order.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed NULLS FIRST", "answer": "List the ids of all distinct orders ordered by placed date.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed NULLS FIRST", "answer": "What are ids of the all distinct orders, sorted by placement date?\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "What is the id of the order which has the most items?\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "Which order deals with the most items? Return the order id.\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "What is the name of the customer who has the largest number of orders?\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "Find the name of the customer who made the most orders.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT invoice_number FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25'", "answer": "Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT invoice_number FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25'", "answer": "What are the invoice numbers created before 1989-09-03 or after 2007-12-25?\nAdditional table information: table: tracking_orders"} -{"question": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25'", "answer": "Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25'", "answer": "What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25?\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "For each customer who has at least two orders, find the customer name and number of orders made.\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "Which customers have made at least two orders? Give me each customer name and number of orders made.\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "Find the name of the customers who have at most two orders.\nAdditional table information: table: tracking_orders"} -{"question": "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", "answer": "What are the names of the customers who have made two or less orders?\nAdditional table information: table: tracking_orders"} -{"question": "SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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", "answer": "List the names of the customers who have once bought product 'food'.\nAdditional table information: table: tracking_orders"} -{"question": "SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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", "answer": "What are the names of the customers who bought product 'food' at least once?\nAdditional table information: table: tracking_orders"} -{"question": "SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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", "answer": "List the names of customers who have once canceled the purchase of the product 'food' (the item status is 'Cancel').\nAdditional table information: table: tracking_orders"} -{"question": "SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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", "answer": "Which customers have ever canceled the purchase of the product 'food' (the item status is 'Cancel')?\nAdditional table information: table: tracking_orders"} -{"question": "SELECT COUNT(*) FROM architect WHERE gender = 'female'", "answer": "How many architects are female?\nAdditional table information: table: architecture"} -{"question": "SELECT name, nationality, id FROM architect WHERE gender = 'male' ORDER BY name NULLS FIRST", "answer": "List the name, nationality and id of all male architects ordered by their names lexicographically.\nAdditional table information: table: architecture"} -{"question": "SELECT MAX(T1.length_meters), T2.name FROM bridge AS T1 JOIN architect AS T2 ON T1.architect_id = T2.id", "answer": "What is the maximum length in meters for the bridges and what are the architects' names?\nAdditional table information: table: architecture"} -{"question": "SELECT AVG(length_feet) FROM bridge", "answer": "What is the average length in feet of the bridges?\nAdditional table information: table: architecture"} -{"question": "SELECT name, built_year FROM mill WHERE TYPE = 'Grondzeiler'", "answer": "What are the names and year of construction for the mills of 'Grondzeiler' type?\nAdditional table information: table: architecture"} -{"question": "SELECT DISTINCT T1.name, T1.nationality FROM architect AS T1 JOIN mill AS t2 ON T1.id = T2.architect_id", "answer": "What are the distinct names and nationalities of the architects who have ever built a mill?\nAdditional table information: table: architecture"} -{"question": "SELECT name FROM mill WHERE LOCATION <> 'Donceel'", "answer": "What are the names of the mills which are not located in 'Donceel'?\nAdditional table information: table: architecture"} -{"question": "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'", "answer": "What are the distinct types of mills that are built by American or Canadian architects?\nAdditional table information: table: architecture"} -{"question": "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", "answer": "What are the ids and names of the architects who built at least 3 bridges ?\nAdditional table information: table: architecture"} -{"question": "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", "answer": "What is the id, name and nationality of the architect who built most mills?\nAdditional table information: table: architecture"} -{"question": "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", "answer": "What are the ids, names and genders of the architects who built two bridges or one mill?\nAdditional table information: table: architecture"} -{"question": "SELECT LOCATION FROM bridge WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge'", "answer": "What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?\nAdditional table information: table: architecture"} -{"question": "SELECT name FROM mill WHERE name LIKE '%Moulin%'", "answer": "Which of the mill names contains the french word 'Moulin'?\nAdditional table information: table: architecture"} -{"question": "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", "answer": "What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?\nAdditional table information: table: architecture"} -{"question": "SELECT TYPE, COUNT(*) FROM mill GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common mill type, and how many are there?\nAdditional table information: table: architecture"} -{"question": "SELECT COUNT(*) FROM architect WHERE NOT id IN (SELECT architect_id FROM mill WHERE built_year < 1850)", "answer": "How many architects haven't built a mill before year 1850?\nAdditional table information: table: architecture"} -{"question": "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 NULLS FIRST", "answer": "show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length.\nAdditional table information: table: architecture"} -{"question": "SELECT COUNT(*) FROM book_club", "answer": "How many book clubs are there?\nAdditional table information: table: culture_company"} -{"question": "SELECT COUNT(*) FROM book_club", "answer": "Count the number of book clubs.\nAdditional table information: table: culture_company"} -{"question": "SELECT book_title, author_or_editor FROM book_club WHERE YEAR > 1989", "answer": "show the titles, and authors or editors for all books made after the year 1989.\nAdditional table information: table: culture_company"} -{"question": "SELECT book_title, author_or_editor FROM book_club WHERE YEAR > 1989", "answer": "What are the titles and authors or editors that correspond to books made after 1989?\nAdditional table information: table: culture_company"} -{"question": "SELECT DISTINCT publisher FROM book_club", "answer": "Show all distinct publishers for books.\nAdditional table information: table: culture_company"} -{"question": "SELECT DISTINCT publisher FROM book_club", "answer": "What are all the different book publishers?\nAdditional table information: table: culture_company"} -{"question": "SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC", "answer": "Show the years, book titles, and publishers for all books, in descending order by year.\nAdditional table information: table: culture_company"} -{"question": "SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC", "answer": "What are the years, titles, and publishers for all books, ordered by year descending?\nAdditional table information: table: culture_company"} -{"question": "SELECT publisher, COUNT(*) FROM book_club GROUP BY publisher", "answer": "Show all publishers and the number of books for each publisher.\nAdditional table information: table: culture_company"} -{"question": "SELECT publisher, COUNT(*) FROM book_club GROUP BY publisher", "answer": "How many books are there for each publisher?\nAdditional table information: table: culture_company"} -{"question": "SELECT publisher FROM book_club GROUP BY publisher ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the publisher with most number of books?\nAdditional table information: table: culture_company"} -{"question": "SELECT publisher FROM book_club GROUP BY publisher ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the publisher that has published the most books.\nAdditional table information: table: culture_company"} -{"question": "SELECT category, COUNT(*) FROM book_club GROUP BY category", "answer": "Show all book categories and the number of books in each category.\nAdditional table information: table: culture_company"} -{"question": "SELECT category, COUNT(*) FROM book_club GROUP BY category", "answer": "How many books fall into each category?\nAdditional table information: table: culture_company"} -{"question": "SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING COUNT(*) >= 2", "answer": "List categories that have at least two books after year 1989.\nAdditional table information: table: culture_company"} -{"question": "SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING COUNT(*) >= 2", "answer": "What categories have two or more corresponding books that were made after 1989?\nAdditional table information: table: culture_company"} -{"question": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990", "answer": "Show publishers with a book published in 1989 and a book in 1990.\nAdditional table information: table: culture_company"} -{"question": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990", "answer": "What are the publishers who have published a book in both 1989 and 1990?\nAdditional table information: table: culture_company"} -{"question": "SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989", "answer": "Show all publishers which do not have a book in 1989.\nAdditional table information: table: culture_company"} -{"question": "SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989", "answer": "Which publishers did not publish a book in 1989?\nAdditional table information: table: culture_company"} -{"question": "SELECT title, YEAR, director FROM movie ORDER BY budget_million NULLS FIRST", "answer": "Show all movie titles, years, and directors, ordered by budget.\nAdditional table information: table: culture_company"} -{"question": "SELECT title, YEAR, director FROM movie ORDER BY budget_million NULLS FIRST", "answer": "What are the titles, years, and directors of all movies, ordered by budget in millions?\nAdditional table information: table: culture_company"} -{"question": "SELECT COUNT(DISTINCT director) FROM movie", "answer": "How many movie directors are there?\nAdditional table information: table: culture_company"} -{"question": "SELECT COUNT(DISTINCT director) FROM movie", "answer": "Count the number of different directors.\nAdditional table information: table: culture_company"} -{"question": "SELECT title, director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1", "answer": "What is the title and director for the movie with highest worldwide gross in the year 2000 or before?\nAdditional table information: table: culture_company"} -{"question": "SELECT title, director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1", "answer": "Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross.\nAdditional table information: table: culture_company"} -{"question": "SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999", "answer": "Show all director names who have a movie in both year 1999 and 2000.\nAdditional table information: table: culture_company"} -{"question": "SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999", "answer": "Which directors had a movie both in the year 1999 and 2000?\nAdditional table information: table: culture_company"} -{"question": "SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000", "answer": "Show all director names who have a movie in the year 1999 or 2000.\nAdditional table information: table: culture_company"} -{"question": "SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000", "answer": "Which directors had a movie in either 1999 or 2000?\nAdditional table information: table: culture_company"} -{"question": "SELECT AVG(budget_million), MAX(budget_million), MIN(budget_million) FROM movie WHERE YEAR < 2000", "answer": "What is the average, maximum, and minimum budget for all movies before 2000.\nAdditional table information: table: culture_company"} -{"question": "SELECT AVG(budget_million), MAX(budget_million), MIN(budget_million) FROM movie WHERE YEAR < 2000", "answer": "Return the average, maximum, and minimum budgets in millions for movies made before the year 2000.\nAdditional table information: table: culture_company"} -{"question": "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'", "answer": "List all company names with a book published by Alyson.\nAdditional table information: table: culture_company"} -{"question": "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'", "answer": "What are all the company names that have a book published by Alyson?\nAdditional table information: table: culture_company"} -{"question": "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'", "answer": "Show the movie titles and book titles for all companies in China.\nAdditional table information: table: culture_company"} -{"question": "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'", "answer": "What are the titles of movies and books corresponding to companies incorporated in China?\nAdditional table information: table: culture_company"} -{"question": "SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999", "answer": "Show all company names with a movie directed in year 1999.\nAdditional table information: table: culture_company"} -{"question": "SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999", "answer": "What are all company names that have a corresponding movie directed in the year 1999?\nAdditional table information: table: culture_company"} -{"question": "SELECT Notes FROM \"regional_marketing\" WHERE current_slogan = 'SOUTH AUSTRALIA'", "answer": "Tell me what the notes are for South Australia. \nAdditional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes"} -{"question": "SELECT current_series FROM \"regional_marketing\" WHERE Notes = 'New series began in June 2011'", "answer": "What is the current series where the new series began in June 2011? \nAdditional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes"} -{"question": "SELECT format FROM \"regional_marketing\" WHERE state_territory = 'South Australia'", "answer": "What is the format for South Australia?\nAdditional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes"} -{"question": "SELECT text_bg_color FROM \"regional_marketing\" WHERE State/territory = 'Australian Capital Territory'", "answer": "Name the background colour for the Australian Capital Territory. \nAdditional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes"} -{"question": "SELECT COUNT fleet_series_quantity FROM \"vehicles\".\"cars\" WHERE fuel_propulsion = 'CNG'", "answer": "how many times is the fuel propulsion is cng? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} -{"question": "SELECT fuel_propulsion FROM \"vehicles\".\"cars\" WHERE fleet_series_quantity = '310-329 (20)'", "answer": "what is the fuel propulsion where the fleet series (quantity) is 310-329 (20)? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} -{"question": "SELECT manufacturer FROM \"vehicles\".\"cars\" WHERE order_year = '1998'", "answer": "who is the manufacturer for the order year 1998? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} -{"question": "SELECT COUNT manufacturer FROM \"vehicles\".\"cars\" WHERE model = 'GE40LFR'", "answer": "how many times is the model ge40lfr? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} -{"question": "SELECT COUNT order_year FROM \"vehicles\".\"cars\" WHERE fleet_series_quantity = '468-473 (6)'", "answer": "how many times is the fleet series (quantity) is 468-473 (6)? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} -{"question": "SELECT powertrain FROM \"vehicles\".\"cars\" WHERE order_year = '2000'", "answer": "what is the powertrain (engine/transmission) when the order year is 2000? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} +{"answer": "How many heads of the departments are older than 56 ?\nAdditional table information: table: department_management", "question": "SELECT COUNT(*) FROM head WHERE age > 56"} +{"answer": "List the name, born state and age of the heads of departments ordered by age.\nAdditional table information: table: department_management", "question": "SELECT name, born_state, age FROM head ORDER BY age NULLS FIRST"} +{"answer": "List the creation year, name and budget of each department.\nAdditional table information: table: department_management", "question": "SELECT creation, name, budget_in_billions FROM department"} +{"answer": "What are the maximum and minimum budget of the departments?\nAdditional table information: table: department_management", "question": "SELECT MAX(budget_in_billions), MIN(budget_in_billions) FROM department"} +{"answer": "What is the average number of employees of the departments whose rank is between 10 and 15?\nAdditional table information: table: department_management", "question": "SELECT AVG(num_employees) FROM department WHERE ranking BETWEEN 10 AND 15"} +{"answer": "What are the names of the heads who are born outside the California state?\nAdditional table information: table: department_management", "question": "SELECT name FROM head WHERE born_state <> 'California'"} +{"answer": "What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'?\nAdditional table information: table: department_management", "question": "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'"} +{"answer": "What are the names of the states where at least 3 heads were born?\nAdditional table information: table: department_management", "question": "SELECT born_state FROM head GROUP BY born_state HAVING COUNT(*) >= 3"} +{"answer": "In which year were most departments established?\nAdditional table information: table: department_management", "question": "SELECT creation FROM department GROUP BY creation ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'?\nAdditional table information: table: department_management", "question": "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'"} +{"answer": "How many acting statuses are there?\nAdditional table information: table: department_management", "question": "SELECT COUNT(DISTINCT temporary_acting) FROM management"} +{"answer": "How many departments are led by heads who are not mentioned?\nAdditional table information: table: department_management", "question": "SELECT COUNT(*) FROM department WHERE NOT department_id IN (SELECT department_id FROM management)"} +{"answer": "What are the distinct ages of the heads who are acting?\nAdditional table information: table: department_management", "question": "SELECT DISTINCT T1.age FROM management AS T2 JOIN head AS T1 ON T1.head_id = T2.head_id WHERE T2.temporary_acting = 'Yes'"} +{"answer": "List the states where both the secretary of 'Treasury' department and the secretary of 'Homeland Security' were born.\nAdditional table information: table: department_management", "question": "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'"} +{"answer": "Which department has more than 1 head at a time? List the id, name and the number of heads.\nAdditional table information: table: department_management", "question": "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"} +{"answer": "Which head's name has the substring 'Ha'? List the id and name.\nAdditional table information: table: department_management", "question": "SELECT head_id, name FROM head WHERE name LIKE '%Ha%'"} +{"answer": "How many farms are there?\nAdditional table information: table: farm", "question": "SELECT COUNT(*) FROM farm"} +{"answer": "Count the number of farms.\nAdditional table information: table: farm", "question": "SELECT COUNT(*) FROM farm"} +{"answer": "List the total number of horses on farms in ascending order.\nAdditional table information: table: farm", "question": "SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC NULLS FIRST"} +{"answer": "What is the total horses record for each farm, sorted ascending?\nAdditional table information: table: farm", "question": "SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC NULLS FIRST"} +{"answer": "What are the hosts of competitions whose theme is not 'Aliens'?\nAdditional table information: table: farm", "question": "SELECT Hosts FROM farm_competition WHERE Theme <> 'Aliens'"} +{"answer": "Return the hosts of competitions for which the theme is not Aliens?\nAdditional table information: table: farm", "question": "SELECT Hosts FROM farm_competition WHERE Theme <> 'Aliens'"} +{"answer": "What are the themes of farm competitions sorted by year in ascending order?\nAdditional table information: table: farm", "question": "SELECT Theme FROM farm_competition ORDER BY YEAR ASC NULLS FIRST"} +{"answer": "Return the themes of farm competitions, sorted by year ascending.\nAdditional table information: table: farm", "question": "SELECT Theme FROM farm_competition ORDER BY YEAR ASC NULLS FIRST"} +{"answer": "What is the average number of working horses of farms with more than 5000 total number of horses?\nAdditional table information: table: farm", "question": "SELECT AVG(Working_Horses) FROM farm WHERE Total_Horses > 5000"} +{"answer": "Give the average number of working horses on farms with more than 5000 total horses.\nAdditional table information: table: farm", "question": "SELECT AVG(Working_Horses) FROM farm WHERE Total_Horses > 5000"} +{"answer": "What are the maximum and minimum number of cows across all farms.\nAdditional table information: table: farm", "question": "SELECT MAX(Cows), MIN(Cows) FROM farm"} +{"answer": "Return the maximum and minimum number of cows across all farms.\nAdditional table information: table: farm", "question": "SELECT MAX(Cows), MIN(Cows) FROM farm"} +{"answer": "How many different statuses do cities have?\nAdditional table information: table: farm", "question": "SELECT COUNT(DISTINCT Status) FROM city"} +{"answer": "Count the number of different statuses.\nAdditional table information: table: farm", "question": "SELECT COUNT(DISTINCT Status) FROM city"} +{"answer": "List official names of cities in descending order of population.\nAdditional table information: table: farm", "question": "SELECT Official_Name FROM city ORDER BY Population DESC"} +{"answer": "What are the official names of cities, ordered descending by population?\nAdditional table information: table: farm", "question": "SELECT Official_Name FROM city ORDER BY Population DESC"} +{"answer": "List the official name and status of the city with the largest population.\nAdditional table information: table: farm", "question": "SELECT Official_Name, Status FROM city ORDER BY Population DESC LIMIT 1"} +{"answer": "What is the official name and status of the city with the most residents?\nAdditional table information: table: farm", "question": "SELECT Official_Name, Status FROM city ORDER BY Population DESC LIMIT 1"} +{"answer": "Show the years and the official names of the host cities of competitions.\nAdditional table information: table: farm", "question": "SELECT T2.Year, T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID"} +{"answer": "Give the years and official names of the cities of each competition.\nAdditional table information: table: farm", "question": "SELECT T2.Year, T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID"} +{"answer": "Show the official names of the cities that have hosted more than one competition.\nAdditional table information: table: farm", "question": "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"} +{"answer": "What are the official names of cities that have hosted more than one competition?\nAdditional table information: table: farm", "question": "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"} +{"answer": "Show the status of the city that has hosted the greatest number of competitions.\nAdditional table information: table: farm", "question": "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"} +{"answer": "What is the status of the city that has hosted the most competitions?\nAdditional table information: table: farm", "question": "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"} +{"answer": "Please show the themes of competitions with host cities having populations larger than 1000.\nAdditional table information: table: farm", "question": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000"} +{"answer": "What are the themes of competitions that have corresponding host cities with more than 1000 residents?\nAdditional table information: table: farm", "question": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000"} +{"answer": "Please show the different statuses of cities and the average population of cities with each status.\nAdditional table information: table: farm", "question": "SELECT Status, AVG(Population) FROM city GROUP BY Status"} +{"answer": "What are the statuses and average populations of each city?\nAdditional table information: table: farm", "question": "SELECT Status, AVG(Population) FROM city GROUP BY Status"} +{"answer": "Please show the different statuses, ordered by the number of cities that have each.\nAdditional table information: table: farm", "question": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC NULLS FIRST"} +{"answer": "Return the different statuses of cities, ascending by frequency.\nAdditional table information: table: farm", "question": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC NULLS FIRST"} +{"answer": "List the most common type of Status across cities.\nAdditional table information: table: farm", "question": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the most common status across all cities?\nAdditional table information: table: farm", "question": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the official names of cities that have not held any competition.\nAdditional table information: table: farm", "question": "SELECT Official_Name FROM city WHERE NOT City_ID IN (SELECT Host_city_ID FROM farm_competition)"} +{"answer": "What are the official names of cities that have not hosted a farm competition?\nAdditional table information: table: farm", "question": "SELECT Official_Name FROM city WHERE NOT City_ID IN (SELECT Host_city_ID FROM farm_competition)"} +{"answer": "Show the status shared by cities with population bigger than 1500 and smaller than 500.\nAdditional table information: table: farm", "question": "SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500"} +{"answer": "Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500?\nAdditional table information: table: farm", "question": "SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500"} +{"answer": "Find the official names of cities with population bigger than 1500 or smaller than 500.\nAdditional table information: table: farm", "question": "SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500"} +{"answer": "What are the official names of cities that have population over 1500 or less than 500?\nAdditional table information: table: farm", "question": "SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500"} +{"answer": "Show the census ranking of cities whose status are not 'Village'.\nAdditional table information: table: farm", "question": "SELECT Census_Ranking FROM city WHERE Status <> 'Village'"} +{"answer": "What are the census rankings of cities that do not have the status 'Village'?\nAdditional table information: table: farm", "question": "SELECT Census_Ranking FROM city WHERE Status <> 'Village'"} +{"answer": "which course has most number of registered students?\nAdditional table information: table: student_assessment", "question": "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"} +{"answer": "What is the name of the course with the most registered students?\nAdditional table information: table: student_assessment", "question": "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"} +{"answer": "what is id of students who registered some courses but the least number of courses in these students?\nAdditional table information: table: student_assessment", "question": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "What are the ids of the students who registered for some courses but had the least number of courses for all students?\nAdditional table information: table: student_assessment", "question": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "what are the first name and last name of all candidates?\nAdditional table information: table: student_assessment", "question": "SELECT T2.first_name, T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id"} +{"answer": "What are the first and last names of all the candidates?\nAdditional table information: table: student_assessment", "question": "SELECT T2.first_name, T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id"} +{"answer": "List the id of students who never attends courses?\nAdditional table information: table: student_assessment", "question": "SELECT student_id FROM students WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance)"} +{"answer": "What are the ids of every student who has never attended a course?\nAdditional table information: table: student_assessment", "question": "SELECT student_id FROM students WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance)"} +{"answer": "List the id of students who attended some courses?\nAdditional table information: table: student_assessment", "question": "SELECT student_id FROM student_course_attendance"} +{"answer": "What are the ids of all students who have attended at least one course?\nAdditional table information: table: student_assessment", "question": "SELECT student_id FROM student_course_attendance"} +{"answer": "What are the ids of all students for courses and what are the names of those courses?\nAdditional table information: table: student_assessment", "question": "SELECT T1.student_id, T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id"} +{"answer": "What is detail of the student who most recently registered course?\nAdditional table information: table: student_assessment", "question": "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"} +{"answer": "What details do we have on the students who registered for courses most recently?\nAdditional table information: table: student_assessment", "question": "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"} +{"answer": "How many students attend course English?\nAdditional table information: table: student_assessment", "question": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'English'"} +{"answer": "How many students are attending English courses?\nAdditional table information: table: student_assessment", "question": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'English'"} +{"answer": "How many courses do the student whose id is 171 attend?\nAdditional table information: table: student_assessment", "question": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171"} +{"answer": "How many courses does the student with id 171 actually attend?\nAdditional table information: table: student_assessment", "question": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171"} +{"answer": "Find id of the candidate whose email is stanley.monahan@example.org?\nAdditional table information: table: student_assessment", "question": "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'"} +{"answer": "What is the id of the candidate whose email is stanley.monahan@example.org?\nAdditional table information: table: student_assessment", "question": "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'"} +{"answer": "Find id of the candidate who most recently accessed the course?\nAdditional table information: table: student_assessment", "question": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1"} +{"answer": "What is the id of the candidate who most recently accessed the course?\nAdditional table information: table: student_assessment", "question": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1"} +{"answer": "What is detail of the student who registered the most number of courses?\nAdditional table information: table: student_assessment", "question": "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"} +{"answer": "What are the details of the student who registered for the most number of courses?\nAdditional table information: table: student_assessment", "question": "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"} +{"answer": "List the id of students who registered some courses and the number of their registered courses?\nAdditional table information: table: student_assessment", "question": "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"} +{"answer": "For every student who is registered for some course, how many courses are they registered for?\nAdditional table information: table: student_assessment", "question": "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"} +{"answer": "How many registed students do each course have? List course name and the number of their registered students?\nAdditional table information: table: student_assessment", "question": "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"} +{"answer": "For each course id, how many students are registered and what are the course names?\nAdditional table information: table: student_assessment", "question": "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"} +{"answer": "Find id of candidates whose assessment code is 'Pass'?\nAdditional table information: table: student_assessment", "question": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = 'Pass'"} +{"answer": "What are the ids of the candidates that have an outcome code of Pass?\nAdditional table information: table: student_assessment", "question": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = 'Pass'"} +{"answer": "Find the cell mobile number of the candidates whose assessment code is 'Fail'?\nAdditional table information: table: student_assessment", "question": "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'"} +{"answer": "What are the cell phone numbers of the candidates that received an assessment code of 'Fail'?\nAdditional table information: table: student_assessment", "question": "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'"} +{"answer": "What are the id of students who registered course 301?\nAdditional table information: table: student_assessment", "question": "SELECT student_id FROM student_course_attendance WHERE course_id = 301"} +{"answer": "What are the ids of the students who registered for course 301?\nAdditional table information: table: student_assessment", "question": "SELECT student_id FROM student_course_attendance WHERE course_id = 301"} +{"answer": "What is the id of the student who most recently registered course 301?\nAdditional table information: table: student_assessment", "question": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1"} +{"answer": "What are the ids of the students who registered for course 301 most recently?\nAdditional table information: table: student_assessment", "question": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1"} +{"answer": "Find distinct cities of addresses of people?\nAdditional table information: table: student_assessment", "question": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id"} +{"answer": "What are the different cities where people live?\nAdditional table information: table: student_assessment", "question": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id"} +{"answer": "Find distinct cities of address of students?\nAdditional table information: table: student_assessment", "question": "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"} +{"answer": "What are the different cities where students live?\nAdditional table information: table: student_assessment", "question": "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"} +{"answer": "List the names of courses in alphabetical order?\nAdditional table information: table: student_assessment", "question": "SELECT course_name FROM courses ORDER BY course_name NULLS FIRST"} +{"answer": "What are the names of the courses in alphabetical order?\nAdditional table information: table: student_assessment", "question": "SELECT course_name FROM courses ORDER BY course_name NULLS FIRST"} +{"answer": "List the first names of people in alphabetical order?\nAdditional table information: table: student_assessment", "question": "SELECT first_name FROM people ORDER BY first_name NULLS FIRST"} +{"answer": "What are the first names of the people in alphabetical order?\nAdditional table information: table: student_assessment", "question": "SELECT first_name FROM people ORDER BY first_name NULLS FIRST"} +{"answer": "What are the id of students who registered courses or attended courses?\nAdditional table information: table: student_assessment", "question": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance"} +{"answer": "What are the ids of the students who either registered or attended a course?\nAdditional table information: table: student_assessment", "question": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance"} +{"answer": "Find the id of courses which are registered or attended by student whose id is 121?\nAdditional table information: table: student_assessment", "question": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121"} +{"answer": "What are the ids of the courses that are registered or attended by the student whose id is 121?\nAdditional table information: table: student_assessment", "question": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121"} +{"answer": "What are all info of students who registered courses but not attended courses?\nAdditional table information: table: student_assessment", "question": "SELECT * FROM student_course_registrations WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance)"} +{"answer": "What are all details of the students who registered but did not attend any course?\nAdditional table information: table: student_assessment", "question": "SELECT * FROM student_course_registrations WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance)"} +{"answer": "List the id of students who registered course statistics in the order of registration date.\nAdditional table information: table: student_assessment", "question": "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 NULLS FIRST"} +{"answer": "What are the ids of the students who registered course statistics by order of registration date?\nAdditional table information: table: student_assessment", "question": "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 NULLS FIRST"} +{"answer": "List the id of students who attended statistics courses in the order of attendance date.\nAdditional table information: table: student_assessment", "question": "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 NULLS FIRST"} +{"answer": "What are the ids of the students who attended courses in the statistics department in order of attendance date.\nAdditional table information: table: student_assessment", "question": "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 NULLS FIRST"} +{"answer": "Give me the dates when the max temperature was higher than 85.\nAdditional table information: table: bike_1", "question": "SELECT date FROM weather WHERE max_temperature_f > 85"} +{"answer": "What are the dates with a maximum temperature higher than 85?\nAdditional table information: table: bike_1", "question": "SELECT date FROM weather WHERE max_temperature_f > 85"} +{"answer": "What are the names of stations that have latitude lower than 37.5?\nAdditional table information: table: bike_1", "question": "SELECT name FROM station WHERE lat < 37.5"} +{"answer": "What are the names of all stations with a latitude smaller than 37.5?\nAdditional table information: table: bike_1", "question": "SELECT name FROM station WHERE lat < 37.5"} +{"answer": "For each city, return the highest latitude among its stations.\nAdditional table information: table: bike_1", "question": "SELECT city, MAX(lat) FROM station GROUP BY city"} +{"answer": "For each city, what is the highest latitude for its stations?\nAdditional table information: table: bike_1", "question": "SELECT city, MAX(lat) FROM station GROUP BY city"} +{"answer": "Give me the start station and end station for the trips with the three oldest id.\nAdditional table information: table: bike_1", "question": "SELECT start_station_name, end_station_name FROM trip ORDER BY id NULLS FIRST LIMIT 3"} +{"answer": "What is the station station and end station for the trips with the three smallest ids?\nAdditional table information: table: bike_1", "question": "SELECT start_station_name, end_station_name FROM trip ORDER BY id NULLS FIRST LIMIT 3"} +{"answer": "What is the average latitude and longitude of stations located in San Jose city?\nAdditional table information: table: bike_1", "question": "SELECT AVG(lat), AVG(long) FROM station WHERE city = 'San Jose'"} +{"answer": "What is the average latitude and longitude in San Jose?\nAdditional table information: table: bike_1", "question": "SELECT AVG(lat), AVG(long) FROM station WHERE city = 'San Jose'"} +{"answer": "What is the id of the trip that has the shortest duration?\nAdditional table information: table: bike_1", "question": "SELECT id FROM trip ORDER BY duration NULLS FIRST LIMIT 1"} +{"answer": "What is the id of the shortest trip?\nAdditional table information: table: bike_1", "question": "SELECT id FROM trip ORDER BY duration NULLS FIRST LIMIT 1"} +{"answer": "What is the total and maximum duration of trips with bike id 636?\nAdditional table information: table: bike_1", "question": "SELECT SUM(duration), MAX(duration) FROM trip WHERE bike_id = 636"} +{"answer": "What is the total and maximum duration for all trips with the bike id 636?\nAdditional table information: table: bike_1", "question": "SELECT SUM(duration), MAX(duration) FROM trip WHERE bike_id = 636"} +{"answer": "For each zip code, return the average mean temperature of August there.\nAdditional table information: table: bike_1", "question": "SELECT zip_code, AVG(mean_temperature_f) FROM weather WHERE date LIKE '8/%' GROUP BY zip_code"} +{"answer": "For each zip code, what is the average mean temperature for all dates that start with '8'?\nAdditional table information: table: bike_1", "question": "SELECT zip_code, AVG(mean_temperature_f) FROM weather WHERE date LIKE '8/%' GROUP BY zip_code"} +{"answer": "From the trip record, find the number of unique bikes.\nAdditional table information: table: bike_1", "question": "SELECT COUNT(DISTINCT bike_id) FROM trip"} +{"answer": "How many different bike ids are there?\nAdditional table information: table: bike_1", "question": "SELECT COUNT(DISTINCT bike_id) FROM trip"} +{"answer": "What is the number of distinct cities the stations are located at?\nAdditional table information: table: bike_1", "question": "SELECT COUNT(DISTINCT city) FROM station"} +{"answer": "How many different cities have these stations?\nAdditional table information: table: bike_1", "question": "SELECT COUNT(DISTINCT city) FROM station"} +{"answer": "How many stations does Mountain View city has?\nAdditional table information: table: bike_1", "question": "SELECT COUNT(*) FROM station WHERE city = 'Mountain View'"} +{"answer": "How many stations are in Mountain View?\nAdditional table information: table: bike_1", "question": "SELECT COUNT(*) FROM station WHERE city = 'Mountain View'"} +{"answer": "Return the unique name for stations that have ever had 7 bikes available.\nAdditional table information: table: bike_1", "question": "SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7"} +{"answer": "What are the different names for each station that has ever had 7 bikes available?\nAdditional table information: table: bike_1", "question": "SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7"} +{"answer": "Which start station had the most trips starting from August? Give me the name and id of the station.\nAdditional table information: table: bike_1", "question": "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"} +{"answer": "What are the start station's name and id for the one that had the most start trips in August?\nAdditional table information: table: bike_1", "question": "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"} +{"answer": "Which bike traveled the most often in zip code 94002?\nAdditional table information: table: bike_1", "question": "SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the id of the bike that traveled the most in 94002?\nAdditional table information: table: bike_1", "question": "SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "How many days had both mean humidity above 50 and mean visibility above 8?\nAdditional table information: table: bike_1", "question": "SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8"} +{"answer": "What is the number of days that had an average humity above 50 and an average visibility above 8?\nAdditional table information: table: bike_1", "question": "SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8"} +{"answer": "What is the latitude, longitude, city of the station from which the shortest trip started?\nAdditional table information: table: bike_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the latitude, longitude, and city of the station from which the trip with smallest duration started?\nAdditional table information: table: bike_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What are the ids of stations that are located in San Francisco and have average bike availability above 10.\nAdditional table information: table: bike_1", "question": "SELECT id FROM station WHERE city = 'San Francisco' INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING AVG(bikes_available) > 10"} +{"answer": "What are the ids of the stations in San Francisco that normally have more than 10 bikes available?\nAdditional table information: table: bike_1", "question": "SELECT id FROM station WHERE city = 'San Francisco' INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING AVG(bikes_available) > 10"} +{"answer": "What are the names and ids of stations that had more than 14 bikes available on average or were installed in December?\nAdditional table information: table: bike_1", "question": "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/%'"} +{"answer": "What are the names and ids of all stations that have more than 14 bikes available on average or had bikes installed in December?\nAdditional table information: table: bike_1", "question": "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/%'"} +{"answer": "What is the 3 most common cloud cover rates in the region of zip code 94107?\nAdditional table information: table: bike_1", "question": "SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT(*) DESC LIMIT 3"} +{"answer": "What are the 3 most common cloud covers in the zip code of 94107?\nAdditional table information: table: bike_1", "question": "SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT(*) DESC LIMIT 3"} +{"answer": "What is the zip code in which the average mean sea level pressure is the lowest?\nAdditional table information: table: bike_1", "question": "SELECT zip_code FROM weather GROUP BY zip_code ORDER BY AVG(mean_sea_level_pressure_inches) NULLS FIRST LIMIT 1"} +{"answer": "What is the zip code that has the lowest average mean sea level pressure?\nAdditional table information: table: bike_1", "question": "SELECT zip_code FROM weather GROUP BY zip_code ORDER BY AVG(mean_sea_level_pressure_inches) NULLS FIRST LIMIT 1"} +{"answer": "What is the average bike availability in stations that are not located in Palo Alto?\nAdditional table information: table: bike_1", "question": "SELECT AVG(bikes_available) FROM status WHERE NOT station_id IN (SELECT id FROM station WHERE city = 'Palo Alto')"} +{"answer": "What is the average bike availablility for stations not in Palo Alto?\nAdditional table information: table: bike_1", "question": "SELECT AVG(bikes_available) FROM status WHERE NOT station_id IN (SELECT id FROM station WHERE city = 'Palo Alto')"} +{"answer": "What is the average longitude of stations that never had bike availability more than 10?\nAdditional table information: table: bike_1", "question": "SELECT AVG(long) FROM station WHERE NOT id IN (SELECT station_id FROM status GROUP BY station_id HAVING MAX(bikes_available) > 10)"} +{"answer": "What is the mean longitude for all stations that have never had more than 10 bikes available?\nAdditional table information: table: bike_1", "question": "SELECT AVG(long) FROM station WHERE NOT id IN (SELECT station_id FROM status GROUP BY station_id HAVING MAX(bikes_available) > 10)"} +{"answer": "When and in what zip code did max temperature reach 80?\nAdditional table information: table: bike_1", "question": "SELECT date, zip_code FROM weather WHERE max_temperature_f >= 80"} +{"answer": "What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature?\nAdditional table information: table: bike_1", "question": "SELECT date, zip_code FROM weather WHERE max_temperature_f >= 80"} +{"answer": "Give me ids for all the trip that took place in a zip code area with average mean temperature above 60.\nAdditional table information: table: bike_1", "question": "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"} +{"answer": "For each zip code, find the ids of all trips that have a higher average mean temperature above 60?\nAdditional table information: table: bike_1", "question": "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"} +{"answer": "For each zip code, return how many times max wind speed reached 25?\nAdditional table information: table: bike_1", "question": "SELECT zip_code, COUNT(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code"} +{"answer": "For each zip code, how many times has the maximum wind speed reached 25 mph?\nAdditional table information: table: bike_1", "question": "SELECT zip_code, COUNT(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code"} +{"answer": "On which day and in which zip code was the min dew point lower than any day in zip code 94107?\nAdditional table information: table: bike_1", "question": "SELECT date, zip_code FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107)"} +{"answer": "Which days had a minimum dew point smaller than any day in zip code 94107, and in which zip codes were those measurements taken?\nAdditional table information: table: bike_1", "question": "SELECT date, zip_code FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107)"} +{"answer": "For each trip, return its ending station's installation date.\nAdditional table information: table: bike_1", "question": "SELECT T1.id, T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id"} +{"answer": "What is the installation date for each ending station on all the trips?\nAdditional table information: table: bike_1", "question": "SELECT T1.id, T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id"} +{"answer": "Which trip started from the station with the largest dock count? Give me the trip id.\nAdditional table information: table: bike_1", "question": "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"} +{"answer": "What is the id of the trip that started from the station with the highest dock count?\nAdditional table information: table: bike_1", "question": "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"} +{"answer": "Count the number of trips that did not end in San Francisco city.\nAdditional table information: table: bike_1", "question": "SELECT COUNT(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city <> 'San Francisco'"} +{"answer": "How many trips did not end in San Francisco?\nAdditional table information: table: bike_1", "question": "SELECT COUNT(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city <> 'San Francisco'"} +{"answer": "In zip code 94107, on which day neither Fog nor Rain was not observed?\nAdditional table information: table: bike_1", "question": "SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS <> 'Fog' AND EVENTS <> 'Rain'"} +{"answer": "On which day has it neither been foggy nor rained in the zip code of 94107?\nAdditional table information: table: bike_1", "question": "SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS <> 'Fog' AND EVENTS <> 'Rain'"} +{"answer": "What are the ids of stations that have latitude above 37.4 and never had bike availability below 7?\nAdditional table information: table: bike_1", "question": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING MIN(bikes_available) < 7"} +{"answer": "What are the ids of all stations that have a latitude above 37.4 and have never had less than 7 bikes available?\nAdditional table information: table: bike_1", "question": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING MIN(bikes_available) < 7"} +{"answer": "What are names of stations that have average bike availability above 10 and are not located in San Jose city?\nAdditional table information: table: bike_1", "question": "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'"} +{"answer": "What are the names of all stations that have more than 10 bikes available and are not located in San Jose?\nAdditional table information: table: bike_1", "question": "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'"} +{"answer": "What are the name, latitude, and city of the station with the lowest latitude?\nAdditional table information: table: bike_1", "question": "SELECT name, lat, city FROM station ORDER BY lat NULLS FIRST LIMIT 1"} +{"answer": "What is the name, latitude, and city of the station that is located the furthest South?\nAdditional table information: table: bike_1", "question": "SELECT name, lat, city FROM station ORDER BY lat NULLS FIRST LIMIT 1"} +{"answer": "What are the date, mean temperature and mean humidity for the top 3 days with the largest max gust speeds?\nAdditional table information: table: bike_1", "question": "SELECT date, mean_temperature_f, mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3"} +{"answer": "What is the date, average temperature and mean humidity for the days with the 3 largest maximum gust speeds?\nAdditional table information: table: bike_1", "question": "SELECT date, mean_temperature_f, mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3"} +{"answer": "List the name and the number of stations for all the cities that have at least 15 stations.\nAdditional table information: table: bike_1", "question": "SELECT city, COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15"} +{"answer": "What is the name of every city that has at least 15 stations and how many stations does it have?\nAdditional table information: table: bike_1", "question": "SELECT city, COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15"} +{"answer": "Find the ids and names of stations from which at least 200 trips started.\nAdditional table information: table: bike_1", "question": "SELECT start_station_id, start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200"} +{"answer": "What are the ids and names of all start stations that were the beginning of at least 200 trips?\nAdditional table information: table: bike_1", "question": "SELECT start_station_id, start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200"} +{"answer": "Find the zip code in which the average mean visibility is lower than 10.\nAdditional table information: table: bike_1", "question": "SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_visibility_miles) < 10"} +{"answer": "For each zip code, select all those that have an average mean visiblity below 10.\nAdditional table information: table: bike_1", "question": "SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_visibility_miles) < 10"} +{"answer": "List all the cities in a decreasing order of each city's stations' highest latitude.\nAdditional table information: table: bike_1", "question": "SELECT city FROM station GROUP BY city ORDER BY MAX(lat) DESC"} +{"answer": "For each city, list their names in decreasing order by their highest station latitude.\nAdditional table information: table: bike_1", "question": "SELECT city FROM station GROUP BY city ORDER BY MAX(lat) DESC"} +{"answer": "What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate.\nAdditional table information: table: bike_1", "question": "SELECT date, cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5"} +{"answer": "What are the dates that have the 5 highest cloud cover rates and what are the rates?\nAdditional table information: table: bike_1", "question": "SELECT date, cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5"} +{"answer": "What are the ids and durations of the trips with the top 3 durations?\nAdditional table information: table: bike_1", "question": "SELECT id, duration FROM trip ORDER BY duration DESC LIMIT 3"} +{"answer": "What are the ids of the trips that lasted the longest and how long did they last?\nAdditional table information: table: bike_1", "question": "SELECT id, duration FROM trip ORDER BY duration DESC LIMIT 3"} +{"answer": "For each station, return its longitude and the average duration of trips that started from the station.\nAdditional table information: table: bike_1", "question": "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"} +{"answer": "For each start station id, what is its name, longitude and average duration of trips started there?\nAdditional table information: table: bike_1", "question": "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"} +{"answer": "For each station, find its latitude and the minimum duration of trips that ended at the station.\nAdditional table information: table: bike_1", "question": "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"} +{"answer": "For each end station id, what is its name, latitude, and minimum duration for trips ended there?\nAdditional table information: table: bike_1", "question": "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"} +{"answer": "List all the distinct stations from which a trip of duration below 100 started.\nAdditional table information: table: bike_1", "question": "SELECT DISTINCT start_station_name FROM trip WHERE duration < 100"} +{"answer": "What are all the different start station names for a trip that lasted less than 100?\nAdditional table information: table: bike_1", "question": "SELECT DISTINCT start_station_name FROM trip WHERE duration < 100"} +{"answer": "Find all the zip codes in which the max dew point have never reached 70.\nAdditional table information: table: bike_1", "question": "SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70"} +{"answer": "What are all the different zip codes that have a maximum dew point that was always below 70?\nAdditional table information: table: bike_1", "question": "SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70"} +{"answer": "Find the id for the trips that lasted at least as long as the average duration of trips in zip code 94103.\nAdditional table information: table: bike_1", "question": "SELECT id FROM trip WHERE duration >= (SELECT AVG(duration) FROM trip WHERE zip_code = 94103)"} +{"answer": "What are the ids of all trips that had a duration as long as the average trip duration in the zip code 94103?\nAdditional table information: table: bike_1", "question": "SELECT id FROM trip WHERE duration >= (SELECT AVG(duration) FROM trip WHERE zip_code = 94103)"} +{"answer": "What are the dates in which the mean sea level pressure was between 30.3 and 31?\nAdditional table information: table: bike_1", "question": "SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31"} +{"answer": "What are the dates that have an average sea level pressure between 30.3 and 31?\nAdditional table information: table: bike_1", "question": "SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31"} +{"answer": "Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference.\nAdditional table information: table: bike_1", "question": "SELECT date, max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f NULLS FIRST LIMIT 1"} +{"answer": "What are the days that had the smallest temperature range, and what was that range?\nAdditional table information: table: bike_1", "question": "SELECT date, max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f NULLS FIRST LIMIT 1"} +{"answer": "What are the id and name of the stations that have ever had more than 12 bikes available?\nAdditional table information: table: bike_1", "question": "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"} +{"answer": "What are the different ids and names of the stations that have had more than 12 bikes available?\nAdditional table information: table: bike_1", "question": "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"} +{"answer": "Give me the zip code where the average mean humidity is below 70 and at least 100 trips took place.\nAdditional table information: table: bike_1", "question": "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"} +{"answer": "What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there?\nAdditional table information: table: bike_1", "question": "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"} +{"answer": "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?\nAdditional table information: table: bike_1", "question": "SELECT name FROM station WHERE city = 'Palo Alto' EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING COUNT(*) > 100"} +{"answer": "What are the names of the stations that are located in Palo Alto but have never been the ending point of the trips\nAdditional table information: table: bike_1", "question": "SELECT name FROM station WHERE city = 'Palo Alto' EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING COUNT(*) > 100"} +{"answer": "How many trips started from Mountain View city and ended at Palo Alto city?\nAdditional table information: table: bike_1", "question": "SELECT COUNT(*) FROM station AS T1, trip AS T2, 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'"} +{"answer": "How many trips stated from a station in Mountain View and ended at one in Palo Alto?\nAdditional table information: table: bike_1", "question": "SELECT COUNT(*) FROM station AS T1, trip AS T2, 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'"} +{"answer": "What is the average latitude and longitude of the starting points of all trips?\nAdditional table information: table: bike_1", "question": "SELECT AVG(T1.lat), AVG(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id"} +{"answer": "What is the average latitude and longitude of all starting stations for the trips?\nAdditional table information: table: bike_1", "question": "SELECT AVG(T1.lat), AVG(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id"} +{"answer": "How many books are there?\nAdditional table information: table: book_2", "question": "SELECT COUNT(*) FROM book"} +{"answer": "List the writers of the books in ascending alphabetical order.\nAdditional table information: table: book_2", "question": "SELECT Writer FROM book ORDER BY Writer ASC NULLS FIRST"} +{"answer": "List the titles of the books in ascending order of issues.\nAdditional table information: table: book_2", "question": "SELECT Title FROM book ORDER BY Issues ASC NULLS FIRST"} +{"answer": "What are the titles of the books whose writer is not 'Elaine Lee'?\nAdditional table information: table: book_2", "question": "SELECT Title FROM book WHERE Writer <> 'Elaine Lee'"} +{"answer": "What are the title and issues of the books?\nAdditional table information: table: book_2", "question": "SELECT Title, Issues FROM book"} +{"answer": "What are the dates of publications in descending order of price?\nAdditional table information: table: book_2", "question": "SELECT Publication_Date FROM publication ORDER BY Price DESC"} +{"answer": "What are the distinct publishers of publications with price higher than 5000000?\nAdditional table information: table: book_2", "question": "SELECT DISTINCT Publisher FROM publication WHERE Price > 5000000"} +{"answer": "List the publisher of the publication with the highest price.\nAdditional table information: table: book_2", "question": "SELECT Publisher FROM publication ORDER BY Price DESC LIMIT 1"} +{"answer": "List the publication dates of publications with 3 lowest prices.\nAdditional table information: table: book_2", "question": "SELECT Publication_Date FROM publication ORDER BY Price ASC NULLS FIRST LIMIT 3"} +{"answer": "Show the title and publication dates of books.\nAdditional table information: table: book_2", "question": "SELECT T1.Title, T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID"} +{"answer": "Show writers who have published a book with price more than 4000000.\nAdditional table information: table: book_2", "question": "SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID WHERE T2.Price > 4000000"} +{"answer": "Show the titles of books in descending order of publication price.\nAdditional table information: table: book_2", "question": "SELECT T1.Title FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID ORDER BY T2.Price DESC"} +{"answer": "Show publishers that have more than one publication.\nAdditional table information: table: book_2", "question": "SELECT Publisher FROM publication GROUP BY Publisher HAVING COUNT(*) > 1"} +{"answer": "Show different publishers together with the number of publications they have.\nAdditional table information: table: book_2", "question": "SELECT Publisher, COUNT(*) FROM publication GROUP BY Publisher"} +{"answer": "Please show the most common publication date.\nAdditional table information: table: book_2", "question": "SELECT Publication_Date FROM publication GROUP BY Publication_Date ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the writers who have written more than one book.\nAdditional table information: table: book_2", "question": "SELECT Writer FROM book GROUP BY Writer HAVING COUNT(*) > 1"} +{"answer": "List the titles of books that are not published.\nAdditional table information: table: book_2", "question": "SELECT Title FROM book WHERE NOT Book_ID IN (SELECT Book_ID FROM publication)"} +{"answer": "Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000.\nAdditional table information: table: book_2", "question": "SELECT Publisher FROM publication WHERE Price > 10000000 INTERSECT SELECT Publisher FROM publication WHERE Price < 5000000"} +{"answer": "What is the number of distinct publication dates?\nAdditional table information: table: book_2", "question": "SELECT COUNT(DISTINCT Publication_Date) FROM publication"} +{"answer": "How many distinct publication dates are there in our record?\nAdditional table information: table: book_2", "question": "SELECT COUNT(DISTINCT Publication_Date) FROM publication"} +{"answer": "Show the prices of publications whose publisher is either 'Person' or 'Wiley'\nAdditional table information: table: book_2", "question": "SELECT Price FROM publication WHERE Publisher = 'Person' OR Publisher = 'Wiley'"} +{"answer": "How many actors are there?\nAdditional table information: table: musical", "question": "SELECT COUNT(*) FROM actor"} +{"answer": "Count the number of actors.\nAdditional table information: table: musical", "question": "SELECT COUNT(*) FROM actor"} +{"answer": "List the name of actors in ascending alphabetical order.\nAdditional table information: table: musical", "question": "SELECT Name FROM actor ORDER BY Name ASC NULLS FIRST"} +{"answer": "What are the names of actors, ordered alphabetically?\nAdditional table information: table: musical", "question": "SELECT Name FROM actor ORDER BY Name ASC NULLS FIRST"} +{"answer": "What are the characters and duration of actors?\nAdditional table information: table: musical", "question": "SELECT Character, Duration FROM actor"} +{"answer": "Return the characters and durations for each actor.\nAdditional table information: table: musical", "question": "SELECT Character, Duration FROM actor"} +{"answer": "List the name of actors whose age is not 20.\nAdditional table information: table: musical", "question": "SELECT Name FROM actor WHERE Age <> 20"} +{"answer": "What are the names of actors who are not 20 years old?\nAdditional table information: table: musical", "question": "SELECT Name FROM actor WHERE Age <> 20"} +{"answer": "What are the characters of actors in descending order of age?\nAdditional table information: table: musical", "question": "SELECT Character FROM actor ORDER BY age DESC"} +{"answer": "Return the characters for actors, ordered by age descending.\nAdditional table information: table: musical", "question": "SELECT Character FROM actor ORDER BY age DESC"} +{"answer": "What is the duration of the oldest actor?\nAdditional table information: table: musical", "question": "SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1"} +{"answer": "Return the duration of the actor with the greatest age.\nAdditional table information: table: musical", "question": "SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1"} +{"answer": "What are the names of musicals with nominee 'Bob Fosse'?\nAdditional table information: table: musical", "question": "SELECT Name FROM musical WHERE Nominee = 'Bob Fosse'"} +{"answer": "Return the names of musicals who have the nominee Bob Fosse.\nAdditional table information: table: musical", "question": "SELECT Name FROM musical WHERE Nominee = 'Bob Fosse'"} +{"answer": "What are the distinct nominees of the musicals with the award that is not 'Tony Award'?\nAdditional table information: table: musical", "question": "SELECT DISTINCT Nominee FROM musical WHERE Award <> 'Tony Award'"} +{"answer": "Return the different nominees of musicals that have an award that is not the Tony Award.\nAdditional table information: table: musical", "question": "SELECT DISTINCT Nominee FROM musical WHERE Award <> 'Tony Award'"} +{"answer": "Show names of actors and names of musicals they are in.\nAdditional table information: table: musical", "question": "SELECT T1.Name, T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID"} +{"answer": "What are the names of actors and the musicals that they are in?\nAdditional table information: table: musical", "question": "SELECT T1.Name, T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID"} +{"answer": "Show names of actors that have appeared in musical with name 'The Phantom of the Opera'.\nAdditional table information: table: musical", "question": "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'"} +{"answer": "What are the names of actors who have been in the musical titled The Phantom of the Opera?\nAdditional table information: table: musical", "question": "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'"} +{"answer": "Show names of actors in descending order of the year their musical is awarded.\nAdditional table information: table: musical", "question": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC"} +{"answer": "What are the names of actors ordered descending by the year in which their musical was awarded?\nAdditional table information: table: musical", "question": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC"} +{"answer": "Show names of musicals and the number of actors who have appeared in the musicals.\nAdditional table information: table: musical", "question": "SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID"} +{"answer": "How many actors have appeared in each musical?\nAdditional table information: table: musical", "question": "SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID"} +{"answer": "Show names of musicals which have at least three actors.\nAdditional table information: table: musical", "question": "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"} +{"answer": "What are the names of musicals who have at 3 or more actors?\nAdditional table information: table: musical", "question": "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"} +{"answer": "Show different nominees and the number of musicals they have been nominated.\nAdditional table information: table: musical", "question": "SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee"} +{"answer": "How many musicals has each nominee been nominated for?\nAdditional table information: table: musical", "question": "SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee"} +{"answer": "Please show the nominee who has been nominated the greatest number of times.\nAdditional table information: table: musical", "question": "SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Who is the nominee who has been nominated for the most musicals?\nAdditional table information: table: musical", "question": "SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the most common result of the musicals.\nAdditional table information: table: musical", "question": "SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Return the most frequent result across all musicals.\nAdditional table information: table: musical", "question": "SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the nominees that have been nominated more than two musicals.\nAdditional table information: table: musical", "question": "SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2"} +{"answer": "Who are the nominees who have been nominated more than two times?\nAdditional table information: table: musical", "question": "SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2"} +{"answer": "List the name of musicals that do not have actors.\nAdditional table information: table: musical", "question": "SELECT Name FROM musical WHERE NOT Musical_ID IN (SELECT Musical_ID FROM actor)"} +{"answer": "What are the names of musicals who have no actors?\nAdditional table information: table: musical", "question": "SELECT Name FROM musical WHERE NOT Musical_ID IN (SELECT Musical_ID FROM actor)"} +{"answer": "Show the nominees that have nominated musicals for both 'Tony Award' and 'Drama Desk Award'.\nAdditional table information: table: musical", "question": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' INTERSECT SELECT Nominee FROM musical WHERE Award = 'Drama Desk Award'"} +{"answer": "Who are the nominees who have been nominated for both a Tony Award and a Drama Desk Award?\nAdditional table information: table: musical", "question": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' INTERSECT SELECT Nominee FROM musical WHERE Award = 'Drama Desk Award'"} +{"answer": "Show the musical nominee with award 'Bob Fosse' or 'Cleavant Derricks'.\nAdditional table information: table: musical", "question": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' OR Award = 'Cleavant Derricks'"} +{"answer": "Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards?\nAdditional table information: table: musical", "question": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' OR Award = 'Cleavant Derricks'"} +{"answer": "Find the emails of the user named 'Mary'.\nAdditional table information: table: twitter_1", "question": "SELECT email FROM user_profiles WHERE name = 'Mary'"} +{"answer": "What is the partition id of the user named 'Iron Man'.\nAdditional table information: table: twitter_1", "question": "SELECT partitionid FROM user_profiles WHERE name = 'Iron Man'"} +{"answer": "How many users are there?\nAdditional table information: table: twitter_1", "question": "SELECT COUNT(*) FROM user_profiles"} +{"answer": "How many followers does each user have?\nAdditional table information: table: twitter_1", "question": "SELECT COUNT(*) FROM follows"} +{"answer": "Find the number of followers for each user.\nAdditional table information: table: twitter_1", "question": "SELECT COUNT(*) FROM follows GROUP BY f1"} +{"answer": "Find the number of tweets in record.\nAdditional table information: table: twitter_1", "question": "SELECT COUNT(*) FROM tweets"} +{"answer": "Find the number of users who posted some tweets.\nAdditional table information: table: twitter_1", "question": "SELECT COUNT(DISTINCT UID) FROM tweets"} +{"answer": "Find the name and email of the user whose name contains the word \u2018Swift\u2019.\nAdditional table information: table: twitter_1", "question": "SELECT name, email FROM user_profiles WHERE name LIKE '%Swift%'"} +{"answer": "Find the names of users whose emails contain \u2018superstar\u2019 or \u2018edu\u2019.\nAdditional table information: table: twitter_1", "question": "SELECT name FROM user_profiles WHERE email LIKE '%superstar%' OR email LIKE '%edu%'"} +{"answer": "Return the text of tweets about the topic 'intern'.\nAdditional table information: table: twitter_1", "question": "SELECT text FROM tweets WHERE text LIKE '%intern%'"} +{"answer": "Find the name and email of the users who have more than 1000 followers.\nAdditional table information: table: twitter_1", "question": "SELECT name, email FROM user_profiles WHERE followers > 1000"} +{"answer": "Find the names of the users whose number of followers is greater than that of the user named 'Tyler Swift'.\nAdditional table information: table: twitter_1", "question": "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')"} +{"answer": "Find the name and email for the users who have more than one follower.\nAdditional table information: table: twitter_1", "question": "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"} +{"answer": "Find the names of users who have more than one tweet.\nAdditional table information: table: twitter_1", "question": "SELECT T1.name FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT(*) > 1"} +{"answer": "Find the id of users who are followed by Mary and Susan.\nAdditional table information: table: twitter_1", "question": "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'"} +{"answer": "Find the id of users who are followed by Mary or Susan.\nAdditional table information: table: twitter_1", "question": "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'"} +{"answer": "Find the name of the user who has the largest number of followers.\nAdditional table information: table: twitter_1", "question": "SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 1"} +{"answer": "Find the name and email of the user followed by the least number of people.\nAdditional table information: table: twitter_1", "question": "SELECT name, email FROM user_profiles ORDER BY followers NULLS FIRST LIMIT 1"} +{"answer": "List the name and number of followers for each user, and sort the results by the number of followers in descending order.\nAdditional table information: table: twitter_1", "question": "SELECT name, followers FROM user_profiles ORDER BY followers DESC"} +{"answer": "List the names of 5 users followed by the largest number of other users.\nAdditional table information: table: twitter_1", "question": "SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 5"} +{"answer": "List the text of all tweets in the order of date.\nAdditional table information: table: twitter_1", "question": "SELECT text FROM tweets ORDER BY createdate NULLS FIRST"} +{"answer": "Find the name of each user and number of tweets tweeted by each of them.\nAdditional table information: table: twitter_1", "question": "SELECT T1.name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid"} +{"answer": "Find the name and partition id for users who tweeted less than twice.\nAdditional table information: table: twitter_1", "question": "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"} +{"answer": "Find the name of the user who tweeted more than once, and number of tweets tweeted by them.\nAdditional table information: table: twitter_1", "question": "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"} +{"answer": "Find the average number of followers for the users who do not have any tweet.\nAdditional table information: table: twitter_1", "question": "SELECT AVG(followers) FROM user_profiles WHERE NOT UID IN (SELECT UID FROM tweets)"} +{"answer": "Find the average number of followers for the users who had some tweets.\nAdditional table information: table: twitter_1", "question": "SELECT AVG(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets)"} +{"answer": "Find the maximum and total number of followers of all users.\nAdditional table information: table: twitter_1", "question": "SELECT MAX(followers), SUM(followers) FROM user_profiles"} +{"answer": "Find the names of all the catalog entries.\nAdditional table information: table: product_catalog", "question": "SELECT DISTINCT (catalog_entry_name) FROM catalog_contents"} +{"answer": "What are all the catalog entry names?\nAdditional table information: table: product_catalog", "question": "SELECT DISTINCT (catalog_entry_name) FROM catalog_contents"} +{"answer": "Find the list of attribute data types possessed by more than 3 attribute definitions.\nAdditional table information: table: product_catalog", "question": "SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3"} +{"answer": "What are the attribute data types with more than 3 attribute definitions?\nAdditional table information: table: product_catalog", "question": "SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3"} +{"answer": "What is the attribute data type of the attribute with name 'Green'?\nAdditional table information: table: product_catalog", "question": "SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = 'Green'"} +{"answer": "Find the attribute data type for the attribute named 'Green'.\nAdditional table information: table: product_catalog", "question": "SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = 'Green'"} +{"answer": "Find the name and level of catalog structure with level between 5 and 10.\nAdditional table information: table: product_catalog", "question": "SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10"} +{"answer": "What are the name and level of catalog structure with level number between 5 and 10\nAdditional table information: table: product_catalog", "question": "SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10"} +{"answer": "Find all the catalog publishers whose name contains 'Murray'\nAdditional table information: table: product_catalog", "question": "SELECT DISTINCT (catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE '%Murray%'"} +{"answer": "Which catalog publishers have substring 'Murray' in their names?\nAdditional table information: table: product_catalog", "question": "SELECT DISTINCT (catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE '%Murray%'"} +{"answer": "Which catalog publisher has published the most catalogs?\nAdditional table information: table: product_catalog", "question": "SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the catalog publisher that has the most catalogs.\nAdditional table information: table: product_catalog", "question": "SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the names and publication dates of all catalogs that have catalog level number greater than 5.\nAdditional table information: table: product_catalog", "question": "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"} +{"answer": "What are the name and publication date of the catalogs with catalog level number above 5?\nAdditional table information: table: product_catalog", "question": "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"} +{"answer": "What are the entry names of catalog with the attribute possessed by most entries.\nAdditional table information: table: product_catalog", "question": "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)"} +{"answer": "Find the entry names of the catalog with the attribute that have the most entries.\nAdditional table information: table: product_catalog", "question": "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)"} +{"answer": "What is the entry name of the most expensive catalog (in USD)?\nAdditional table information: table: product_catalog", "question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1"} +{"answer": "Find the entry name of the catalog with the highest price (in USD).\nAdditional table information: table: product_catalog", "question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1"} +{"answer": "What is the level name of the cheapest catalog (in USD)?\nAdditional table information: table: product_catalog", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Find the level name of the catalog with the lowest price (in USD).\nAdditional table information: table: product_catalog", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What are the average and minimum price (in Euro) of all products?\nAdditional table information: table: product_catalog", "question": "SELECT AVG(price_in_euros), MIN(price_in_euros) FROM catalog_contents"} +{"answer": "Give me the average and minimum price (in Euro) of the products.\nAdditional table information: table: product_catalog", "question": "SELECT AVG(price_in_euros), MIN(price_in_euros) FROM catalog_contents"} +{"answer": "What is the product with the highest height? Give me the catalog entry name.\nAdditional table information: table: product_catalog", "question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1"} +{"answer": "Which catalog content has the highest height? Give me the catalog entry name.\nAdditional table information: table: product_catalog", "question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1"} +{"answer": "Find the name of the product that has the smallest capacity.\nAdditional table information: table: product_catalog", "question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC NULLS FIRST LIMIT 1"} +{"answer": "Which catalog content has the smallest capacity? Return the catalog entry name.\nAdditional table information: table: product_catalog", "question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC NULLS FIRST LIMIT 1"} +{"answer": "Find the names of all the products whose stock number starts with '2'.\nAdditional table information: table: product_catalog", "question": "SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE '2%'"} +{"answer": "Which catalog contents have a product stock number that starts from '2'? Show the catalog entry names.\nAdditional table information: table: product_catalog", "question": "SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE '2%'"} +{"answer": "Find the names of catalog entries with level number 8.\nAdditional table information: table: product_catalog", "question": "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'"} +{"answer": "What are the names of catalog entries with level number 8?\nAdditional table information: table: product_catalog", "question": "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'"} +{"answer": "Find the names of the products with length smaller than 3 or height greater than 5.\nAdditional table information: table: product_catalog", "question": "SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5"} +{"answer": "Which catalog contents have length below 3 or above 5? Find the catalog entry names.\nAdditional table information: table: product_catalog", "question": "SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5"} +{"answer": "Find the name and attribute ID of the attribute definitions with attribute value 0.\nAdditional table information: table: product_catalog", "question": "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"} +{"answer": "Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID.\nAdditional table information: table: product_catalog", "question": "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"} +{"answer": "Find the name and capacity of products with price greater than 700 (in USD).\nAdditional table information: table: product_catalog", "question": "SELECT catalog_entry_name, capacity FROM Catalog_Contents WHERE price_in_dollars > 700"} +{"answer": "Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.\nAdditional table information: table: product_catalog", "question": "SELECT catalog_entry_name, capacity FROM Catalog_Contents WHERE price_in_dollars > 700"} +{"answer": "Find the dates on which more than one revisions were made.\nAdditional table information: table: product_catalog", "question": "SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING COUNT(*) > 1"} +{"answer": "On which days more than one revisions were made on catalogs.\nAdditional table information: table: product_catalog", "question": "SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING COUNT(*) > 1"} +{"answer": "How many products are there in the records?\nAdditional table information: table: product_catalog", "question": "SELECT COUNT(*) FROM catalog_contents"} +{"answer": "Find the total number of catalog contents.\nAdditional table information: table: product_catalog", "question": "SELECT COUNT(*) FROM catalog_contents"} +{"answer": "Name all the products with next entry ID greater than 8.\nAdditional table information: table: product_catalog", "question": "SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8"} +{"answer": "What are the catalog entry names of the products with next entry ID above 8?\nAdditional table information: table: product_catalog", "question": "SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8"} +{"answer": "How many aircrafts do we have?\nAdditional table information: table: flight_1", "question": "SELECT COUNT(*) FROM Aircraft"} +{"answer": "How many aircrafts exist in the database?\nAdditional table information: table: flight_1", "question": "SELECT COUNT(*) FROM Aircraft"} +{"answer": "Show name and distance for all aircrafts.\nAdditional table information: table: flight_1", "question": "SELECT name, distance FROM Aircraft"} +{"answer": "What are the names and distances for all airplanes?\nAdditional table information: table: flight_1", "question": "SELECT name, distance FROM Aircraft"} +{"answer": "Show ids for all aircrafts with more than 1000 distance.\nAdditional table information: table: flight_1", "question": "SELECT aid FROM Aircraft WHERE distance > 1000"} +{"answer": "What are the ids of all aircrafts that can cover a distance of more than 1000?\nAdditional table information: table: flight_1", "question": "SELECT aid FROM Aircraft WHERE distance > 1000"} +{"answer": "How many aircrafts have distance between 1000 and 5000?\nAdditional table information: table: flight_1", "question": "SELECT COUNT(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000"} +{"answer": "What is the count of aircrafts that have a distance between 1000 and 5000?\nAdditional table information: table: flight_1", "question": "SELECT COUNT(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000"} +{"answer": "What is the name and distance for aircraft with id 12?\nAdditional table information: table: flight_1", "question": "SELECT name, distance FROM Aircraft WHERE aid = 12"} +{"answer": "What is the name and distance for the aircraft that has an id of 12?\nAdditional table information: table: flight_1", "question": "SELECT name, distance FROM Aircraft WHERE aid = 12"} +{"answer": "What is the minimum, average, and maximum distance of all aircrafts.\nAdditional table information: table: flight_1", "question": "SELECT MIN(distance), AVG(distance), MAX(distance) FROM Aircraft"} +{"answer": "Return the minimum, average and maximum distances traveled across all aircrafts.\nAdditional table information: table: flight_1", "question": "SELECT MIN(distance), AVG(distance), MAX(distance) FROM Aircraft"} +{"answer": "Show the id and name of the aircraft with the maximum distance.\nAdditional table information: table: flight_1", "question": "SELECT aid, name FROM Aircraft ORDER BY distance DESC LIMIT 1"} +{"answer": "What is the id and name of the aircraft that can cover the maximum distance?\nAdditional table information: table: flight_1", "question": "SELECT aid, name FROM Aircraft ORDER BY distance DESC LIMIT 1"} +{"answer": "Show the name of aircrafts with top three lowest distances.\nAdditional table information: table: flight_1", "question": "SELECT name FROM Aircraft ORDER BY distance NULLS FIRST LIMIT 3"} +{"answer": "What are the aircrafts with top 3 shortest lengthes? List their names.\nAdditional table information: table: flight_1", "question": "SELECT name FROM Aircraft ORDER BY distance NULLS FIRST LIMIT 3"} +{"answer": "Show names for all aircrafts with distances more than the average.\nAdditional table information: table: flight_1", "question": "SELECT name FROM Aircraft WHERE distance > (SELECT AVG(distance) FROM Aircraft)"} +{"answer": "What are the names of all aircrafts that can cover more distances than average?\nAdditional table information: table: flight_1", "question": "SELECT name FROM Aircraft WHERE distance > (SELECT AVG(distance) FROM Aircraft)"} +{"answer": "How many employees do we have?\nAdditional table information: table: flight_1", "question": "SELECT COUNT(*) FROM Employee"} +{"answer": "What is the number of employees?\nAdditional table information: table: flight_1", "question": "SELECT COUNT(*) FROM Employee"} +{"answer": "Show name and salary for all employees sorted by salary.\nAdditional table information: table: flight_1", "question": "SELECT name, salary FROM Employee ORDER BY salary NULLS FIRST"} +{"answer": "What is the name and salary of all employees in order of salary?\nAdditional table information: table: flight_1", "question": "SELECT name, salary FROM Employee ORDER BY salary NULLS FIRST"} +{"answer": "Show ids for all employees with at least 100000 salary.\nAdditional table information: table: flight_1", "question": "SELECT eid FROM Employee WHERE salary > 100000"} +{"answer": "What is the id of every employee who has at least a salary of 100000?\nAdditional table information: table: flight_1", "question": "SELECT eid FROM Employee WHERE salary > 100000"} +{"answer": "How many employees have salary between 100000 and 200000?\nAdditional table information: table: flight_1", "question": "SELECT COUNT(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000"} +{"answer": "What is the number of employees that have a salary between 100000 and 200000?\nAdditional table information: table: flight_1", "question": "SELECT COUNT(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000"} +{"answer": "What is the name and salary for employee with id 242518965?\nAdditional table information: table: flight_1", "question": "SELECT name, salary FROM Employee WHERE eid = 242518965"} +{"answer": "What is the name and salary of the employee with the id 242518965?\nAdditional table information: table: flight_1", "question": "SELECT name, salary FROM Employee WHERE eid = 242518965"} +{"answer": "What is average and maximum salary of all employees.\nAdditional table information: table: flight_1", "question": "SELECT AVG(salary), MAX(salary) FROM Employee"} +{"answer": "What is the average and largest salary of all employees?\nAdditional table information: table: flight_1", "question": "SELECT AVG(salary), MAX(salary) FROM Employee"} +{"answer": "Show the id and name of the employee with maximum salary.\nAdditional table information: table: flight_1", "question": "SELECT eid, name FROM Employee ORDER BY salary DESC LIMIT 1"} +{"answer": "What is the id and name of the employee with the highest salary?\nAdditional table information: table: flight_1", "question": "SELECT eid, name FROM Employee ORDER BY salary DESC LIMIT 1"} +{"answer": "Show the name of employees with three lowest salaries.\nAdditional table information: table: flight_1", "question": "SELECT name FROM Employee ORDER BY salary ASC NULLS FIRST LIMIT 3"} +{"answer": "What is the name of the 3 employees who get paid the least?\nAdditional table information: table: flight_1", "question": "SELECT name FROM Employee ORDER BY salary ASC NULLS FIRST LIMIT 3"} +{"answer": "Show names for all employees with salary more than the average.\nAdditional table information: table: flight_1", "question": "SELECT name FROM Employee WHERE salary > (SELECT AVG(salary) FROM Employee)"} +{"answer": "What are the names of all employees who have a salary higher than average?\nAdditional table information: table: flight_1", "question": "SELECT name FROM Employee WHERE salary > (SELECT AVG(salary) FROM Employee)"} +{"answer": "Show the id and salary of Mark Young.\nAdditional table information: table: flight_1", "question": "SELECT eid, salary FROM Employee WHERE name = 'Mark Young'"} +{"answer": "What is the id and salary of the employee named Mark Young?\nAdditional table information: table: flight_1", "question": "SELECT eid, salary FROM Employee WHERE name = 'Mark Young'"} +{"answer": "How many flights do we have?\nAdditional table information: table: flight_1", "question": "SELECT COUNT(*) FROM Flight"} +{"answer": "What is the number of flights?\nAdditional table information: table: flight_1", "question": "SELECT COUNT(*) FROM Flight"} +{"answer": "Show flight number, origin, destination of all flights in the alphabetical order of the departure cities.\nAdditional table information: table: flight_1", "question": "SELECT flno, origin, destination FROM Flight ORDER BY origin NULLS FIRST"} +{"answer": "What is the flight number, origin, and destination for all flights in alphabetical order by departure cities?\nAdditional table information: table: flight_1", "question": "SELECT flno, origin, destination FROM Flight ORDER BY origin NULLS FIRST"} +{"answer": "Show all flight number from Los Angeles.\nAdditional table information: table: flight_1", "question": "SELECT flno FROM Flight WHERE origin = 'Los Angeles'"} +{"answer": "What are the numbers of all flights coming from Los Angeles?\nAdditional table information: table: flight_1", "question": "SELECT flno FROM Flight WHERE origin = 'Los Angeles'"} +{"answer": "Show origins of all flights with destination Honolulu.\nAdditional table information: table: flight_1", "question": "SELECT origin FROM Flight WHERE destination = 'Honolulu'"} +{"answer": "What are the origins of all flights that are headed to Honolulu?\nAdditional table information: table: flight_1", "question": "SELECT origin FROM Flight WHERE destination = 'Honolulu'"} +{"answer": "Show me the departure date and arrival date for all flights from Los Angeles to Honolulu.\nAdditional table information: table: flight_1", "question": "SELECT departure_date, arrival_date FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu'"} +{"answer": "What are the departure and arrival dates of all flights from LA to Honolulu?\nAdditional table information: table: flight_1", "question": "SELECT departure_date, arrival_date FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu'"} +{"answer": "Show flight number for all flights with more than 2000 distance.\nAdditional table information: table: flight_1", "question": "SELECT flno FROM Flight WHERE distance > 2000"} +{"answer": "What are the numbers of all flights that can cover a distance of more than 2000?\nAdditional table information: table: flight_1", "question": "SELECT flno FROM Flight WHERE distance > 2000"} +{"answer": "What is the average price for flights from Los Angeles to Honolulu.\nAdditional table information: table: flight_1", "question": "SELECT AVG(price) FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu'"} +{"answer": "What is the average price for flights from LA to Honolulu?\nAdditional table information: table: flight_1", "question": "SELECT AVG(price) FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu'"} +{"answer": "Show origin and destination for flights with price higher than 300.\nAdditional table information: table: flight_1", "question": "SELECT origin, destination FROM Flight WHERE price > 300"} +{"answer": "What is the origin and destination for all flights whose price is higher than 300?\nAdditional table information: table: flight_1", "question": "SELECT origin, destination FROM Flight WHERE price > 300"} +{"answer": "Show the flight number and distance of the flight with maximum price.\nAdditional table information: table: flight_1", "question": "SELECT flno, distance FROM Flight ORDER BY price DESC LIMIT 1"} +{"answer": "What is the flight number and its distance for the one with the maximum price?\nAdditional table information: table: flight_1", "question": "SELECT flno, distance FROM Flight ORDER BY price DESC LIMIT 1"} +{"answer": "Show the flight number of flights with three lowest distances.\nAdditional table information: table: flight_1", "question": "SELECT flno FROM Flight ORDER BY distance ASC NULLS FIRST LIMIT 3"} +{"answer": "What are the numbers of the shortest flights?\nAdditional table information: table: flight_1", "question": "SELECT flno FROM Flight ORDER BY distance ASC NULLS FIRST LIMIT 3"} +{"answer": "What is the average distance and average price for flights from Los Angeles.\nAdditional table information: table: flight_1", "question": "SELECT AVG(distance), AVG(price) FROM Flight WHERE origin = 'Los Angeles'"} +{"answer": "What is the average distance and price for all flights from LA?\nAdditional table information: table: flight_1", "question": "SELECT AVG(distance), AVG(price) FROM Flight WHERE origin = 'Los Angeles'"} +{"answer": "Show all origins and the number of flights from each origin.\nAdditional table information: table: flight_1", "question": "SELECT origin, COUNT(*) FROM Flight GROUP BY origin"} +{"answer": "For each origin, how many flights came from there?\nAdditional table information: table: flight_1", "question": "SELECT origin, COUNT(*) FROM Flight GROUP BY origin"} +{"answer": "Show all destinations and the number of flights to each destination.\nAdditional table information: table: flight_1", "question": "SELECT destination, COUNT(*) FROM Flight GROUP BY destination"} +{"answer": "What are the destinations and number of flights to each one?\nAdditional table information: table: flight_1", "question": "SELECT destination, COUNT(*) FROM Flight GROUP BY destination"} +{"answer": "Which origin has most number of flights?\nAdditional table information: table: flight_1", "question": "SELECT origin FROM Flight GROUP BY origin ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What place has the most flights coming from there?\nAdditional table information: table: flight_1", "question": "SELECT origin FROM Flight GROUP BY origin ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which destination has least number of flights?\nAdditional table information: table: flight_1", "question": "SELECT destination FROM Flight GROUP BY destination ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "What destination has the fewest number of flights?\nAdditional table information: table: flight_1", "question": "SELECT destination FROM Flight GROUP BY destination ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "What is the aircraft name for the flight with number 99\nAdditional table information: table: flight_1", "question": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99"} +{"answer": "What is the name of the aircraft that was on flight number 99?\nAdditional table information: table: flight_1", "question": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99"} +{"answer": "Show all flight numbers with aircraft Airbus A340-300.\nAdditional table information: table: flight_1", "question": "SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = 'Airbus A340-300'"} +{"answer": "What are the flight numbers for the aircraft Airbus A340-300?\nAdditional table information: table: flight_1", "question": "SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = 'Airbus A340-300'"} +{"answer": "Show aircraft names and number of flights for each aircraft.\nAdditional table information: table: flight_1", "question": "SELECT T2.name, COUNT(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid"} +{"answer": "What is the name of each aircraft and how many flights does each one complete?\nAdditional table information: table: flight_1", "question": "SELECT T2.name, COUNT(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid"} +{"answer": "Show names for all aircraft with at least two flights.\nAdditional table information: table: flight_1", "question": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING COUNT(*) >= 2"} +{"answer": "What are the names for all aircrafts with at least 2 flights?\nAdditional table information: table: flight_1", "question": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING COUNT(*) >= 2"} +{"answer": "How many employees have certificate.\nAdditional table information: table: flight_1", "question": "SELECT COUNT(DISTINCT eid) FROM Certificate"} +{"answer": "What is the count of distinct employees with certificates?\nAdditional table information: table: flight_1", "question": "SELECT COUNT(DISTINCT eid) FROM Certificate"} +{"answer": "Show ids for all employees who don't have a certificate.\nAdditional table information: table: flight_1", "question": "SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate"} +{"answer": "What are the ids of all employees that don't have certificates?\nAdditional table information: table: flight_1", "question": "SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate"} +{"answer": "Show names for all aircrafts of which John Williams has certificates.\nAdditional table information: table: flight_1", "question": "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'"} +{"answer": "What are the names of all aircrafts that John Williams have certificates to be able to fly?\nAdditional table information: table: flight_1", "question": "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'"} +{"answer": "Show names for all employees who have certificate of Boeing 737-800.\nAdditional table information: table: flight_1", "question": "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'"} +{"answer": "What are the names of all employees who have a certificate to fly Boeing 737-800?\nAdditional table information: table: flight_1", "question": "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'"} +{"answer": "Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300.\nAdditional table information: table: flight_1", "question": "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'"} +{"answer": "What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300?\nAdditional table information: table: flight_1", "question": "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'"} +{"answer": "Show names for all employees who do not have certificate of Boeing 737-800.\nAdditional table information: table: flight_1", "question": "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'"} +{"answer": "What are the names of all employees who are not certified to fly Boeing 737-800s?\nAdditional table information: table: flight_1", "question": "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'"} +{"answer": "Show the name of aircraft which fewest people have its certificate.\nAdditional table information: table: flight_1", "question": "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"} +{"answer": "What are the names of the aircraft that the least people are certified to fly?\nAdditional table information: table: flight_1", "question": "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"} +{"answer": "Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate.\nAdditional table information: table: flight_1", "question": "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 NULLS FIRST"} +{"answer": "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?\nAdditional table information: table: flight_1", "question": "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 NULLS FIRST"} +{"answer": "what is the salary and name of the employee who has the most number of aircraft certificates?\nAdditional table information: table: flight_1", "question": "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"} +{"answer": "What is the salaray and name of the employee that is certified to fly the most planes?\nAdditional table information: table: flight_1", "question": "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"} +{"answer": "What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000?\nAdditional table information: table: flight_1", "question": "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"} +{"answer": "What is the salaray and name of the employee with the most certificates to fly planes more than 5000?\nAdditional table information: table: flight_1", "question": "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"} +{"answer": "How many allergies are there?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(DISTINCT allergy) FROM Allergy_type"} +{"answer": "How many allergy entries are there?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(DISTINCT allergy) FROM Allergy_type"} +{"answer": "How many different allergy types exist?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(DISTINCT allergytype) FROM Allergy_type"} +{"answer": "How many distinct allergies are there?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(DISTINCT allergytype) FROM Allergy_type"} +{"answer": "Show all allergy types.\nAdditional table information: table: allergy_1", "question": "SELECT DISTINCT allergytype FROM Allergy_type"} +{"answer": "What are the different allergy types?\nAdditional table information: table: allergy_1", "question": "SELECT DISTINCT allergytype FROM Allergy_type"} +{"answer": "Show all allergies and their types.\nAdditional table information: table: allergy_1", "question": "SELECT allergy, allergytype FROM Allergy_type"} +{"answer": "What are the allergies and their types?\nAdditional table information: table: allergy_1", "question": "SELECT allergy, allergytype FROM Allergy_type"} +{"answer": "Show all allergies with type food.\nAdditional table information: table: allergy_1", "question": "SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = 'food'"} +{"answer": "What are all the different food allergies?\nAdditional table information: table: allergy_1", "question": "SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = 'food'"} +{"answer": "What is the type of allergy Cat?\nAdditional table information: table: allergy_1", "question": "SELECT allergytype FROM Allergy_type WHERE allergy = 'Cat'"} +{"answer": "What is allergy type of a cat allergy?\nAdditional table information: table: allergy_1", "question": "SELECT allergytype FROM Allergy_type WHERE allergy = 'Cat'"} +{"answer": "How many allergies have type animal?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(*) FROM Allergy_type WHERE allergytype = 'animal'"} +{"answer": "How many animal type allergies exist?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(*) FROM Allergy_type WHERE allergytype = 'animal'"} +{"answer": "Show all allergy types and the number of allergies in each type.\nAdditional table information: table: allergy_1", "question": "SELECT allergytype, COUNT(*) FROM Allergy_type GROUP BY allergytype"} +{"answer": "What are the allergy types and how many allergies correspond to each one?\nAdditional table information: table: allergy_1", "question": "SELECT allergytype, COUNT(*) FROM Allergy_type GROUP BY allergytype"} +{"answer": "Which allergy type has most number of allergies?\nAdditional table information: table: allergy_1", "question": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which allergy type is most common?\nAdditional table information: table: allergy_1", "question": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which allergy type has least number of allergies?\nAdditional table information: table: allergy_1", "question": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "Which allergy type is the least common?\nAdditional table information: table: allergy_1", "question": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "How many students are there?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(*) FROM Student"} +{"answer": "What is the total number of students?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(*) FROM Student"} +{"answer": "Show first name and last name for all students.\nAdditional table information: table: allergy_1", "question": "SELECT Fname, Lname FROM Student"} +{"answer": "What are the full names of all students\nAdditional table information: table: allergy_1", "question": "SELECT Fname, Lname FROM Student"} +{"answer": "How many different advisors are listed?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(DISTINCT advisor) FROM Student"} +{"answer": "How many advisors are there?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(DISTINCT advisor) FROM Student"} +{"answer": "Show all majors.\nAdditional table information: table: allergy_1", "question": "SELECT DISTINCT Major FROM Student"} +{"answer": "What are the different majors?\nAdditional table information: table: allergy_1", "question": "SELECT DISTINCT Major FROM Student"} +{"answer": "Show all cities where students live.\nAdditional table information: table: allergy_1", "question": "SELECT DISTINCT city_code FROM Student"} +{"answer": "What cities do students live in?\nAdditional table information: table: allergy_1", "question": "SELECT DISTINCT city_code FROM Student"} +{"answer": "Show first name, last name, age for all female students. Their sex is F.\nAdditional table information: table: allergy_1", "question": "SELECT Fname, Lname, Age FROM Student WHERE Sex = 'F'"} +{"answer": "What are the full names and ages for all female students whose sex is F?\nAdditional table information: table: allergy_1", "question": "SELECT Fname, Lname, Age FROM Student WHERE Sex = 'F'"} +{"answer": "Show student ids for all male students.\nAdditional table information: table: allergy_1", "question": "SELECT StuID FROM Student WHERE Sex = 'M'"} +{"answer": "What are the student ids for all male students?\nAdditional table information: table: allergy_1", "question": "SELECT StuID FROM Student WHERE Sex = 'M'"} +{"answer": "How many students are age 18?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(*) FROM Student WHERE age = 18"} +{"answer": "How many students are 18 years old?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(*) FROM Student WHERE age = 18"} +{"answer": "Show all student ids who are older than 20.\nAdditional table information: table: allergy_1", "question": "SELECT StuID FROM Student WHERE age > 20"} +{"answer": "What are the student ids for students over 20 years old?\nAdditional table information: table: allergy_1", "question": "SELECT StuID FROM Student WHERE age > 20"} +{"answer": "Which city does the student whose last name is 'Kim' live in?\nAdditional table information: table: allergy_1", "question": "SELECT city_code FROM Student WHERE LName = 'Kim'"} +{"answer": "Give the city that the student whose family name is Kim lives in.\nAdditional table information: table: allergy_1", "question": "SELECT city_code FROM Student WHERE LName = 'Kim'"} +{"answer": "Who is the advisor of student with ID 1004?\nAdditional table information: table: allergy_1", "question": "SELECT Advisor FROM Student WHERE StuID = 1004"} +{"answer": "Who advises student 1004?\nAdditional table information: table: allergy_1", "question": "SELECT Advisor FROM Student WHERE StuID = 1004"} +{"answer": "How many students live in HKG or CHI?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(*) FROM Student WHERE city_code = 'HKG' OR city_code = 'CHI'"} +{"answer": "Give the number of students living in either HKG or CHI.\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(*) FROM Student WHERE city_code = 'HKG' OR city_code = 'CHI'"} +{"answer": "Show the minimum, average, and maximum age of all students.\nAdditional table information: table: allergy_1", "question": "SELECT MIN(age), AVG(age), MAX(age) FROM Student"} +{"answer": "What is the minimum, mean, and maximum age across all students?\nAdditional table information: table: allergy_1", "question": "SELECT MIN(age), AVG(age), MAX(age) FROM Student"} +{"answer": "What is the last name of the youngest student?\nAdditional table information: table: allergy_1", "question": "SELECT LName FROM Student WHERE age = (SELECT MIN(age) FROM Student)"} +{"answer": "Provide the last name of the youngest student.\nAdditional table information: table: allergy_1", "question": "SELECT LName FROM Student WHERE age = (SELECT MIN(age) FROM Student)"} +{"answer": "Show the student id of the oldest student.\nAdditional table information: table: allergy_1", "question": "SELECT StuID FROM Student WHERE age = (SELECT MAX(age) FROM Student)"} +{"answer": "What student id corresponds to the oldest student?\nAdditional table information: table: allergy_1", "question": "SELECT StuID FROM Student WHERE age = (SELECT MAX(age) FROM Student)"} +{"answer": "Show all majors and corresponding number of students.\nAdditional table information: table: allergy_1", "question": "SELECT major, COUNT(*) FROM Student GROUP BY major"} +{"answer": "How many students are there for each major?\nAdditional table information: table: allergy_1", "question": "SELECT major, COUNT(*) FROM Student GROUP BY major"} +{"answer": "Which major has most number of students?\nAdditional table information: table: allergy_1", "question": "SELECT major FROM Student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the largest major?\nAdditional table information: table: allergy_1", "question": "SELECT major FROM Student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show all ages and corresponding number of students.\nAdditional table information: table: allergy_1", "question": "SELECT age, COUNT(*) FROM Student GROUP BY age"} +{"answer": "How old is each student and how many students are each age?\nAdditional table information: table: allergy_1", "question": "SELECT age, COUNT(*) FROM Student GROUP BY age"} +{"answer": "Show the average age for male and female students.\nAdditional table information: table: allergy_1", "question": "SELECT AVG(age), sex FROM Student GROUP BY sex"} +{"answer": "What are the average ages for male and female students?\nAdditional table information: table: allergy_1", "question": "SELECT AVG(age), sex FROM Student GROUP BY sex"} +{"answer": "Show all cities and corresponding number of students.\nAdditional table information: table: allergy_1", "question": "SELECT city_code, COUNT(*) FROM Student GROUP BY city_code"} +{"answer": "How many students live in each city?\nAdditional table information: table: allergy_1", "question": "SELECT city_code, COUNT(*) FROM Student GROUP BY city_code"} +{"answer": "Show all advisors and corresponding number of students.\nAdditional table information: table: allergy_1", "question": "SELECT advisor, COUNT(*) FROM Student GROUP BY advisor"} +{"answer": "How many students does each advisor have?\nAdditional table information: table: allergy_1", "question": "SELECT advisor, COUNT(*) FROM Student GROUP BY advisor"} +{"answer": "Which advisor has most number of students?\nAdditional table information: table: allergy_1", "question": "SELECT advisor FROM Student GROUP BY advisor ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Give the advisor with the most students.\nAdditional table information: table: allergy_1", "question": "SELECT advisor FROM Student GROUP BY advisor ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "How many students have cat allergies?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(*) FROM Has_allergy WHERE Allergy = 'Cat'"} +{"answer": "How many students are affected by cat allergies?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(*) FROM Has_allergy WHERE Allergy = 'Cat'"} +{"answer": "Show all student IDs who have at least two allergies.\nAdditional table information: table: allergy_1", "question": "SELECT StuID FROM Has_allergy GROUP BY StuID HAVING COUNT(*) >= 2"} +{"answer": "What are the students ids of students who have more than one allergy?\nAdditional table information: table: allergy_1", "question": "SELECT StuID FROM Has_allergy GROUP BY StuID HAVING COUNT(*) >= 2"} +{"answer": "What are the student ids of students who don't have any allergies?\nAdditional table information: table: allergy_1", "question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy"} +{"answer": "Which students are unaffected by allergies?\nAdditional table information: table: allergy_1", "question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy"} +{"answer": "How many female students have milk or egg allergies?\nAdditional table information: table: allergy_1", "question": "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'"} +{"answer": "How many students who are female are allergic to milk or eggs?\nAdditional table information: table: allergy_1", "question": "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'"} +{"answer": "How many students have a food allergy?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = 'food'"} +{"answer": "How many students are affected by food related allergies?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = 'food'"} +{"answer": "Which allergy has most number of students affected?\nAdditional table information: table: allergy_1", "question": "SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which allergy is the most common?\nAdditional table information: table: allergy_1", "question": "SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show all allergies with number of students affected.\nAdditional table information: table: allergy_1", "question": "SELECT Allergy, COUNT(*) FROM Has_allergy GROUP BY Allergy"} +{"answer": "How many students have each different allergy?\nAdditional table information: table: allergy_1", "question": "SELECT Allergy, COUNT(*) FROM Has_allergy GROUP BY Allergy"} +{"answer": "Show all allergy type with number of students affected.\nAdditional table information: table: allergy_1", "question": "SELECT T2.allergytype, COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype"} +{"answer": "How many students are affected by each allergy type?\nAdditional table information: table: allergy_1", "question": "SELECT T2.allergytype, COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype"} +{"answer": "Find the last name and age of the student who has allergy to both milk and cat.\nAdditional table information: table: allergy_1", "question": "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')"} +{"answer": "What are the last names and ages of the students who are allergic to milk and cat?\nAdditional table information: table: allergy_1", "question": "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')"} +{"answer": "What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies.\nAdditional table information: table: allergy_1", "question": "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 NULLS FIRST"} +{"answer": "What are the allergies the girl named Lisa has? And what are the types of them? Order the result by allergy names.\nAdditional table information: table: allergy_1", "question": "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 NULLS FIRST"} +{"answer": "Find the first name and gender of the student who has allergy to milk but not cat.\nAdditional table information: table: allergy_1", "question": "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')"} +{"answer": "What are the first name and gender of the students who have allergy to milk but can put up with cats?\nAdditional table information: table: allergy_1", "question": "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')"} +{"answer": "Find the average age of the students who have allergies with food and animal types.\nAdditional table information: table: allergy_1", "question": "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')"} +{"answer": "How old are the students with allergies to food and animal types on average?\nAdditional table information: table: allergy_1", "question": "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')"} +{"answer": "List the first and last name of the students who do not have any food type allergy.\nAdditional table information: table: allergy_1", "question": "SELECT fname, lname FROM Student WHERE NOT StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food')"} +{"answer": "What is the full name of each student who is not allergic to any type of food.\nAdditional table information: table: allergy_1", "question": "SELECT fname, lname FROM Student WHERE NOT StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food')"} +{"answer": "Find the number of male (sex is 'M') students who have some food type allery.\nAdditional table information: table: allergy_1", "question": "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')"} +{"answer": "How many male students (sex is 'M') are allergic to any type of food?\nAdditional table information: table: allergy_1", "question": "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')"} +{"answer": "Find the different first names and cities of the students who have allergy to milk or cat.\nAdditional table information: table: allergy_1", "question": "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'"} +{"answer": "What are the distinct first names and cities of the students who have allergy either to milk or to cat?\nAdditional table information: table: allergy_1", "question": "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'"} +{"answer": "Find the number of students who are older than 18 and do not have allergy to either food or animal.\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(*) FROM Student WHERE age > 18 AND NOT StuID 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')"} +{"answer": "How many students are over 18 and do not have allergy to food type or animal type?\nAdditional table information: table: allergy_1", "question": "SELECT COUNT(*) FROM Student WHERE age > 18 AND NOT StuID 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')"} +{"answer": "Find the first name and major of the students who are not allegry to soy.\nAdditional table information: table: allergy_1", "question": "SELECT fname, major FROM Student WHERE NOT StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Soy')"} +{"answer": "What are the first name and major of the students who are able to consume soy?\nAdditional table information: table: allergy_1", "question": "SELECT fname, major FROM Student WHERE NOT StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Soy')"} +{"answer": "A list of the top 5 countries by number of invoices. List country name and number of invoices.\nAdditional table information: table: store_1", "question": "SELECT billing_country, COUNT(*) FROM invoices GROUP BY billing_country ORDER BY COUNT(*) DESC LIMIT 5"} +{"answer": "What are the top 5 countries by number of invoices and how many do they have?\nAdditional table information: table: store_1", "question": "SELECT billing_country, COUNT(*) FROM invoices GROUP BY billing_country ORDER BY COUNT(*) DESC LIMIT 5"} +{"answer": "A list of the top 8 countries by gross/total invoice size. List country name and gross invoice size.\nAdditional table information: table: store_1", "question": "SELECT billing_country, SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8"} +{"answer": "What are the names of the top 8 countries by total invoice size and what are those sizes?\nAdditional table information: table: store_1", "question": "SELECT billing_country, SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8"} +{"answer": "A list of the top 10 countries by average invoice size. List country name and average invoice size.\nAdditional table information: table: store_1", "question": "SELECT billing_country, AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10"} +{"answer": "What are the names of the countries and average invoice size of the top countries by size?\nAdditional table information: table: store_1", "question": "SELECT billing_country, AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10"} +{"answer": "Find out 5 customers who most recently purchased something. List customers' first and last name.\nAdditional table information: table: store_1", "question": "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"} +{"answer": "What are the first and last names of the 5 customers who purchased something most recently?\nAdditional table information: table: store_1", "question": "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"} +{"answer": "Find out the top 10 customers by total number of orders. List customers' first and last name and the number of total orders.\nAdditional table information: table: store_1", "question": "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"} +{"answer": "What are the top 10 customers' first and last names by total number of orders and how many orders did they make?\nAdditional table information: table: store_1", "question": "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"} +{"answer": "List the top 10 customers by total gross sales. List customers' first and last name and total gross sales.\nAdditional table information: table: store_1", "question": "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"} +{"answer": "What are the top 10 customers' first and last names with the highest gross sales, and also what are the sales?\nAdditional table information: table: store_1", "question": "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"} +{"answer": "List the top 5 genres by number of tracks. List genres name and total tracks.\nAdditional table information: table: store_1", "question": "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"} +{"answer": "How many tracks does each genre have and what are the names of the top 5?\nAdditional table information: table: store_1", "question": "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"} +{"answer": "List every album's title.\nAdditional table information: table: store_1", "question": "SELECT title FROM albums"} +{"answer": "What are the titles of all the albums?\nAdditional table information: table: store_1", "question": "SELECT title FROM albums"} +{"answer": "List every album ordered by album title in ascending order.\nAdditional table information: table: store_1", "question": "SELECT title FROM albums ORDER BY title NULLS FIRST"} +{"answer": "What are the titles of all the albums alphabetically ascending?\nAdditional table information: table: store_1", "question": "SELECT title FROM albums ORDER BY title NULLS FIRST"} +{"answer": "List every album whose title starts with A in alphabetical order.\nAdditional table information: table: store_1", "question": "SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title NULLS FIRST"} +{"answer": "What are the titles of all albums that start with A in alphabetical order?\nAdditional table information: table: store_1", "question": "SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title NULLS FIRST"} +{"answer": "List the customers first and last name of 10 least expensive invoices.\nAdditional table information: table: store_1", "question": "SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total NULLS FIRST LIMIT 10"} +{"answer": "What are the first and last names of the customers with the 10 cheapest invoices?\nAdditional table information: table: store_1", "question": "SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total NULLS FIRST LIMIT 10"} +{"answer": "List total amount of invoice from Chicago, IL.\nAdditional table information: table: store_1", "question": "SELECT SUM(total) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL'"} +{"answer": "What are the total amount of money in the invoices billed from Chicago, Illinois?\nAdditional table information: table: store_1", "question": "SELECT SUM(total) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL'"} +{"answer": "List the number of invoices from Chicago, IL.\nAdditional table information: table: store_1", "question": "SELECT COUNT(*) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL'"} +{"answer": "How many invoices were billed from Chicago, IL?\nAdditional table information: table: store_1", "question": "SELECT COUNT(*) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL'"} +{"answer": "List the number of invoices from the US, grouped by state.\nAdditional table information: table: store_1", "question": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state"} +{"answer": "How many invoices were billed from each state?\nAdditional table information: table: store_1", "question": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state"} +{"answer": "List the state in the US with the most invoices.\nAdditional table information: table: store_1", "question": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the states with the most invoices?\nAdditional table information: table: store_1", "question": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the number of invoices and the invoice total from California.\nAdditional table information: table: store_1", "question": "SELECT billing_state, COUNT(*), SUM(total) FROM invoices WHERE billing_state = 'CA'"} +{"answer": "What is the number of invoices and total money billed in them from CA?\nAdditional table information: table: store_1", "question": "SELECT billing_state, COUNT(*), SUM(total) FROM invoices WHERE billing_state = 'CA'"} +{"answer": "List Aerosmith's albums.\nAdditional table information: table: store_1", "question": "SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Aerosmith'"} +{"answer": "What are the titles of all the Aerosmith albums?\nAdditional table information: table: store_1", "question": "SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Aerosmith'"} +{"answer": "How many albums does Billy Cobham has?\nAdditional table information: table: store_1", "question": "SELECT COUNT(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Billy Cobham'"} +{"answer": "How many albums has Billy Cobam released?\nAdditional table information: table: store_1", "question": "SELECT COUNT(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Billy Cobham'"} +{"answer": "Eduardo Martins is a customer at which company?\nAdditional table information: table: store_1", "question": "SELECT company FROM customers WHERE first_name = 'Eduardo' AND last_name = 'Martins'"} +{"answer": "What is the company where Eduardo Martins is a customer?\nAdditional table information: table: store_1", "question": "SELECT company FROM customers WHERE first_name = 'Eduardo' AND last_name = 'Martins'"} +{"answer": "What is Astrid Gruber's email and phone number?\nAdditional table information: table: store_1", "question": "SELECT email, phone FROM customers WHERE first_name = 'Astrid' AND last_name = 'Gruber'"} +{"answer": "What is the email and phone number of Astrid Gruber the customer?\nAdditional table information: table: store_1", "question": "SELECT email, phone FROM customers WHERE first_name = 'Astrid' AND last_name = 'Gruber'"} +{"answer": "How many customers live in Prague city?\nAdditional table information: table: store_1", "question": "SELECT COUNT(*) FROM customers WHERE city = 'Prague'"} +{"answer": "How many customers live in the city of Prague?\nAdditional table information: table: store_1", "question": "SELECT COUNT(*) FROM customers WHERE city = 'Prague'"} +{"answer": "How many customers in state of CA?\nAdditional table information: table: store_1", "question": "SELECT COUNT(*) FROM customers WHERE state = 'CA'"} +{"answer": "How many customers are from California?\nAdditional table information: table: store_1", "question": "SELECT COUNT(*) FROM customers WHERE state = 'CA'"} +{"answer": "What country does Roberto Almeida live?\nAdditional table information: table: store_1", "question": "SELECT country FROM customers WHERE first_name = 'Roberto' AND last_name = 'Almeida'"} +{"answer": "In which country does Roberto Almeida?\nAdditional table information: table: store_1", "question": "SELECT country FROM customers WHERE first_name = 'Roberto' AND last_name = 'Almeida'"} +{"answer": "List the name of albums that are released by aritist whose name has 'Led'\nAdditional table information: table: store_1", "question": "SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%'"} +{"answer": "What is the title of the album that was released by the artist whose name has the phrase 'Led'?\nAdditional table information: table: store_1", "question": "SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%'"} +{"answer": "How many customers does Steve Johnson support?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "What is the count of customers that Steve Johnson supports?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "What is the title, phone and hire date of Nancy Edwards?\nAdditional table information: table: store_1", "question": "SELECT title, phone, hire_date FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'"} +{"answer": "What is the title, phone number and hire date for the employee named Nancy Edwards?\nAdditional table information: table: store_1", "question": "SELECT title, phone, hire_date FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'"} +{"answer": "find the full name of employees who report to Nancy Edwards?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "What is the first and last name of the employee who reports to Nancy Edwards?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "What is the address of employee Nancy Edwards?\nAdditional table information: table: store_1", "question": "SELECT address FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'"} +{"answer": "What is Nancy Edwards's address?\nAdditional table information: table: store_1", "question": "SELECT address FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'"} +{"answer": "Find the full name of employee who supported the most number of customers.\nAdditional table information: table: store_1", "question": "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"} +{"answer": "What is the full name of the employee who has the most customers?\nAdditional table information: table: store_1", "question": "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"} +{"answer": "How many employees are living in Canada?\nAdditional table information: table: store_1", "question": "SELECT COUNT(*) FROM employees WHERE country = 'Canada'"} +{"answer": "How many employees live in Canada?\nAdditional table information: table: store_1", "question": "SELECT COUNT(*) FROM employees WHERE country = 'Canada'"} +{"answer": "What is employee Nancy Edwards's phone number?\nAdditional table information: table: store_1", "question": "SELECT phone FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'"} +{"answer": "What is the the phone number of Nancy Edwards?\nAdditional table information: table: store_1", "question": "SELECT phone FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'"} +{"answer": "Who is the youngest employee in the company? List employee's first and last name.\nAdditional table information: table: store_1", "question": "SELECT first_name, last_name FROM employees ORDER BY birth_date DESC LIMIT 1"} +{"answer": "What si the youngest employee's first and last name?\nAdditional table information: table: store_1", "question": "SELECT first_name, last_name FROM employees ORDER BY birth_date DESC LIMIT 1"} +{"answer": "List top 10 employee work longest in the company. List employee's first and last name.\nAdditional table information: table: store_1", "question": "SELECT first_name, last_name FROM employees ORDER BY hire_date ASC NULLS FIRST LIMIT 10"} +{"answer": "What are the first and last names of the top 10 longest-serving employees?\nAdditional table information: table: store_1", "question": "SELECT first_name, last_name FROM employees ORDER BY hire_date ASC NULLS FIRST LIMIT 10"} +{"answer": "Find the number of employees whose title is IT Staff from each city?\nAdditional table information: table: store_1", "question": "SELECT COUNT(*), city FROM employees WHERE title = 'IT Staff' GROUP BY city"} +{"answer": "How many employees who are IT staff are from each city?\nAdditional table information: table: store_1", "question": "SELECT COUNT(*), city FROM employees WHERE title = 'IT Staff' GROUP BY city"} +{"answer": "Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.\nAdditional table information: table: store_1", "question": "SELECT T2.first_name, T2.last_name, COUNT(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(T1.reports_to) DESC LIMIT 1"} +{"answer": "What are the first and last names of all the employees and how many people report to them?\nAdditional table information: table: store_1", "question": "SELECT T2.first_name, T2.last_name, COUNT(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(T1.reports_to) DESC LIMIT 1"} +{"answer": "How many orders does Lucas Mancini has?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "How many orders does Luca Mancini have in his invoices?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "What is the total amount of money spent by Lucas Mancini?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "How much money did Lucas Mancini spend?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "List all media types.\nAdditional table information: table: store_1", "question": "SELECT name FROM media_types"} +{"answer": "What are the names of all the media types?\nAdditional table information: table: store_1", "question": "SELECT name FROM media_types"} +{"answer": "List all different genre types.\nAdditional table information: table: store_1", "question": "SELECT DISTINCT name FROM genres"} +{"answer": "What are the different names of the genres?\nAdditional table information: table: store_1", "question": "SELECT DISTINCT name FROM genres"} +{"answer": "List the name of all playlist.\nAdditional table information: table: store_1", "question": "SELECT name FROM playlists"} +{"answer": "What are the names of all the playlists?\nAdditional table information: table: store_1", "question": "SELECT name FROM playlists"} +{"answer": "Who is the composer of track Fast As a Shark?\nAdditional table information: table: store_1", "question": "SELECT composer FROM tracks WHERE name = 'Fast As a Shark'"} +{"answer": "What is the composer who created the track 'Fast As a Shark'?\nAdditional table information: table: store_1", "question": "SELECT composer FROM tracks WHERE name = 'Fast As a Shark'"} +{"answer": "How long does track Fast As a Shark has?\nAdditional table information: table: store_1", "question": "SELECT milliseconds FROM tracks WHERE name = 'Fast As a Shark'"} +{"answer": "How many milliseconds long is Fast As a Shark?\nAdditional table information: table: store_1", "question": "SELECT milliseconds FROM tracks WHERE name = 'Fast As a Shark'"} +{"answer": "What is the name of tracks whose genre is Rock?\nAdditional table information: table: store_1", "question": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock'"} +{"answer": "What is the name of all tracks in the Rock genre?\nAdditional table information: table: store_1", "question": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock'"} +{"answer": "What is title of album which track Balls to the Wall belongs to?\nAdditional table information: table: store_1", "question": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = 'Balls to the Wall'"} +{"answer": "What is the name of the album that has the track Ball to the Wall?\nAdditional table information: table: store_1", "question": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = 'Balls to the Wall'"} +{"answer": "List name of all tracks in Balls to the Wall.\nAdditional table information: table: store_1", "question": "SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = 'Balls to the Wall'"} +{"answer": "What is the name of all tracks in the album named Balls to the Wall?\nAdditional table information: table: store_1", "question": "SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = 'Balls to the Wall'"} +{"answer": "List title of albums have the number of tracks greater than 10.\nAdditional table information: table: store_1", "question": "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"} +{"answer": "What are the names of the albums that have more than 10 tracks?\nAdditional table information: table: store_1", "question": "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"} +{"answer": "List the name of tracks belongs to genre Rock and whose media type is MPEG audio file.\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "What are the names of all Rock tracks that are stored on MPEG audio files?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "List the name of tracks belongs to genre Rock or media type is MPEG audio file.\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "List the name of tracks belongs to genre Rock or genre Jazz.\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "What are the names of the tracks that are Rock or Jazz songs?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "List the name of all tracks in the playlists of Movies.\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "What are the names of all tracks that are on playlists titled Movies?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "List the name of playlist which has number of tracks greater than 100.\nAdditional table information: table: store_1", "question": "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"} +{"answer": "What are the names of all playlists that have more than 100 tracks?\nAdditional table information: table: store_1", "question": "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"} +{"answer": "List all tracks bought by customer Daan Peeters.\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "What are the tracks that Dean Peeters bought?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "How much is the track Fast As a Shark?\nAdditional table information: table: store_1", "question": "SELECT unit_price FROM tracks WHERE name = 'Fast As a Shark'"} +{"answer": "What is the unit price of the tune 'Fast As a Shark'?\nAdditional table information: table: store_1", "question": "SELECT unit_price FROM tracks WHERE name = 'Fast As a Shark'"} +{"answer": "Find the name of tracks which are in Movies playlist but not in music playlist.\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "What are the names of all tracks that are on the Movies playlist but not in the music playlist?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "Find the name of tracks which are in both Movies and music playlists.\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "What are the names of all the tracks that are in both the Movies and music playlists?\nAdditional table information: table: store_1", "question": "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'"} +{"answer": "Find number of tracks in each genre?\nAdditional table information: table: store_1", "question": "SELECT COUNT(*), T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name"} +{"answer": "How many tracks are in each genre?\nAdditional table information: table: store_1", "question": "SELECT COUNT(*), T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name"} +{"answer": "How many editors are there?\nAdditional table information: table: journal_committee", "question": "SELECT COUNT(*) FROM editor"} +{"answer": "List the names of editors in ascending order of age.\nAdditional table information: table: journal_committee", "question": "SELECT Name FROM editor ORDER BY Age ASC NULLS FIRST"} +{"answer": "What are the names and ages of editors?\nAdditional table information: table: journal_committee", "question": "SELECT Name, Age FROM editor"} +{"answer": "List the names of editors who are older than 25.\nAdditional table information: table: journal_committee", "question": "SELECT Name FROM editor WHERE Age > 25"} +{"answer": "Show the names of editors of age either 24 or 25.\nAdditional table information: table: journal_committee", "question": "SELECT Name FROM editor WHERE Age = 24 OR Age = 25"} +{"answer": "What is the name of the youngest editor?\nAdditional table information: table: journal_committee", "question": "SELECT Name FROM editor ORDER BY Age ASC NULLS FIRST LIMIT 1"} +{"answer": "What are the different ages of editors? Show each age along with the number of editors of that age.\nAdditional table information: table: journal_committee", "question": "SELECT Age, COUNT(*) FROM editor GROUP BY Age"} +{"answer": "Please show the most common age of editors.\nAdditional table information: table: journal_committee", "question": "SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the distinct themes of journals.\nAdditional table information: table: journal_committee", "question": "SELECT DISTINCT Theme FROM journal"} +{"answer": "Show the names of editors and the theme of journals for which they serve on committees.\nAdditional table information: table: journal_committee", "question": "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"} +{"answer": "For each journal_committee, find the editor name and the journal theme.\nAdditional table information: table: journal_committee", "question": "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"} +{"answer": "Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme.\nAdditional table information: table: journal_committee", "question": "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 NULLS FIRST"} +{"answer": "Show the names of editors that are on the committee of journals with sales bigger than 3000.\nAdditional table information: table: journal_committee", "question": "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"} +{"answer": "Show the id, name of each editor and the number of journal committees they are on.\nAdditional table information: table: journal_committee", "question": "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"} +{"answer": "Show the names of editors that are on at least two journal committees.\nAdditional table information: table: journal_committee", "question": "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"} +{"answer": "List the names of editors that are not on any journal committee.\nAdditional table information: table: journal_committee", "question": "SELECT Name FROM editor WHERE NOT editor_id IN (SELECT editor_id FROM journal_committee)"} +{"answer": "List the date, theme and sales of the journal which did not have any of the listed editors serving on committee.\nAdditional table information: table: journal_committee", "question": "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"} +{"answer": "What is the average sales of the journals that have an editor whose work type is 'Photo'?\nAdditional table information: table: journal_committee", "question": "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'"} +{"answer": "How many accounts do we have?\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(*) FROM Accounts"} +{"answer": "Count the number of accounts.\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(*) FROM Accounts"} +{"answer": "Show ids, customer ids, names for all accounts.\nAdditional table information: table: customers_card_transactions", "question": "SELECT account_id, customer_id, account_name FROM Accounts"} +{"answer": "What are the account ids, customer ids, and account names for all the accounts?\nAdditional table information: table: customers_card_transactions", "question": "SELECT account_id, customer_id, account_name FROM Accounts"} +{"answer": "Show other account details for account with name 338.\nAdditional table information: table: customers_card_transactions", "question": "SELECT other_account_details FROM Accounts WHERE account_name = '338'"} +{"answer": "What are the other account details for the account with the name 338?\nAdditional table information: table: customers_card_transactions", "question": "SELECT other_account_details FROM Accounts WHERE account_name = '338'"} +{"answer": "What is the first name, last name, and phone of the customer with account name 162?\nAdditional table information: table: customers_card_transactions", "question": "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'"} +{"answer": "Give the full name and phone of the customer who has the account name 162.\nAdditional table information: table: customers_card_transactions", "question": "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'"} +{"answer": "How many accounts does the customer with first name Art and last name Turcotte have?\nAdditional table information: table: customers_card_transactions", "question": "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'"} +{"answer": "Return the number of accounts that the customer with the first name Art and last name Turcotte has.\nAdditional table information: table: customers_card_transactions", "question": "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'"} +{"answer": "Show all customer ids and the number of accounts for each customer.\nAdditional table information: table: customers_card_transactions", "question": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id"} +{"answer": "How many accounts are there for each customer id?\nAdditional table information: table: customers_card_transactions", "question": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id"} +{"answer": "Show the customer id and number of accounts with most accounts.\nAdditional table information: table: customers_card_transactions", "question": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the customer id of the customer with the most accounts, and how many accounts does this person have?\nAdditional table information: table: customers_card_transactions", "question": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the customer first, last name and id with least number of accounts.\nAdditional table information: table: customers_card_transactions", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Give the full name and customer id of the customer with the fewest accounts.\nAdditional table information: table: customers_card_transactions", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Show the number of all customers without an account.\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts)"} +{"answer": "How many customers do not have an account?\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts)"} +{"answer": "Show the first names and last names of customers without any account.\nAdditional table information: table: customers_card_transactions", "question": "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"} +{"answer": "What are the full names of customers who do not have any accounts?\nAdditional table information: table: customers_card_transactions", "question": "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"} +{"answer": "Show distinct first and last names for all customers with an account.\nAdditional table information: table: customers_card_transactions", "question": "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"} +{"answer": "What are the full names of customers who have accounts?\nAdditional table information: table: customers_card_transactions", "question": "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"} +{"answer": "How many customers have an account?\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(DISTINCT customer_id) FROM Accounts"} +{"answer": "Count the number of customers who hold an account.\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(DISTINCT customer_id) FROM Accounts"} +{"answer": "How many customers do we have?\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(*) FROM Customers"} +{"answer": "Count the number of customers.\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(*) FROM Customers"} +{"answer": "Show ids, first names, last names, and phones for all customers.\nAdditional table information: table: customers_card_transactions", "question": "SELECT customer_id, customer_first_name, customer_last_name, customer_phone FROM Customers"} +{"answer": "What are the ids, full names, and phones of each customer?\nAdditional table information: table: customers_card_transactions", "question": "SELECT customer_id, customer_first_name, customer_last_name, customer_phone FROM Customers"} +{"answer": "What is the phone and email for customer with first name Aniyah and last name Feest?\nAdditional table information: table: customers_card_transactions", "question": "SELECT customer_phone, customer_email FROM Customers WHERE customer_first_name = 'Aniyah' AND customer_last_name = 'Feest'"} +{"answer": "Return the phone and email of the customer with the first name Aniyah and last name Feest.\nAdditional table information: table: customers_card_transactions", "question": "SELECT customer_phone, customer_email FROM Customers WHERE customer_first_name = 'Aniyah' AND customer_last_name = 'Feest'"} +{"answer": "Show the number of customer cards.\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(*) FROM Customers_cards"} +{"answer": "How many customer cards are there?\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(*) FROM Customers_cards"} +{"answer": "Show ids, customer ids, card type codes, card numbers for all cards.\nAdditional table information: table: customers_card_transactions", "question": "SELECT card_id, customer_id, card_type_code, card_number FROM Customers_cards"} +{"answer": "What are card ids, customer ids, card types, and card numbers for each customer card?\nAdditional table information: table: customers_card_transactions", "question": "SELECT card_id, customer_id, card_type_code, card_number FROM Customers_cards"} +{"answer": "Show the date valid from and the date valid to for the card with card number '4560596484842'.\nAdditional table information: table: customers_card_transactions", "question": "SELECT date_valid_from, date_valid_to FROM Customers_cards WHERE card_number = '4560596484842'"} +{"answer": "What are the valid from and valid to dates for the card with the number 4560596484842?\nAdditional table information: table: customers_card_transactions", "question": "SELECT date_valid_from, date_valid_to FROM Customers_cards WHERE card_number = '4560596484842'"} +{"answer": "What is the first name, last name, and phone of the customer with card 4560596484842.\nAdditional table information: table: customers_card_transactions", "question": "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'"} +{"answer": "Return the full name and phone of the customer who has card number 4560596484842.\nAdditional table information: table: customers_card_transactions", "question": "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'"} +{"answer": "How many cards does customer Art Turcotte have?\nAdditional table information: table: customers_card_transactions", "question": "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'"} +{"answer": "Count the number of cards the customer with the first name Art and last name Turcotte has.\nAdditional table information: table: customers_card_transactions", "question": "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'"} +{"answer": "How many debit cards do we have?\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(*) FROM Customers_cards WHERE card_type_code = 'Debit'"} +{"answer": "Count the number of customer cards of the type Debit.\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(*) FROM Customers_cards WHERE card_type_code = 'Debit'"} +{"answer": "How many credit cards does customer Blanche Huels have?\nAdditional table information: table: customers_card_transactions", "question": "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'"} +{"answer": "Count the number of credit cards that the customer with first name Blanche and last name Huels has.\nAdditional table information: table: customers_card_transactions", "question": "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'"} +{"answer": "Show all customer ids and the number of cards owned by each customer.\nAdditional table information: table: customers_card_transactions", "question": "SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id"} +{"answer": "What are the different customer ids, and how many cards does each one hold?\nAdditional table information: table: customers_card_transactions", "question": "SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id"} +{"answer": "What is the customer id with most number of cards, and how many does he have?\nAdditional table information: table: customers_card_transactions", "question": "SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Return the id of the customer who has the most cards, as well as the number of cards.\nAdditional table information: table: customers_card_transactions", "question": "SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show id, first and last names for all customers with at least two cards.\nAdditional table information: table: customers_card_transactions", "question": "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"} +{"answer": "What are the ids and full names of customers who hold two or more cards?\nAdditional table information: table: customers_card_transactions", "question": "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"} +{"answer": "What is the customer id, first and last name with least number of accounts.\nAdditional table information: table: customers_card_transactions", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Return the id and full name of the customer who has the fewest accounts.\nAdditional table information: table: customers_card_transactions", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Show all card type codes and the number of cards in each type.\nAdditional table information: table: customers_card_transactions", "question": "SELECT card_type_code, COUNT(*) FROM Customers_cards GROUP BY card_type_code"} +{"answer": "What are the different card types, and how many cards are there of each?\nAdditional table information: table: customers_card_transactions", "question": "SELECT card_type_code, COUNT(*) FROM Customers_cards GROUP BY card_type_code"} +{"answer": "What is the card type code with most number of cards?\nAdditional table information: table: customers_card_transactions", "question": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Return the code of the card type that is most common.\nAdditional table information: table: customers_card_transactions", "question": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show card type codes with at least 5 cards.\nAdditional table information: table: customers_card_transactions", "question": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING COUNT(*) >= 5"} +{"answer": "What are the codes of card types that have 5 or more cards?\nAdditional table information: table: customers_card_transactions", "question": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING COUNT(*) >= 5"} +{"answer": "Show all card type codes and the number of customers holding cards in each type.\nAdditional table information: table: customers_card_transactions", "question": "SELECT card_type_code, COUNT(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code"} +{"answer": "What are the different card type codes, and how many different customers hold each type?\nAdditional table information: table: customers_card_transactions", "question": "SELECT card_type_code, COUNT(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code"} +{"answer": "Show the customer ids and firstname without a credit card.\nAdditional table information: table: customers_card_transactions", "question": "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'"} +{"answer": "What are the ids and first names of customers who do not hold a credit card?\nAdditional table information: table: customers_card_transactions", "question": "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'"} +{"answer": "Show all card type codes.\nAdditional table information: table: customers_card_transactions", "question": "SELECT DISTINCT card_type_code FROM Customers_Cards"} +{"answer": "What are the different card type codes?\nAdditional table information: table: customers_card_transactions", "question": "SELECT DISTINCT card_type_code FROM Customers_Cards"} +{"answer": "Show the number of card types.\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(DISTINCT card_type_code) FROM Customers_Cards"} +{"answer": "How many different card types are there?\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(DISTINCT card_type_code) FROM Customers_Cards"} +{"answer": "Show all transaction types.\nAdditional table information: table: customers_card_transactions", "question": "SELECT DISTINCT transaction_type FROM Financial_Transactions"} +{"answer": "What are the different types of transactions?\nAdditional table information: table: customers_card_transactions", "question": "SELECT DISTINCT transaction_type FROM Financial_Transactions"} +{"answer": "Show the number of transaction types.\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(DISTINCT transaction_type) FROM Financial_Transactions"} +{"answer": "How many different types of transactions are there?\nAdditional table information: table: customers_card_transactions", "question": "SELECT COUNT(DISTINCT transaction_type) FROM Financial_Transactions"} +{"answer": "What is the average and total transaction amount?\nAdditional table information: table: customers_card_transactions", "question": "SELECT AVG(transaction_amount), SUM(transaction_amount) FROM Financial_transactions"} +{"answer": "Return the average transaction amount, as well as the total amount of all transactions.\nAdditional table information: table: customers_card_transactions", "question": "SELECT AVG(transaction_amount), SUM(transaction_amount) FROM Financial_transactions"} +{"answer": "Show the card type codes and the number of transactions.\nAdditional table information: table: customers_card_transactions", "question": "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"} +{"answer": "What are the different card types, and how many transactions have been made with each?\nAdditional table information: table: customers_card_transactions", "question": "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"} +{"answer": "Show the transaction type and the number of transactions.\nAdditional table information: table: customers_card_transactions", "question": "SELECT transaction_type, COUNT(*) FROM Financial_transactions GROUP BY transaction_type"} +{"answer": "What are the different transaction types, and how many transactions of each have taken place?\nAdditional table information: table: customers_card_transactions", "question": "SELECT transaction_type, COUNT(*) FROM Financial_transactions GROUP BY transaction_type"} +{"answer": "What is the transaction type that has processed the greatest total amount in transactions?\nAdditional table information: table: customers_card_transactions", "question": "SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY SUM(transaction_amount) DESC LIMIT 1"} +{"answer": "Return the type of transaction with the highest total amount.\nAdditional table information: table: customers_card_transactions", "question": "SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY SUM(transaction_amount) DESC LIMIT 1"} +{"answer": "Show the account id and the number of transactions for each account\nAdditional table information: table: customers_card_transactions", "question": "SELECT account_id, COUNT(*) FROM Financial_transactions GROUP BY account_id"} +{"answer": "What are the different account ids that have made financial transactions, as well as how many transactions correspond to each?\nAdditional table information: table: customers_card_transactions", "question": "SELECT account_id, COUNT(*) FROM Financial_transactions GROUP BY account_id"} +{"answer": "How many tracks do we have?\nAdditional table information: table: race_track", "question": "SELECT COUNT(*) FROM track"} +{"answer": "Count the number of tracks.\nAdditional table information: table: race_track", "question": "SELECT COUNT(*) FROM track"} +{"answer": "Show the name and location for all tracks.\nAdditional table information: table: race_track", "question": "SELECT name, LOCATION FROM track"} +{"answer": "What are the names and locations of all tracks?\nAdditional table information: table: race_track", "question": "SELECT name, LOCATION FROM track"} +{"answer": "Show names and seatings, ordered by seating for all tracks opened after 2000.\nAdditional table information: table: race_track", "question": "SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating NULLS FIRST"} +{"answer": "What are the names and seatings for all tracks opened after 2000, ordered by seating?\nAdditional table information: table: race_track", "question": "SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating NULLS FIRST"} +{"answer": "What is the name, location and seating for the most recently opened track?\nAdditional table information: table: race_track", "question": "SELECT name, LOCATION, seating FROM track ORDER BY year_opened DESC LIMIT 1"} +{"answer": "Return the name, location, and seating of the track that was opened in the most recent year.\nAdditional table information: table: race_track", "question": "SELECT name, LOCATION, seating FROM track ORDER BY year_opened DESC LIMIT 1"} +{"answer": "What is the minimum, maximum, and average seating for all tracks.\nAdditional table information: table: race_track", "question": "SELECT MIN(seating), MAX(seating), AVG(seating) FROM track"} +{"answer": "Return the minimum, maximum, and average seating across all tracks.\nAdditional table information: table: race_track", "question": "SELECT MIN(seating), MAX(seating), AVG(seating) FROM track"} +{"answer": "Show the name, location, open year for all tracks with a seating higher than the average.\nAdditional table information: table: race_track", "question": "SELECT name, LOCATION, year_opened FROM track WHERE seating > (SELECT AVG(seating) FROM track)"} +{"answer": "What are the names, locations, and years of opening for tracks with seating higher than average?\nAdditional table information: table: race_track", "question": "SELECT name, LOCATION, year_opened FROM track WHERE seating > (SELECT AVG(seating) FROM track)"} +{"answer": "What are distinct locations where tracks are located?\nAdditional table information: table: race_track", "question": "SELECT DISTINCT LOCATION FROM track"} +{"answer": "Give the different locations of tracks.\nAdditional table information: table: race_track", "question": "SELECT DISTINCT LOCATION FROM track"} +{"answer": "How many races are there?\nAdditional table information: table: race_track", "question": "SELECT COUNT(*) FROM race"} +{"answer": "Count the number of races.\nAdditional table information: table: race_track", "question": "SELECT COUNT(*) FROM race"} +{"answer": "What are the distinct classes that races can have?\nAdditional table information: table: race_track", "question": "SELECT DISTINCT CLASS FROM race"} +{"answer": "Return the different classes of races.\nAdditional table information: table: race_track", "question": "SELECT DISTINCT CLASS FROM race"} +{"answer": "Show name, class, and date for all races.\nAdditional table information: table: race_track", "question": "SELECT name, CLASS, date FROM race"} +{"answer": "What are the names, classes, and dates for all races?\nAdditional table information: table: race_track", "question": "SELECT name, CLASS, date FROM race"} +{"answer": "Show the race class and number of races in each class.\nAdditional table information: table: race_track", "question": "SELECT CLASS, COUNT(*) FROM race GROUP BY CLASS"} +{"answer": "What are the different classes of races, and how many races correspond to each?\nAdditional table information: table: race_track", "question": "SELECT CLASS, COUNT(*) FROM race GROUP BY CLASS"} +{"answer": "What is the race class with most number of races.\nAdditional table information: table: race_track", "question": "SELECT CLASS FROM race GROUP BY CLASS ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Give the class of races that is most common.\nAdditional table information: table: race_track", "question": "SELECT CLASS FROM race GROUP BY CLASS ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the race class with at least two races.\nAdditional table information: table: race_track", "question": "SELECT CLASS FROM race GROUP BY CLASS HAVING COUNT(*) >= 2"} +{"answer": "What are the classes of races that have two or more corresponding races?\nAdditional table information: table: race_track", "question": "SELECT CLASS FROM race GROUP BY CLASS HAVING COUNT(*) >= 2"} +{"answer": "What are the names for tracks without a race in class 'GT'.\nAdditional table information: table: race_track", "question": "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'"} +{"answer": "Give the names of tracks that do not have a race in the class 'GT'.\nAdditional table information: table: race_track", "question": "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'"} +{"answer": "Show all track names that have had no races.\nAdditional table information: table: race_track", "question": "SELECT name FROM track WHERE NOT track_id IN (SELECT track_id FROM race)"} +{"answer": "Return the names of tracks that have no had any races.\nAdditional table information: table: race_track", "question": "SELECT name FROM track WHERE NOT track_id IN (SELECT track_id FROM race)"} +{"answer": "Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened.\nAdditional table information: table: race_track", "question": "SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000"} +{"answer": "What are the years of opening for tracks with seating between 4000 and 5000?\nAdditional table information: table: race_track", "question": "SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000"} +{"answer": "Show the name of track and the number of races in each track.\nAdditional table information: table: race_track", "question": "SELECT T2.name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id"} +{"answer": "What are the names of different tracks, and how many races has each had?\nAdditional table information: table: race_track", "question": "SELECT T2.name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id"} +{"answer": "Show the name of track with most number of races.\nAdditional table information: table: race_track", "question": "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"} +{"answer": "What is the name of the track that has had the greatest number of races?\nAdditional table information: table: race_track", "question": "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"} +{"answer": "Show the name and date for each race and its track name.\nAdditional table information: table: race_track", "question": "SELECT T1.name, T1.date, T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id"} +{"answer": "What are the names and dates of races, and the names of the tracks where they are held?\nAdditional table information: table: race_track", "question": "SELECT T1.name, T1.date, T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id"} +{"answer": "Show the name and location of track with 1 race.\nAdditional table information: table: race_track", "question": "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"} +{"answer": "What are the names and locations of tracks that have had exactly 1 race?\nAdditional table information: table: race_track", "question": "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"} +{"answer": "Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats.\nAdditional table information: table: race_track", "question": "SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000"} +{"answer": "What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats?\nAdditional table information: table: race_track", "question": "SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000"} +{"answer": "How many members have the black membership card?\nAdditional table information: table: coffee_shop", "question": "SELECT COUNT(*) FROM member WHERE Membership_card = 'Black'"} +{"answer": "Find the number of members living in each address.\nAdditional table information: table: coffee_shop", "question": "SELECT COUNT(*), address FROM member GROUP BY address"} +{"answer": "Give me the names of members whose address is in Harford or Waterbury.\nAdditional table information: table: coffee_shop", "question": "SELECT name FROM member WHERE address = 'Harford' OR address = 'Waterbury'"} +{"answer": "Find the ids and names of members who are under age 30 or with black membership card.\nAdditional table information: table: coffee_shop", "question": "SELECT name, member_id FROM member WHERE Membership_card = 'Black' OR age < 30"} +{"answer": "Find the purchase time, age and address of each member, and show the results in the order of purchase time.\nAdditional table information: table: coffee_shop", "question": "SELECT Time_of_purchase, age, address FROM member ORDER BY Time_of_purchase NULLS FIRST"} +{"answer": "Which membership card has more than 5 members?\nAdditional table information: table: coffee_shop", "question": "SELECT Membership_card FROM member GROUP BY Membership_card HAVING COUNT(*) > 5"} +{"answer": "Which address has both members younger than 30 and members older than 40?\nAdditional table information: table: coffee_shop", "question": "SELECT address FROM member WHERE age < 30 INTERSECT SELECT address FROM member WHERE age > 40"} +{"answer": "What is the membership card held by both members living in Hartford and ones living in Waterbury address?\nAdditional table information: table: coffee_shop", "question": "SELECT membership_card FROM member WHERE address = 'Hartford' INTERSECT SELECT membership_card FROM member WHERE address = 'Waterbury'"} +{"answer": "How many members are not living in Hartford?\nAdditional table information: table: coffee_shop", "question": "SELECT COUNT(*) FROM member WHERE address <> 'Hartford'"} +{"answer": "Which address do not have any member with the black membership card?\nAdditional table information: table: coffee_shop", "question": "SELECT address FROM member EXCEPT SELECT address FROM member WHERE Membership_card = 'Black'"} +{"answer": "Show the shop addresses ordered by their opening year.\nAdditional table information: table: coffee_shop", "question": "SELECT address FROM shop ORDER BY open_year NULLS FIRST"} +{"answer": "What are the average score and average staff number of all shops?\nAdditional table information: table: coffee_shop", "question": "SELECT AVG(num_of_staff), AVG(score) FROM shop"} +{"answer": "Find the id and address of the shops whose score is below the average score.\nAdditional table information: table: coffee_shop", "question": "SELECT shop_id, address FROM shop WHERE score < (SELECT AVG(score) FROM shop)"} +{"answer": "Find the address and staff number of the shops that do not have any happy hour.\nAdditional table information: table: coffee_shop", "question": "SELECT address, num_of_staff FROM shop WHERE NOT shop_id IN (SELECT shop_id FROM happy_hour)"} +{"answer": "What are the id and address of the shops which have a happy hour in May?\nAdditional table information: table: coffee_shop", "question": "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'"} +{"answer": "which shop has happy hour most frequently? List its id and number of happy hours.\nAdditional table information: table: coffee_shop", "question": "SELECT shop_id, COUNT(*) FROM happy_hour GROUP BY shop_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which month has the most happy hours?\nAdditional table information: table: coffee_shop", "question": "SELECT MONTH FROM happy_hour GROUP BY MONTH ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which months have more than 2 happy hours?\nAdditional table information: table: coffee_shop", "question": "SELECT MONTH FROM happy_hour GROUP BY MONTH HAVING COUNT(*) > 2"} +{"answer": "How many albums are there?\nAdditional table information: table: chinook_1", "question": "SELECT COUNT(*) FROM ALBUM"} +{"answer": "Find the number of albums.\nAdditional table information: table: chinook_1", "question": "SELECT COUNT(*) FROM ALBUM"} +{"answer": "List the names of all music genres.\nAdditional table information: table: chinook_1", "question": "SELECT Name FROM GENRE"} +{"answer": "What are the names of different music genres?\nAdditional table information: table: chinook_1", "question": "SELECT Name FROM GENRE"} +{"answer": "Find all the customer information in state NY.\nAdditional table information: table: chinook_1", "question": "SELECT * FROM CUSTOMER WHERE State = 'NY'"} +{"answer": "What is all the customer information for customers in NY state?\nAdditional table information: table: chinook_1", "question": "SELECT * FROM CUSTOMER WHERE State = 'NY'"} +{"answer": "What are the first names and last names of the employees who live in Calgary city.\nAdditional table information: table: chinook_1", "question": "SELECT FirstName, LastName FROM EMPLOYEE WHERE City = 'Calgary'"} +{"answer": "Find the full names of employees living in the city of Calgary.\nAdditional table information: table: chinook_1", "question": "SELECT FirstName, LastName FROM EMPLOYEE WHERE City = 'Calgary'"} +{"answer": "What are the distinct billing countries of the invoices?\nAdditional table information: table: chinook_1", "question": "SELECT DISTINCT (BillingCountry) FROM INVOICE"} +{"answer": "Find the different billing countries for all invoices.\nAdditional table information: table: chinook_1", "question": "SELECT DISTINCT (BillingCountry) FROM INVOICE"} +{"answer": "Find the names of all artists that have 'a' in their names.\nAdditional table information: table: chinook_1", "question": "SELECT Name FROM ARTIST WHERE Name LIKE '%a%'"} +{"answer": "What are the names of artist who have the letter 'a' in their names?\nAdditional table information: table: chinook_1", "question": "SELECT Name FROM ARTIST WHERE Name LIKE '%a%'"} +{"answer": "Find the title of all the albums of the artist 'AC/DC'.\nAdditional table information: table: chinook_1", "question": "SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'AC/DC'"} +{"answer": "What are the titles of albums by the artist 'AC/DC'?\nAdditional table information: table: chinook_1", "question": "SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'AC/DC'"} +{"answer": "Hom many albums does the artist 'Metallica' have?\nAdditional table information: table: chinook_1", "question": "SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'Metallica'"} +{"answer": "Find the number of albums by the artist 'Metallica'.\nAdditional table information: table: chinook_1", "question": "SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'Metallica'"} +{"answer": "Which artist does the album 'Balls to the Wall' belong to?\nAdditional table information: table: chinook_1", "question": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = 'Balls to the Wall'"} +{"answer": "Find the name of the artist who made the album 'Balls to the Wall'.\nAdditional table information: table: chinook_1", "question": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = 'Balls to the Wall'"} +{"answer": "Which artist has the most albums?\nAdditional table information: table: chinook_1", "question": "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"} +{"answer": "What is the name of the artist with the greatest number of albums?\nAdditional table information: table: chinook_1", "question": "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"} +{"answer": "Find the names of all the tracks that contain the word 'you'.\nAdditional table information: table: chinook_1", "question": "SELECT Name FROM TRACK WHERE Name LIKE '%you%'"} +{"answer": "What are the names of tracks that contain the the word you in them?\nAdditional table information: table: chinook_1", "question": "SELECT Name FROM TRACK WHERE Name LIKE '%you%'"} +{"answer": "What is the average unit price of all the tracks?\nAdditional table information: table: chinook_1", "question": "SELECT AVG(UnitPrice) FROM TRACK"} +{"answer": "Find the average unit price for a track.\nAdditional table information: table: chinook_1", "question": "SELECT AVG(UnitPrice) FROM TRACK"} +{"answer": "What are the durations of the longest and the shortest tracks in milliseconds?\nAdditional table information: table: chinook_1", "question": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM TRACK"} +{"answer": "Find the maximum and minimum durations of tracks in milliseconds.\nAdditional table information: table: chinook_1", "question": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM TRACK"} +{"answer": "Show the album names, ids and the number of tracks for each album.\nAdditional table information: table: chinook_1", "question": "SELECT T1.Title, T2.AlbumID, COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID"} +{"answer": "What are the names and ids of the different albums, and how many tracks are on each?\nAdditional table information: table: chinook_1", "question": "SELECT T1.Title, T2.AlbumID, COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID"} +{"answer": "What is the name of the most common genre in all tracks?\nAdditional table information: table: chinook_1", "question": "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"} +{"answer": "Find the name of the genre that is most frequent across all tracks.\nAdditional table information: table: chinook_1", "question": "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"} +{"answer": "What is the least common media type in all tracks?\nAdditional table information: table: chinook_1", "question": "SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "What is the name of the media type that is least common across all tracks?\nAdditional table information: table: chinook_1", "question": "SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "Show the album names and ids for albums that contain tracks with unit price bigger than 1.\nAdditional table information: table: chinook_1", "question": "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"} +{"answer": "What are the titles and ids for albums containing tracks with unit price greater than 1?\nAdditional table information: table: chinook_1", "question": "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"} +{"answer": "How many tracks belong to rock genre?\nAdditional table information: table: chinook_1", "question": "SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock'"} +{"answer": "Count the number of tracks that are part of the rock genre.\nAdditional table information: table: chinook_1", "question": "SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock'"} +{"answer": "What is the average unit price of tracks that belong to Jazz genre?\nAdditional table information: table: chinook_1", "question": "SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Jazz'"} +{"answer": "Find the average unit price of jazz tracks.\nAdditional table information: table: chinook_1", "question": "SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Jazz'"} +{"answer": "What is the first name and last name of the customer that has email 'luisg@embraer.com.br'?\nAdditional table information: table: chinook_1", "question": "SELECT FirstName, LastName FROM CUSTOMER WHERE Email = 'luisg@embraer.com.br'"} +{"answer": "Find the full name of the customer with the email 'luisg@embraer.com.br'.\nAdditional table information: table: chinook_1", "question": "SELECT FirstName, LastName FROM CUSTOMER WHERE Email = 'luisg@embraer.com.br'"} +{"answer": "How many customers have email that contains 'gmail.com'?\nAdditional table information: table: chinook_1", "question": "SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE '%gmail.com%'"} +{"answer": "Count the number of customers that have an email containing 'gmail.com'.\nAdditional table information: table: chinook_1", "question": "SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE '%gmail.com%'"} +{"answer": "What is the first name and last name employee helps the customer with first name Leonie?\nAdditional table information: table: chinook_1", "question": "SELECT T2.FirstName, T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = 'Leonie'"} +{"answer": "Find the full names of employees who help customers with the first name Leonie.\nAdditional table information: table: chinook_1", "question": "SELECT T2.FirstName, T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = 'Leonie'"} +{"answer": "What city does the employee who helps the customer with postal code 70174 live in?\nAdditional table information: table: chinook_1", "question": "SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = '70174'"} +{"answer": "Find the cities corresponding to employees who help customers with the postal code 70174.\nAdditional table information: table: chinook_1", "question": "SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = '70174'"} +{"answer": "How many distinct cities does the employees live in?\nAdditional table information: table: chinook_1", "question": "SELECT COUNT(DISTINCT city) FROM EMPLOYEE"} +{"answer": "Find the number of different cities that employees live in.\nAdditional table information: table: chinook_1", "question": "SELECT COUNT(DISTINCT city) FROM EMPLOYEE"} +{"answer": "Find all invoice dates corresponding to customers with first name Astrid and last name Gruber.\nAdditional table information: table: chinook_1", "question": "SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = 'Astrid' AND LastName = 'Gruber'"} +{"answer": "What are the invoice dates for customers with the first name Astrid and the last name Gruber?\nAdditional table information: table: chinook_1", "question": "SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = 'Astrid' AND LastName = 'Gruber'"} +{"answer": "Find all the customer last names that do not have invoice totals larger than 20.\nAdditional table information: table: chinook_1", "question": "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"} +{"answer": "What are the last names of customers without invoice totals exceeding 20?\nAdditional table information: table: chinook_1", "question": "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"} +{"answer": "Find the first names of all customers that live in Brazil and have an invoice.\nAdditional table information: table: chinook_1", "question": "SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Brazil'"} +{"answer": "What are the different first names for customers from Brazil who have also had an invoice?\nAdditional table information: table: chinook_1", "question": "SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Brazil'"} +{"answer": "Find the address of all customers that live in Germany and have invoice.\nAdditional table information: table: chinook_1", "question": "SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Germany'"} +{"answer": "What are the addresses of customers living in Germany who have had an invoice?\nAdditional table information: table: chinook_1", "question": "SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Germany'"} +{"answer": "List the phone numbers of all employees.\nAdditional table information: table: chinook_1", "question": "SELECT Phone FROM EMPLOYEE"} +{"answer": "What are the phone numbers for each employee?\nAdditional table information: table: chinook_1", "question": "SELECT Phone FROM EMPLOYEE"} +{"answer": "How many tracks are in the AAC audio file media type?\nAdditional table information: table: chinook_1", "question": "SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = 'AAC audio file'"} +{"answer": "Count the number of tracks that are of the media type 'AAC audio file'.\nAdditional table information: table: chinook_1", "question": "SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = 'AAC audio file'"} +{"answer": "What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?\nAdditional table information: table: chinook_1", "question": "SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Latin' OR T1.Name = 'Pop'"} +{"answer": "Find the average millisecond length of Latin and Pop tracks.\nAdditional table information: table: chinook_1", "question": "SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Latin' OR T1.Name = 'Pop'"} +{"answer": "Please show the employee first names and ids of employees who serve at least 10 customers.\nAdditional table information: table: chinook_1", "question": "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"} +{"answer": "What are the first names and support rep ids for employees serving 10 or more customers?\nAdditional table information: table: chinook_1", "question": "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"} +{"answer": "Please show the employee last names that serves no more than 20 customers.\nAdditional table information: table: chinook_1", "question": "SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20"} +{"answer": "What are the last names of employees who serve at most 20 customers?\nAdditional table information: table: chinook_1", "question": "SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20"} +{"answer": "Please list all album titles in alphabetical order.\nAdditional table information: table: chinook_1", "question": "SELECT Title FROM ALBUM ORDER BY Title NULLS FIRST"} +{"answer": "What are all the album titles, in alphabetical order?\nAdditional table information: table: chinook_1", "question": "SELECT Title FROM ALBUM ORDER BY Title NULLS FIRST"} +{"answer": "Please list the name and id of all artists that have at least 3 albums in alphabetical order.\nAdditional table information: table: chinook_1", "question": "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 NULLS FIRST"} +{"answer": "What are the names and ids of artists with 3 or more albums, listed in alphabetical order?\nAdditional table information: table: chinook_1", "question": "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 NULLS FIRST"} +{"answer": "Find the names of artists that do not have any albums.\nAdditional table information: table: chinook_1", "question": "SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId"} +{"answer": "What are the names of artists who have not released any albums?\nAdditional table information: table: chinook_1", "question": "SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId"} +{"answer": "What is the average unit price of rock tracks?\nAdditional table information: table: chinook_1", "question": "SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock'"} +{"answer": "Find the average unit price of tracks from the Rock genre.\nAdditional table information: table: chinook_1", "question": "SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock'"} +{"answer": "What are the duration of the longest and shortest pop tracks in milliseconds?\nAdditional table information: table: chinook_1", "question": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Pop'"} +{"answer": "Find the maximum and minimum millisecond lengths of pop tracks.\nAdditional table information: table: chinook_1", "question": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Pop'"} +{"answer": "What are the birth dates of employees living in Edmonton?\nAdditional table information: table: chinook_1", "question": "SELECT BirthDate FROM EMPLOYEE WHERE City = 'Edmonton'"} +{"answer": "Find the birth dates corresponding to employees who live in the city of Edmonton.\nAdditional table information: table: chinook_1", "question": "SELECT BirthDate FROM EMPLOYEE WHERE City = 'Edmonton'"} +{"answer": "What are the distinct unit prices of all tracks?\nAdditional table information: table: chinook_1", "question": "SELECT DISTINCT (UnitPrice) FROM TRACK"} +{"answer": "Find the distinct unit prices for tracks.\nAdditional table information: table: chinook_1", "question": "SELECT DISTINCT (UnitPrice) FROM TRACK"} +{"answer": "How many artists do not have any album?\nAdditional table information: table: chinook_1", "question": "SELECT COUNT(*) FROM ARTIST WHERE NOT artistid IN (SELECT artistid FROM ALBUM)"} +{"answer": "Cound the number of artists who have not released an album.\nAdditional table information: table: chinook_1", "question": "SELECT COUNT(*) FROM ARTIST WHERE NOT artistid IN (SELECT artistid FROM ALBUM)"} +{"answer": "What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?\nAdditional table information: table: chinook_1", "question": "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'"} +{"answer": "Find the titles of albums that contain tracks of both the Reggae and Rock genres.\nAdditional table information: table: chinook_1", "question": "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'"} +{"answer": "Find all the phone numbers.\nAdditional table information: table: insurance_fnol", "question": "SELECT customer_phone FROM available_policies"} +{"answer": "What are all the phone numbers?\nAdditional table information: table: insurance_fnol", "question": "SELECT customer_phone FROM available_policies"} +{"answer": "What are the customer phone numbers under the policy 'Life Insurance'?\nAdditional table information: table: insurance_fnol", "question": "SELECT customer_phone FROM available_policies WHERE policy_type_code = 'Life Insurance'"} +{"answer": "What are the phone numbers of customers using the policy with the code 'Life Insurance'?\nAdditional table information: table: insurance_fnol", "question": "SELECT customer_phone FROM available_policies WHERE policy_type_code = 'Life Insurance'"} +{"answer": "Which policy type has the most records in the database?\nAdditional table information: table: insurance_fnol", "question": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which policy type appears most frequently in the available policies?\nAdditional table information: table: insurance_fnol", "question": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are all the customer phone numbers under the most popular policy type?\nAdditional table information: table: insurance_fnol", "question": "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)"} +{"answer": "Find the phone numbers of customers using the most common policy type among the available policies.\nAdditional table information: table: insurance_fnol", "question": "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)"} +{"answer": "Find the policy type used by more than 4 customers.\nAdditional table information: table: insurance_fnol", "question": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING COUNT(*) > 4"} +{"answer": "Find the policy types more than 4 customers use. Show their type code.\nAdditional table information: table: insurance_fnol", "question": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING COUNT(*) > 4"} +{"answer": "Find the total and average amount of settlements.\nAdditional table information: table: insurance_fnol", "question": "SELECT SUM(settlement_amount), AVG(settlement_amount) FROM settlements"} +{"answer": "Return the sum and average of all settlement amounts.\nAdditional table information: table: insurance_fnol", "question": "SELECT SUM(settlement_amount), AVG(settlement_amount) FROM settlements"} +{"answer": "Find the name of services that have been used for more than 2 times in first notification of loss.\nAdditional table information: table: insurance_fnol", "question": "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"} +{"answer": "Which services have been used more than twice in first notification of loss? Return the service name.\nAdditional table information: table: insurance_fnol", "question": "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"} +{"answer": "What is the effective date of the claim that has the largest amount of total settlement?\nAdditional table information: table: insurance_fnol", "question": "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"} +{"answer": "Find the claim that has the largest total settlement amount. Return the effective date of the claim.\nAdditional table information: table: insurance_fnol", "question": "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"} +{"answer": "How many policies are listed for the customer named 'Dayana Robel'?\nAdditional table information: table: insurance_fnol", "question": "SELECT COUNT(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Dayana Robel'"} +{"answer": "Count the total number of policies used by the customer named 'Dayana Robel'.\nAdditional table information: table: insurance_fnol", "question": "SELECT COUNT(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Dayana Robel'"} +{"answer": "What is the name of the customer who has the most policies listed?\nAdditional table information: table: insurance_fnol", "question": "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"} +{"answer": "Which customer uses the most policies? Give me the customer name.\nAdditional table information: table: insurance_fnol", "question": "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"} +{"answer": "What are all the policy types of the customer named 'Dayana Robel'?\nAdditional table information: table: insurance_fnol", "question": "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'"} +{"answer": "Tell me the types of the policy used by the customer named 'Dayana Robel'.\nAdditional table information: table: insurance_fnol", "question": "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'"} +{"answer": "What are all the policy types of the customer that has the most policies listed?\nAdditional table information: table: insurance_fnol", "question": "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)"} +{"answer": "List all the policy types used by the customer enrolled in the most policies.\nAdditional table information: table: insurance_fnol", "question": "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)"} +{"answer": "List all the services in the alphabetical order.\nAdditional table information: table: insurance_fnol", "question": "SELECT service_name FROM services ORDER BY service_name NULLS FIRST"} +{"answer": "Give me a list of all the service names sorted alphabetically.\nAdditional table information: table: insurance_fnol", "question": "SELECT service_name FROM services ORDER BY service_name NULLS FIRST"} +{"answer": "How many services are there?\nAdditional table information: table: insurance_fnol", "question": "SELECT COUNT(*) FROM services"} +{"answer": "Count the total number of available services.\nAdditional table information: table: insurance_fnol", "question": "SELECT COUNT(*) FROM services"} +{"answer": "Find the names of users who do not have a first notification of loss record.\nAdditional table information: table: insurance_fnol", "question": "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"} +{"answer": "Which customers do not have a first notification of loss record? Give me the customer names.\nAdditional table information: table: insurance_fnol", "question": "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"} +{"answer": "Find the names of customers who have used either the service 'Close a policy' or the service 'Upgrade a policy'.\nAdditional table information: table: insurance_fnol", "question": "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'"} +{"answer": "Which customers have used the service named 'Close a policy' or 'Upgrade a policy'? Give me the customer names.\nAdditional table information: table: insurance_fnol", "question": "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'"} +{"answer": "Find the names of customers who have used both the service 'Close a policy' and the service 'New policy application'.\nAdditional table information: table: insurance_fnol", "question": "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'"} +{"answer": "Which customers have used both the service named 'Close a policy' and the service named 'Upgrade a policy'? Give me the customer names.\nAdditional table information: table: insurance_fnol", "question": "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'"} +{"answer": "Find the IDs of customers whose name contains 'Diana'.\nAdditional table information: table: insurance_fnol", "question": "SELECT customer_id FROM customers WHERE customer_name LIKE '%Diana%'"} +{"answer": "What are the IDs of customers who have 'Diana' in part of their names?\nAdditional table information: table: insurance_fnol", "question": "SELECT customer_id FROM customers WHERE customer_name LIKE '%Diana%'"} +{"answer": "What are the maximum and minimum settlement amount on record?\nAdditional table information: table: insurance_fnol", "question": "SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements"} +{"answer": "Find the maximum and minimum settlement amount.\nAdditional table information: table: insurance_fnol", "question": "SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements"} +{"answer": "List all the customers in increasing order of IDs.\nAdditional table information: table: insurance_fnol", "question": "SELECT customer_id, customer_name FROM customers ORDER BY customer_id ASC NULLS FIRST"} +{"answer": "What is the ordered list of customer ids?\nAdditional table information: table: insurance_fnol", "question": "SELECT customer_id, customer_name FROM customers ORDER BY customer_id ASC NULLS FIRST"} +{"answer": "Retrieve the open and close dates of all the policies associated with the customer whose name contains 'Diana'\nAdditional table information: table: insurance_fnol", "question": "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%'"} +{"answer": "What are the open and close dates of all the policies used by the customer who have 'Diana' in part of their names?\nAdditional table information: table: insurance_fnol", "question": "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%'"} +{"answer": "How many kinds of enzymes are there?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT COUNT(*) FROM enzyme"} +{"answer": "What is the total count of enzymes?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT COUNT(*) FROM enzyme"} +{"answer": "List the name of enzymes in descending lexicographical order.\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT name FROM enzyme ORDER BY name DESC"} +{"answer": "What are the names of enzymes in descending order?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT name FROM enzyme ORDER BY name DESC"} +{"answer": "List the names and the locations that the enzymes can make an effect.\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT name, LOCATION FROM enzyme"} +{"answer": "What are the names and locations of all enzymes listed?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT name, LOCATION FROM enzyme"} +{"answer": "What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT MAX(OMIM) FROM enzyme"} +{"answer": "What is the maximum OMIM value in the database?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT MAX(OMIM) FROM enzyme"} +{"answer": "What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol'"} +{"answer": "What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol'"} +{"answer": "What are the names of enzymes who does not produce 'Heme'?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT name FROM enzyme WHERE product <> 'Heme'"} +{"answer": "What are the names of enzymes whose product is not 'Heme'?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT name FROM enzyme WHERE product <> 'Heme'"} +{"answer": "What are the names and trade names of the medicines which has 'Yes' value in the FDA record?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes'"} +{"answer": "What are the names and trade names of the medcines that are FDA approved?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes'"} +{"answer": "What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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'"} +{"answer": "What are the names of the enzymes used in the medicine Amisulpride that acts as inhibitors?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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'"} +{"answer": "What are the ids and names of the medicine that can interact with two or more enzymes?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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"} +{"answer": "For every medicine id, what are the names of the medicines that can interact with more than one enzyme?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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"} +{"answer": "What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with.\nAdditional table information: table: medicine_enzyme_interaction", "question": "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"} +{"answer": "What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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"} +{"answer": "What is the id and name of the enzyme with most number of medicines that can interact as 'activator'?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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"} +{"answer": "What is the id and name of the enzyme that can interact with the most medicines as an activator?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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"} +{"answer": "What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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'"} +{"answer": "What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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'"} +{"answer": "What is the most common interaction type between enzymes and medicine? And how many are there?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT interaction_type, COUNT(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the most common types of interactions between enzymes and medicine, and how many types are there?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT interaction_type, COUNT(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "How many medicines have the FDA approval status 'No' ?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No'"} +{"answer": "How many medicines were not approved by the FDA?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No'"} +{"answer": "How many enzymes do not have any interactions?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT COUNT(*) FROM enzyme WHERE NOT id IN (SELECT enzyme_id FROM medicine_enzyme_interaction)"} +{"answer": "What is the count of enzymes without any interactions?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT COUNT(*) FROM enzyme WHERE NOT id IN (SELECT enzyme_id FROM medicine_enzyme_interaction)"} +{"answer": "What is the id and trade name of the medicines can interact with at least 3 enzymes?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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"} +{"answer": "What are the ids and trade names of the medicine that can interact with at least 3 enzymes?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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"} +{"answer": "What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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'"} +{"answer": "What are the different names, locations, and products of the enzymes that are capable inhibitor interactions?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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'"} +{"answer": "List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes.\nAdditional table information: table: medicine_enzyme_interaction", "question": "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'"} +{"answer": "What are the medicine and trade names that can interact as an inhibitor and activitor with enzymes?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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'"} +{"answer": "Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'.\nAdditional table information: table: medicine_enzyme_interaction", "question": "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'"} +{"answer": "What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'?\nAdditional table information: table: medicine_enzyme_interaction", "question": "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'"} +{"answer": "How many distinct FDA approval statuses are there for the medicines?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT COUNT(DISTINCT FDA_approved) FROM medicine"} +{"answer": "How many different FDA approval statuses exist for medicines?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT COUNT(DISTINCT FDA_approved) FROM medicine"} +{"answer": "Which enzyme names have the substring 'ALA'?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT name FROM enzyme WHERE name LIKE '%ALA%'"} +{"answer": "What are the names of enzymes that include the string 'ALA'?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT name FROM enzyme WHERE name LIKE '%ALA%'"} +{"answer": "find the number of medicines offered by each trade.\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name"} +{"answer": "How many medicines are offered by each trade name?\nAdditional table information: table: medicine_enzyme_interaction", "question": "SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name"} +{"answer": "List all schools and their nicknames in the order of founded year.\nAdditional table information: table: university_basketball", "question": "SELECT school, nickname FROM university ORDER BY founded NULLS FIRST"} +{"answer": "What are the different schools and their nicknames, ordered by their founding years?\nAdditional table information: table: university_basketball", "question": "SELECT school, nickname FROM university ORDER BY founded NULLS FIRST"} +{"answer": "List all public schools and their locations.\nAdditional table information: table: university_basketball", "question": "SELECT school, LOCATION FROM university WHERE affiliation = 'Public'"} +{"answer": "What are the public schools and what are their locations?\nAdditional table information: table: university_basketball", "question": "SELECT school, LOCATION FROM university WHERE affiliation = 'Public'"} +{"answer": "When was the school with the largest enrollment founded?\nAdditional table information: table: university_basketball", "question": "SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1"} +{"answer": "Return the founded year for the school with the largest enrollment.\nAdditional table information: table: university_basketball", "question": "SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1"} +{"answer": "Find the founded year of the newest non public school.\nAdditional table information: table: university_basketball", "question": "SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1"} +{"answer": "What is the founded year of the non public school that was founded most recently?\nAdditional table information: table: university_basketball", "question": "SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1"} +{"answer": "How many schools are in the basketball match?\nAdditional table information: table: university_basketball", "question": "SELECT COUNT(DISTINCT school_id) FROM basketball_match"} +{"answer": "Count the number of schools that have had basketball matches.\nAdditional table information: table: university_basketball", "question": "SELECT COUNT(DISTINCT school_id) FROM basketball_match"} +{"answer": "What is the highest acc percent score in the competition?\nAdditional table information: table: university_basketball", "question": "SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1"} +{"answer": "Return the highest acc percent across all basketball matches.\nAdditional table information: table: university_basketball", "question": "SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1"} +{"answer": "What is the primary conference of the school that has the lowest acc percent score in the competition?\nAdditional table information: table: university_basketball", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Return the primary conference of the school with the lowest acc percentage score.\nAdditional table information: table: university_basketball", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the team name and acc regular season score of the school that was founded for the longest time?\nAdditional table information: table: university_basketball", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Return the name of the team and the acc during the regular season for the school that was founded the earliest.\nAdditional table information: table: university_basketball", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Find the location and all games score of the school that has Clemson as its team name.\nAdditional table information: table: university_basketball", "question": "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'"} +{"answer": "What are the all games score and location of the school called Clemson?\nAdditional table information: table: university_basketball", "question": "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'"} +{"answer": "What are the average enrollment size of the universities that are founded before 1850?\nAdditional table information: table: university_basketball", "question": "SELECT AVG(enrollment) FROM university WHERE founded < 1850"} +{"answer": "Return the average enrollment of universities founded before 1850.\nAdditional table information: table: university_basketball", "question": "SELECT AVG(enrollment) FROM university WHERE founded < 1850"} +{"answer": "Show the enrollment and primary_conference of the oldest college.\nAdditional table information: table: university_basketball", "question": "SELECT enrollment, primary_conference FROM university ORDER BY founded NULLS FIRST LIMIT 1"} +{"answer": "What are the enrollment and primary conference for the university which was founded the earliest?\nAdditional table information: table: university_basketball", "question": "SELECT enrollment, primary_conference FROM university ORDER BY founded NULLS FIRST LIMIT 1"} +{"answer": "What is the total and minimum enrollment of all schools?\nAdditional table information: table: university_basketball", "question": "SELECT SUM(enrollment), MIN(enrollment) FROM university"} +{"answer": "Return the total and minimum enrollments across all schools.\nAdditional table information: table: university_basketball", "question": "SELECT SUM(enrollment), MIN(enrollment) FROM university"} +{"answer": "Find the total student enrollment for different affiliation type schools.\nAdditional table information: table: university_basketball", "question": "SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation"} +{"answer": "What are the total enrollments of universities of each affiliation type?\nAdditional table information: table: university_basketball", "question": "SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation"} +{"answer": "How many schools do not participate in the basketball match?\nAdditional table information: table: university_basketball", "question": "SELECT COUNT(*) FROM university WHERE NOT school_id IN (SELECT school_id FROM basketball_match)"} +{"answer": "Count the number of universities that do not participate in the baketball match.\nAdditional table information: table: university_basketball", "question": "SELECT COUNT(*) FROM university WHERE NOT school_id IN (SELECT school_id FROM basketball_match)"} +{"answer": "Find the schools that were either founded after 1850 or public.\nAdditional table information: table: university_basketball", "question": "SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'"} +{"answer": "What are the schools that were either founded before 1850 or are public?\nAdditional table information: table: university_basketball", "question": "SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'"} +{"answer": "Find how many different affiliation types there are.\nAdditional table information: table: university_basketball", "question": "SELECT COUNT(DISTINCT affiliation) FROM university"} +{"answer": "Count the number of different affiliation types.\nAdditional table information: table: university_basketball", "question": "SELECT COUNT(DISTINCT affiliation) FROM university"} +{"answer": "Find how many school locations have the word 'NY'.\nAdditional table information: table: university_basketball", "question": "SELECT COUNT(*) FROM university WHERE LOCATION LIKE '%NY%'"} +{"answer": "How many universities have a location that contains NY?\nAdditional table information: table: university_basketball", "question": "SELECT COUNT(*) FROM university WHERE LOCATION LIKE '%NY%'"} +{"answer": "Find the team names of the universities whose enrollments are smaller than the average enrollment size.\nAdditional table information: table: university_basketball", "question": "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)"} +{"answer": "What are the names of teams from universities that have a below average enrollment?\nAdditional table information: table: university_basketball", "question": "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)"} +{"answer": "Find the number of universities that have over a 20000 enrollment size for each affiliation type.\nAdditional table information: table: university_basketball", "question": "SELECT COUNT(*), affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation"} +{"answer": "What are the different affiliations, and how many schools with each have an enrollment size of above 20000?\nAdditional table information: table: university_basketball", "question": "SELECT COUNT(*), affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation"} +{"answer": "Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.\nAdditional table information: table: university_basketball", "question": "SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation"} +{"answer": "What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?\nAdditional table information: table: university_basketball", "question": "SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation"} +{"answer": "What is the maximum enrollment across all schools?\nAdditional table information: table: university_basketball", "question": "SELECT MAX(Enrollment) FROM university"} +{"answer": "Return the maximum enrollment across all schools.\nAdditional table information: table: university_basketball", "question": "SELECT MAX(Enrollment) FROM university"} +{"answer": "List all information regarding the basketball match.\nAdditional table information: table: university_basketball", "question": "SELECT * FROM basketball_match"} +{"answer": "What is all the information about the basketball match?\nAdditional table information: table: university_basketball", "question": "SELECT * FROM basketball_match"} +{"answer": "List names of all teams in the basketball competition, ordered by all home scores in descending order.\nAdditional table information: table: university_basketball", "question": "SELECT team_name FROM basketball_match ORDER BY All_Home DESC"} +{"answer": "What are the names of all the teams in the basketball competition, sorted by all home scores in descending order?\nAdditional table information: table: university_basketball", "question": "SELECT team_name FROM basketball_match ORDER BY All_Home DESC"} +{"answer": "the names of models that launched between 2002 and 2004.\nAdditional table information: table: phone_1", "question": "SELECT Model_name FROM chip_model WHERE Launch_year BETWEEN 2002 AND 2004"} +{"answer": "Which model has the least amount of RAM? List the model name and the amount of RAM.\nAdditional table information: table: phone_1", "question": "SELECT Model_name, RAM_MiB FROM chip_model ORDER BY RAM_MiB ASC NULLS FIRST LIMIT 1"} +{"answer": "What are the chip model and screen mode of the phone with hardware model name 'LG-P760'?\nAdditional table information: table: phone_1", "question": "SELECT chip_model, screen_mode FROM phone WHERE Hardware_Model_name = 'LG-P760'"} +{"answer": "How many phone hardware models are produced by the company named 'Nokia Corporation'?\nAdditional table information: table: phone_1", "question": "SELECT COUNT(*) FROM phone WHERE Company_name = 'Nokia Corporation'"} +{"answer": "What is maximum and minimum RAM size of phone produced by company named 'Nokia Corporation'?\nAdditional table information: table: phone_1", "question": "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'"} +{"answer": "What is the average ROM size of phones produced by the company named 'Nokia Corporation'?\nAdditional table information: table: phone_1", "question": "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'"} +{"answer": "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.\nAdditional table information: table: phone_1", "question": "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"} +{"answer": "Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.\nAdditional table information: table: phone_1", "question": "SELECT Hardware_Model_name, Company_name FROM phone WHERE Accreditation_type LIKE 'Full'"} +{"answer": "Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is 'LG-P760'.\nAdditional table information: table: phone_1", "question": "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'"} +{"answer": "List the hardware model name and company name for the phone whose screen mode type is 'Graphics.'\nAdditional table information: table: phone_1", "question": "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'"} +{"answer": "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.\nAdditional table information: table: phone_1", "question": "SELECT Company_name, COUNT(*) FROM phone GROUP BY Company_name ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "List the name of the company that produced more than one phone model.\nAdditional table information: table: phone_1", "question": "SELECT Company_name FROM phone GROUP BY Company_name HAVING COUNT(*) > 1"} +{"answer": "List the maximum, minimum and average number of used kb in screen mode.\nAdditional table information: table: phone_1", "question": "SELECT MAX(used_kb), MIN(used_kb), AVG(used_kb) FROM screen_mode"} +{"answer": "List the name of the phone model launched in year 2002 and with the highest RAM size.\nAdditional table information: table: phone_1", "question": "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"} +{"answer": "What are the wifi and screen mode type of the hardware model named 'LG-P760'?\nAdditional table information: table: phone_1", "question": "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'"} +{"answer": "List the hardware model name for the phones that have screen mode type 'Text' or RAM size greater than 32.\nAdditional table information: table: phone_1", "question": "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"} +{"answer": "List the hardware model name for the phones that were produced by 'Nokia Corporation' or whose screen mode type is 'Graphics.'\nAdditional table information: table: phone_1", "question": "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'"} +{"answer": "List the hardware model name for the phons that were produced by 'Nokia Corporation' but whose screen mode type is not Text.\nAdditional table information: table: phone_1", "question": "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'"} +{"answer": "List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15.\nAdditional table information: table: phone_1", "question": "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"} +{"answer": "Find the number of phones for each accreditation type.\nAdditional table information: table: phone_1", "question": "SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type"} +{"answer": "How many phones belongs to each accreditation type?\nAdditional table information: table: phone_1", "question": "SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type"} +{"answer": "Find the accreditation level that more than 3 phones use.\nAdditional table information: table: phone_1", "question": "SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING COUNT(*) > 3"} +{"answer": "Find the details for all chip models.\nAdditional table information: table: phone_1", "question": "SELECT * FROM chip_model"} +{"answer": "How many models do not have the wifi function?\nAdditional table information: table: phone_1", "question": "SELECT COUNT(*) FROM chip_model WHERE wifi = 'No'"} +{"answer": "Count the number of chip model that do not have wifi.\nAdditional table information: table: phone_1", "question": "SELECT COUNT(*) FROM chip_model WHERE wifi = 'No'"} +{"answer": "List all the model names sorted by their launch year.\nAdditional table information: table: phone_1", "question": "SELECT model_name FROM chip_model ORDER BY launch_year NULLS FIRST"} +{"answer": "Find the average ram mib size of the chip models that are never used by any phone.\nAdditional table information: table: phone_1", "question": "SELECT AVG(RAM_MiB) FROM chip_model WHERE NOT model_name IN (SELECT chip_model FROM phone)"} +{"answer": "Find the names of the chip models that are not used by any phone with full accreditation type.\nAdditional table information: table: phone_1", "question": "SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type = 'Full'"} +{"answer": "Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.\nAdditional table information: table: phone_1", "question": "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'"} +{"answer": "How many countries are there in total?\nAdditional table information: table: match_season", "question": "SELECT COUNT(*) FROM country"} +{"answer": "Count the number of countries.\nAdditional table information: table: match_season", "question": "SELECT COUNT(*) FROM country"} +{"answer": "Show the country name and capital of all countries.\nAdditional table information: table: match_season", "question": "SELECT Country_name, Capital FROM country"} +{"answer": "What are the names and capitals of each country?\nAdditional table information: table: match_season", "question": "SELECT Country_name, Capital FROM country"} +{"answer": "Show all official native languages that contain the word 'English'.\nAdditional table information: table: match_season", "question": "SELECT Official_native_language FROM country WHERE Official_native_language LIKE '%English%'"} +{"answer": "What are the official native languages that contain the string 'English'.\nAdditional table information: table: match_season", "question": "SELECT Official_native_language FROM country WHERE Official_native_language LIKE '%English%'"} +{"answer": "Show all distinct positions of matches.\nAdditional table information: table: match_season", "question": "SELECT DISTINCT POSITION FROM match_season"} +{"answer": "What are the different positions for match season?\nAdditional table information: table: match_season", "question": "SELECT DISTINCT POSITION FROM match_season"} +{"answer": "Show the players from college UCLA.\nAdditional table information: table: match_season", "question": "SELECT Player FROM match_season WHERE College = 'UCLA'"} +{"answer": "Who are the players from UCLA?\nAdditional table information: table: match_season", "question": "SELECT Player FROM match_season WHERE College = 'UCLA'"} +{"answer": "Show the distinct position of players from college UCLA or Duke.\nAdditional table information: table: match_season", "question": "SELECT DISTINCT POSITION FROM match_season WHERE College = 'UCLA' OR College = 'Duke'"} +{"answer": "What are the different positions of players from UCLA or Duke colleges?\nAdditional table information: table: match_season", "question": "SELECT DISTINCT POSITION FROM match_season WHERE College = 'UCLA' OR College = 'Duke'"} +{"answer": "Show the draft pick numbers and draft classes of players whose positions are defenders.\nAdditional table information: table: match_season", "question": "SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = 'Defender'"} +{"answer": "What are the draft pick numbers and draft classes for players who play the Defender position?\nAdditional table information: table: match_season", "question": "SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = 'Defender'"} +{"answer": "How many distinct teams are involved in match seasons?\nAdditional table information: table: match_season", "question": "SELECT COUNT(DISTINCT Team) FROM match_season"} +{"answer": "Count the number of different teams involved in match season.\nAdditional table information: table: match_season", "question": "SELECT COUNT(DISTINCT Team) FROM match_season"} +{"answer": "Show the players and the years played.\nAdditional table information: table: match_season", "question": "SELECT Player, Years_Played FROM player"} +{"answer": "Who are the different players and how many years has each played?\nAdditional table information: table: match_season", "question": "SELECT Player, Years_Played FROM player"} +{"answer": "Show all team names.\nAdditional table information: table: match_season", "question": "SELECT Name FROM Team"} +{"answer": "What are the names of all teams?\nAdditional table information: table: match_season", "question": "SELECT Name FROM Team"} +{"answer": "Show the season, the player, and the name of the country that player belongs to.\nAdditional table information: table: match_season", "question": "SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country"} +{"answer": "For each player, what are their name, season, and country that they belong to?\nAdditional table information: table: match_season", "question": "SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country"} +{"answer": "Which players are from Indonesia?\nAdditional table information: table: match_season", "question": "SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = 'Indonesia'"} +{"answer": "Who are the players from Indonesia?\nAdditional table information: table: match_season", "question": "SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = 'Indonesia'"} +{"answer": "What are the distinct positions of the players from a country whose capital is Dublin?\nAdditional table information: table: match_season", "question": "SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = 'Dublin'"} +{"answer": "Give the different positions of players who play for the country with the capital Dublin.\nAdditional table information: table: match_season", "question": "SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = 'Dublin'"} +{"answer": "What are the official languages of the countries of players from Maryland or Duke college?\nAdditional table information: table: match_season", "question": "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'"} +{"answer": "Return the official native languages of countries who have players from Maryland or Duke colleges.\nAdditional table information: table: match_season", "question": "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'"} +{"answer": "How many distinct official languages are there among countries of players whose positions are defenders.\nAdditional table information: table: match_season", "question": "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'"} +{"answer": "Count the number of different official languages corresponding to countries that players who play Defender are from.\nAdditional table information: table: match_season", "question": "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'"} +{"answer": "Show the season, the player, and the name of the team that players belong to.\nAdditional table information: table: match_season", "question": "SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id"} +{"answer": "Who are the different players, what season do they play in, and what is the name of the team they are on?\nAdditional table information: table: match_season", "question": "SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id"} +{"answer": "Show the positions of the players from the team with name 'Ryley Goldner'.\nAdditional table information: table: match_season", "question": "SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Ryley Goldner'"} +{"answer": "Return the positions of players on the team Ryley Goldner.\nAdditional table information: table: match_season", "question": "SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Ryley Goldner'"} +{"answer": "How many distinct colleges are associated with players from the team with name 'Columbus Crew'.\nAdditional table information: table: match_season", "question": "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'"} +{"answer": "Count the number of different colleges that players who play for Columbus Crew are from.\nAdditional table information: table: match_season", "question": "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'"} +{"answer": "Show the players and years played for players from team 'Columbus Crew'.\nAdditional table information: table: match_season", "question": "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'"} +{"answer": "What are the players who played for Columbus Crew, and how many years did each play for?\nAdditional table information: table: match_season", "question": "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'"} +{"answer": "Show the position of players and the corresponding number of players.\nAdditional table information: table: match_season", "question": "SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION"} +{"answer": "How many players played each position?\nAdditional table information: table: match_season", "question": "SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION"} +{"answer": "Show the country names and the corresponding number of players.\nAdditional table information: table: match_season", "question": "SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name"} +{"answer": "How many players are from each country?\nAdditional table information: table: match_season", "question": "SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name"} +{"answer": "Return all players sorted by college in ascending alphabetical order.\nAdditional table information: table: match_season", "question": "SELECT player FROM match_season ORDER BY College ASC NULLS FIRST"} +{"answer": "What are all the players who played in match season, sorted by college in ascending alphabetical order?\nAdditional table information: table: match_season", "question": "SELECT player FROM match_season ORDER BY College ASC NULLS FIRST"} +{"answer": "Show the most common position of players in match seasons.\nAdditional table information: table: match_season", "question": "SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the position that is most common among players in match seasons?\nAdditional table information: table: match_season", "question": "SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the top 3 most common colleges of players in match seasons.\nAdditional table information: table: match_season", "question": "SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3"} +{"answer": "What are the three colleges from which the most players are from?\nAdditional table information: table: match_season", "question": "SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3"} +{"answer": "Show the name of colleges that have at least two players.\nAdditional table information: table: match_season", "question": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2"} +{"answer": "What are the names of all colleges that have two or more players?\nAdditional table information: table: match_season", "question": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2"} +{"answer": "Show the name of colleges that have at least two players in descending alphabetical order.\nAdditional table information: table: match_season", "question": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 ORDER BY College DESC"} +{"answer": "What are the names of colleges that have two or more players, listed in descending alphabetical order?\nAdditional table information: table: match_season", "question": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 ORDER BY College DESC"} +{"answer": "What are the names of teams that do no have match season record?\nAdditional table information: table: match_season", "question": "SELECT Name FROM team WHERE NOT Team_id IN (SELECT Team FROM match_season)"} +{"answer": "Return the names of teams that have no match season record.\nAdditional table information: table: match_season", "question": "SELECT Name FROM team WHERE NOT Team_id IN (SELECT Team FROM match_season)"} +{"answer": "What are the names of countries that have both players with position forward and players with position defender?\nAdditional table information: table: match_season", "question": "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'"} +{"answer": "Return the names of countries that have players that play the Forward position, as well as players who play the Defender position.\nAdditional table information: table: match_season", "question": "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'"} +{"answer": "Which college have both players with position midfielder and players with position defender?\nAdditional table information: table: match_season", "question": "SELECT College FROM match_season WHERE POSITION = 'Midfielder' INTERSECT SELECT College FROM match_season WHERE POSITION = 'Defender'"} +{"answer": "Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position.\nAdditional table information: table: match_season", "question": "SELECT College FROM match_season WHERE POSITION = 'Midfielder' INTERSECT SELECT College FROM match_season WHERE POSITION = 'Defender'"} +{"answer": "How many climbers are there?\nAdditional table information: table: climbing", "question": "SELECT COUNT(*) FROM climber"} +{"answer": "Count the number of climbers.\nAdditional table information: table: climbing", "question": "SELECT COUNT(*) FROM climber"} +{"answer": "List the names of climbers in descending order of points.\nAdditional table information: table: climbing", "question": "SELECT Name FROM climber ORDER BY Points DESC"} +{"answer": "What are the names of the climbers, ordered by points descending?\nAdditional table information: table: climbing", "question": "SELECT Name FROM climber ORDER BY Points DESC"} +{"answer": "List the names of climbers whose country is not Switzerland.\nAdditional table information: table: climbing", "question": "SELECT Name FROM climber WHERE Country <> 'Switzerland'"} +{"answer": "What are the names of climbers who are not from the country of Switzerland?\nAdditional table information: table: climbing", "question": "SELECT Name FROM climber WHERE Country <> 'Switzerland'"} +{"answer": "What is the maximum point for climbers whose country is United Kingdom?\nAdditional table information: table: climbing", "question": "SELECT MAX(Points) FROM climber WHERE Country = 'United Kingdom'"} +{"answer": "Return the maximum number of points for climbers from the United Kingdom.\nAdditional table information: table: climbing", "question": "SELECT MAX(Points) FROM climber WHERE Country = 'United Kingdom'"} +{"answer": "How many distinct countries are the climbers from?\nAdditional table information: table: climbing", "question": "SELECT COUNT(DISTINCT Country) FROM climber"} +{"answer": "Count the number of different countries that climbers are from.\nAdditional table information: table: climbing", "question": "SELECT COUNT(DISTINCT Country) FROM climber"} +{"answer": "What are the names of mountains in ascending alphabetical order?\nAdditional table information: table: climbing", "question": "SELECT Name FROM mountain ORDER BY Name ASC NULLS FIRST"} +{"answer": "Give the names of mountains in alphabetical order.\nAdditional table information: table: climbing", "question": "SELECT Name FROM mountain ORDER BY Name ASC NULLS FIRST"} +{"answer": "What are the countries of mountains with height bigger than 5000?\nAdditional table information: table: climbing", "question": "SELECT Country FROM mountain WHERE Height > 5000"} +{"answer": "Return the countries of the mountains that have a height larger than 5000.\nAdditional table information: table: climbing", "question": "SELECT Country FROM mountain WHERE Height > 5000"} +{"answer": "What is the name of the highest mountain?\nAdditional table information: table: climbing", "question": "SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1"} +{"answer": "Return the name of the mountain with the greatest height.\nAdditional table information: table: climbing", "question": "SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1"} +{"answer": "List the distinct ranges of the mountains with the top 3 prominence.\nAdditional table information: table: climbing", "question": "SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3"} +{"answer": "What are the different ranges of the 3 mountains with the highest prominence?\nAdditional table information: table: climbing", "question": "SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3"} +{"answer": "Show names of climbers and the names of mountains they climb.\nAdditional table information: table: climbing", "question": "SELECT T1.Name, T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID"} +{"answer": "What are the names of climbers and the corresponding names of mountains that they climb?\nAdditional table information: table: climbing", "question": "SELECT T1.Name, T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID"} +{"answer": "Show the names of climbers and the heights of mountains they climb.\nAdditional table information: table: climbing", "question": "SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID"} +{"answer": "What are the names of climbers and the corresponding heights of the mountains that they climb?\nAdditional table information: table: climbing", "question": "SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID"} +{"answer": "Show the height of the mountain climbed by the climber with the maximum points.\nAdditional table information: table: climbing", "question": "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"} +{"answer": "What is the height of the mountain climbined by the climbing who had the most points?\nAdditional table information: table: climbing", "question": "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"} +{"answer": "Show the distinct names of mountains climbed by climbers from country 'West Germany'.\nAdditional table information: table: climbing", "question": "SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = 'West Germany'"} +{"answer": "What are the different names of mountains ascended by climbers from the country of West Germany?\nAdditional table information: table: climbing", "question": "SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = 'West Germany'"} +{"answer": "Show the times used by climbers to climb mountains in Country Uganda.\nAdditional table information: table: climbing", "question": "SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = 'Uganda'"} +{"answer": "What are the times used by climbers who climbed mountains in the country of Uganda?\nAdditional table information: table: climbing", "question": "SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = 'Uganda'"} +{"answer": "Please show the countries and the number of climbers from each country.\nAdditional table information: table: climbing", "question": "SELECT Country, COUNT(*) FROM climber GROUP BY Country"} +{"answer": "How many climbers are from each country?\nAdditional table information: table: climbing", "question": "SELECT Country, COUNT(*) FROM climber GROUP BY Country"} +{"answer": "List the countries that have more than one mountain.\nAdditional table information: table: climbing", "question": "SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1"} +{"answer": "Which countries have more than one mountain?\nAdditional table information: table: climbing", "question": "SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1"} +{"answer": "List the names of mountains that do not have any climber.\nAdditional table information: table: climbing", "question": "SELECT Name FROM mountain WHERE NOT Mountain_ID IN (SELECT Mountain_ID FROM climber)"} +{"answer": "What are the names of countains that no climber has climbed?\nAdditional table information: table: climbing", "question": "SELECT Name FROM mountain WHERE NOT Mountain_ID IN (SELECT Mountain_ID FROM climber)"} +{"answer": "Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200.\nAdditional table information: table: climbing", "question": "SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200"} +{"answer": "What are the countries that have both mountains that are higher than 5600 and lower than 5200?\nAdditional table information: table: climbing", "question": "SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200"} +{"answer": "Show the range that has the most number of mountains.\nAdditional table information: table: climbing", "question": "SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which range contains the most mountains?\nAdditional table information: table: climbing", "question": "SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the names of mountains with height more than 5000 or prominence more than 1000.\nAdditional table information: table: climbing", "question": "SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000"} +{"answer": "What are the names of mountains that have a height of over 5000 or a prominence of over 1000?\nAdditional table information: table: climbing", "question": "SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000"} +{"answer": "How many body builders are there?\nAdditional table information: table: body_builder", "question": "SELECT COUNT(*) FROM body_builder"} +{"answer": "List the total scores of body builders in ascending order.\nAdditional table information: table: body_builder", "question": "SELECT Total FROM body_builder ORDER BY Total ASC NULLS FIRST"} +{"answer": "List the snatch score and clean jerk score of body builders in ascending order of snatch score.\nAdditional table information: table: body_builder", "question": "SELECT Snatch, Clean_Jerk FROM body_builder ORDER BY Snatch ASC NULLS FIRST"} +{"answer": "What is the average snatch score of body builders?\nAdditional table information: table: body_builder", "question": "SELECT AVG(Snatch) FROM body_builder"} +{"answer": "What are the clean and jerk score of the body builder with the highest total score?\nAdditional table information: table: body_builder", "question": "SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1"} +{"answer": "What are the birthdays of people in ascending order of height?\nAdditional table information: table: body_builder", "question": "SELECT Birth_Date FROM People ORDER BY Height ASC NULLS FIRST"} +{"answer": "What are the names of body builders?\nAdditional table information: table: body_builder", "question": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID"} +{"answer": "What are the names of body builders whose total score is higher than 300?\nAdditional table information: table: body_builder", "question": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300"} +{"answer": "What is the name of the body builder with the greatest body weight?\nAdditional table information: table: body_builder", "question": "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"} +{"answer": "What are the birth date and birth place of the body builder with the highest total points?\nAdditional table information: table: body_builder", "question": "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"} +{"answer": "What are the heights of body builders with total score smaller than 315?\nAdditional table information: table: body_builder", "question": "SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315"} +{"answer": "What is the average total score of body builders with height bigger than 200?\nAdditional table information: table: body_builder", "question": "SELECT AVG(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200"} +{"answer": "What are the names of body builders in descending order of total scores?\nAdditional table information: table: body_builder", "question": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC"} +{"answer": "List each birth place along with the number of people from there.\nAdditional table information: table: body_builder", "question": "SELECT Birth_Place, COUNT(*) FROM people GROUP BY Birth_Place"} +{"answer": "What is the most common birth place of people?\nAdditional table information: table: body_builder", "question": "SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the birth places that are shared by at least two people?\nAdditional table information: table: body_builder", "question": "SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) >= 2"} +{"answer": "List the height and weight of people in descending order of height.\nAdditional table information: table: body_builder", "question": "SELECT Height, Weight FROM people ORDER BY Height DESC"} +{"answer": "Show all information about each body builder.\nAdditional table information: table: body_builder", "question": "SELECT * FROM body_builder"} +{"answer": "List the names and origins of people who are not body builders.\nAdditional table information: table: body_builder", "question": "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"} +{"answer": "How many distinct birth places are there?\nAdditional table information: table: body_builder", "question": "SELECT COUNT(DISTINCT Birth_Place) FROM people"} +{"answer": "How many persons are not body builders?\nAdditional table information: table: body_builder", "question": "SELECT COUNT(*) FROM people WHERE NOT people_id IN (SELECT People_ID FROM body_builder)"} +{"answer": "List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200.\nAdditional table information: table: body_builder", "question": "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"} +{"answer": "What are the total scores of the body builders whose birthday contains the string 'January' ?\nAdditional table information: table: body_builder", "question": "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%'"} +{"answer": "What is the minimum snatch score?\nAdditional table information: table: body_builder", "question": "SELECT MIN(snatch) FROM body_builder"} +{"answer": "How many elections are there?\nAdditional table information: table: election_representative", "question": "SELECT COUNT(*) FROM election"} +{"answer": "List the votes of elections in descending order.\nAdditional table information: table: election_representative", "question": "SELECT Votes FROM election ORDER BY Votes DESC"} +{"answer": "List the dates and vote percents of elections.\nAdditional table information: table: election_representative", "question": "SELECT Date, Vote_Percent FROM election"} +{"answer": "What are the minimum and maximum vote percents of elections?\nAdditional table information: table: election_representative", "question": "SELECT MIN(Vote_Percent), MAX(Vote_Percent) FROM election"} +{"answer": "What are the names and parties of representatives?\nAdditional table information: table: election_representative", "question": "SELECT Name, Party FROM representative"} +{"answer": "What are the names of representatives whose party is not 'Republican'?\nAdditional table information: table: election_representative", "question": "SELECT Name FROM Representative WHERE Party <> 'Republican'"} +{"answer": "What are the life spans of representatives from New York state or Indiana state?\nAdditional table information: table: election_representative", "question": "SELECT Lifespan FROM representative WHERE State = 'New York' OR State = 'Indiana'"} +{"answer": "What are the names of representatives and the dates of elections they participated in.\nAdditional table information: table: election_representative", "question": "SELECT T2.Name, T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID"} +{"answer": "What are the names of representatives with more than 10000 votes in election?\nAdditional table information: table: election_representative", "question": "SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE Votes > 10000"} +{"answer": "What are the names of representatives in descending order of votes?\nAdditional table information: table: election_representative", "question": "SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC"} +{"answer": "What is the party of the representative that has the smallest number of votes.\nAdditional table information: table: election_representative", "question": "SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes ASC NULLS FIRST LIMIT 1"} +{"answer": "What are the lifespans of representatives in descending order of vote percent?\nAdditional table information: table: election_representative", "question": "SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY Vote_Percent DESC"} +{"answer": "What is the average number of votes of representatives from party 'Republican'?\nAdditional table information: table: election_representative", "question": "SELECT AVG(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = 'Republican'"} +{"answer": "What are the different parties of representative? Show the party name and the number of representatives in each party.\nAdditional table information: table: election_representative", "question": "SELECT Party, COUNT(*) FROM representative GROUP BY Party"} +{"answer": "What is the party that has the largest number of representatives?\nAdditional table information: table: election_representative", "question": "SELECT Party, COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What parties have at least three representatives?\nAdditional table information: table: election_representative", "question": "SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3"} +{"answer": "What states have at least two representatives?\nAdditional table information: table: election_representative", "question": "SELECT State FROM representative GROUP BY State HAVING COUNT(*) >= 2"} +{"answer": "List the names of representatives that have not participated in elections listed here.\nAdditional table information: table: election_representative", "question": "SELECT Name FROM representative WHERE NOT Representative_ID IN (SELECT Representative_ID FROM election)"} +{"answer": "Show the parties that have both representatives in New York state and representatives in Pennsylvania state.\nAdditional table information: table: election_representative", "question": "SELECT Party FROM representative WHERE State = 'New York' INTERSECT SELECT Party FROM representative WHERE State = 'Pennsylvania'"} +{"answer": "How many distinct parties are there for representatives?\nAdditional table information: table: election_representative", "question": "SELECT COUNT(DISTINCT Party) FROM representative"} +{"answer": "How many apartment bookings are there in total?\nAdditional table information: table: apartment_rentals", "question": "SELECT COUNT(*) FROM Apartment_Bookings"} +{"answer": "Count the total number of apartment bookings.\nAdditional table information: table: apartment_rentals", "question": "SELECT COUNT(*) FROM Apartment_Bookings"} +{"answer": "Show the start dates and end dates of all the apartment bookings.\nAdditional table information: table: apartment_rentals", "question": "SELECT booking_start_date, booking_end_date FROM Apartment_Bookings"} +{"answer": "What are the start date and end date of each apartment booking?\nAdditional table information: table: apartment_rentals", "question": "SELECT booking_start_date, booking_end_date FROM Apartment_Bookings"} +{"answer": "Show all distinct building descriptions.\nAdditional table information: table: apartment_rentals", "question": "SELECT DISTINCT building_description FROM Apartment_Buildings"} +{"answer": "Give me a list of all the distinct building descriptions.\nAdditional table information: table: apartment_rentals", "question": "SELECT DISTINCT building_description FROM Apartment_Buildings"} +{"answer": "Show the short names of the buildings managed by 'Emma'.\nAdditional table information: table: apartment_rentals", "question": "SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = 'Emma'"} +{"answer": "Which buildings does 'Emma' manage? Give me the short names of the buildings.\nAdditional table information: table: apartment_rentals", "question": "SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = 'Emma'"} +{"answer": "Show the addresses and phones of all the buildings managed by 'Brenden'.\nAdditional table information: table: apartment_rentals", "question": "SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = 'Brenden'"} +{"answer": "What are the address and phone number of the buildings managed by 'Brenden'?\nAdditional table information: table: apartment_rentals", "question": "SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = 'Brenden'"} +{"answer": "What are the building full names that contain the word 'court'?\nAdditional table information: table: apartment_rentals", "question": "SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE '%court%'"} +{"answer": "Find all the building full names containing the word 'court'.\nAdditional table information: table: apartment_rentals", "question": "SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE '%court%'"} +{"answer": "What is the minimum and maximum number of bathrooms of all the apartments?\nAdditional table information: table: apartment_rentals", "question": "SELECT MIN(bathroom_count), MAX(bathroom_count) FROM Apartments"} +{"answer": "Give me the minimum and maximum bathroom count among all the apartments.\nAdditional table information: table: apartment_rentals", "question": "SELECT MIN(bathroom_count), MAX(bathroom_count) FROM Apartments"} +{"answer": "What is the average number of bedrooms of all apartments?\nAdditional table information: table: apartment_rentals", "question": "SELECT AVG(bedroom_count) FROM Apartments"} +{"answer": "Find the average number of bedrooms of all the apartments.\nAdditional table information: table: apartment_rentals", "question": "SELECT AVG(bedroom_count) FROM Apartments"} +{"answer": "Return the apartment number and the number of rooms for each apartment.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_number, room_count FROM Apartments"} +{"answer": "What are the apartment number and the room count of each apartment?\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_number, room_count FROM Apartments"} +{"answer": "What is the average number of rooms of apartments with type code 'Studio'?\nAdditional table information: table: apartment_rentals", "question": "SELECT AVG(room_count) FROM Apartments WHERE apt_type_code = 'Studio'"} +{"answer": "Find the average room count of the apartments that have the 'Studio' type code.\nAdditional table information: table: apartment_rentals", "question": "SELECT AVG(room_count) FROM Apartments WHERE apt_type_code = 'Studio'"} +{"answer": "Return the apartment numbers of the apartments with type code 'Flat'.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_number FROM Apartments WHERE apt_type_code = 'Flat'"} +{"answer": "Which apartments have type code 'Flat'? Give me their apartment numbers.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_number FROM Apartments WHERE apt_type_code = 'Flat'"} +{"answer": "Return the first names and last names of all guests\nAdditional table information: table: apartment_rentals", "question": "SELECT guest_first_name, guest_last_name FROM Guests"} +{"answer": "What are the first names and last names of all the guests?\nAdditional table information: table: apartment_rentals", "question": "SELECT guest_first_name, guest_last_name FROM Guests"} +{"answer": "Return the date of birth for all the guests with gender code 'Male'.\nAdditional table information: table: apartment_rentals", "question": "SELECT date_of_birth FROM Guests WHERE gender_code = 'Male'"} +{"answer": "What are dates of birth of all the guests whose gender is 'Male'?\nAdditional table information: table: apartment_rentals", "question": "SELECT date_of_birth FROM Guests WHERE gender_code = 'Male'"} +{"answer": "Show the apartment numbers, start dates, and end dates of all the apartment bookings.\nAdditional table information: table: apartment_rentals", "question": "SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id"} +{"answer": "What are the apartment number, start date, and end date of each apartment booking?\nAdditional table information: table: apartment_rentals", "question": "SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id"} +{"answer": "What are the booking start and end dates of the apartments with type code 'Duplex'?\nAdditional table information: table: apartment_rentals", "question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = 'Duplex'"} +{"answer": "Return the booking start date and end date for the apartments that have type code 'Duplex'.\nAdditional table information: table: apartment_rentals", "question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = 'Duplex'"} +{"answer": "What are the booking start and end dates of the apartments with more than 2 bedrooms?\nAdditional table information: table: apartment_rentals", "question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2"} +{"answer": "Find the booking start date and end date for the apartments that have more than two bedrooms.\nAdditional table information: table: apartment_rentals", "question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2"} +{"answer": "What is the booking status code of the apartment with apartment number 'Suite 634'?\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "Tell me the booking status code for the apartment with number 'Suite 634'.\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "Show the distinct apartment numbers of the apartments that have bookings with status code 'Confirmed'.\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "Which apartments have bookings with status code 'Confirmed'? Return their apartment numbers.\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "Show the average room count of the apartments that have booking status code 'Provisional'.\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "What is the average room count of the apartments whose booking status code is 'Provisional'?\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "Show the guest first names, start dates, and end dates of all the apartment bookings.\nAdditional table information: table: apartment_rentals", "question": "SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id"} +{"answer": "What are the guest first name, start date, and end date of each apartment booking?\nAdditional table information: table: apartment_rentals", "question": "SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id"} +{"answer": "Show the start dates and end dates of all the apartment bookings made by guests with gender code 'Female'.\nAdditional table information: table: apartment_rentals", "question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = 'Female'"} +{"answer": "What are the start date and end date of the apartment bookings made by female guests (gender code 'Female')?\nAdditional table information: table: apartment_rentals", "question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = 'Female'"} +{"answer": "Show the first names and last names of all the guests that have apartment bookings with status code 'Confirmed'.\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "Which guests have apartment bookings with status code 'Confirmed'? Return their first names and last names.\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "Show the facility codes of apartments with more than 4 bedrooms.\nAdditional table information: table: apartment_rentals", "question": "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"} +{"answer": "What are the facility codes of the apartments with more than four bedrooms?\nAdditional table information: table: apartment_rentals", "question": "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"} +{"answer": "Show the total number of rooms of all apartments with facility code 'Gym'.\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "Find the total number of rooms in the apartments that have facility code 'Gym'.\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "Show the total number of rooms of the apartments in the building with short name 'Columbus Square'.\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "How many rooms in total are there in the apartments in the building with short name 'Columbus Square'?\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "Show the addresses of the buildings that have apartments with more than 2 bathrooms.\nAdditional table information: table: apartment_rentals", "question": "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"} +{"answer": "Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings.\nAdditional table information: table: apartment_rentals", "question": "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"} +{"answer": "Show the apartment type codes and apartment numbers in the buildings managed by 'Kyle'.\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "What apartment type codes and apartment numbers do the buildings managed by 'Kyle' have?\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "Show the booking status code and the corresponding number of bookings.\nAdditional table information: table: apartment_rentals", "question": "SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code"} +{"answer": "How many bookings does each booking status have? List the booking status code and the number of corresponding bookings.\nAdditional table information: table: apartment_rentals", "question": "SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code"} +{"answer": "Return all the apartment numbers sorted by the room count in ascending order.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_number FROM Apartments ORDER BY room_count ASC NULLS FIRST"} +{"answer": "Sort the apartment numbers in ascending order of room count.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_number FROM Apartments ORDER BY room_count ASC NULLS FIRST"} +{"answer": "Return the apartment number with the largest number of bedrooms.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1"} +{"answer": "What is the apartment number of the apartment with the most beds?\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1"} +{"answer": "Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_type_code, COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC NULLS FIRST"} +{"answer": "Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_type_code, COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC NULLS FIRST"} +{"answer": "Show the top 3 apartment type codes sorted by the average number of rooms in descending order.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY AVG(room_count) DESC LIMIT 3"} +{"answer": "What are the top three apartment types in terms of the average room count? Give me the\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY AVG(room_count) DESC LIMIT 3"} +{"answer": "Show the apartment type code that has the largest number of total rooms, together with the number of bathrooms and number of bedrooms.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_type_code, bathroom_count, bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY SUM(room_count) DESC LIMIT 1"} +{"answer": "Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_type_code, bathroom_count, bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY SUM(room_count) DESC LIMIT 1"} +{"answer": "Show the most common apartment type code.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which apartment type code appears the most often?\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the most common apartment type code among apartments with more than 1 bathroom.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which apartment type code is the most common among apartments with more than one bathroom?\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show each apartment type code, and the maximum and minimum number of rooms for each type.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_type_code, MAX(room_count), MIN(room_count) FROM Apartments GROUP BY apt_type_code"} +{"answer": "Return each apartment type code along with the maximum and minimum number of rooms among each type.\nAdditional table information: table: apartment_rentals", "question": "SELECT apt_type_code, MAX(room_count), MIN(room_count) FROM Apartments GROUP BY apt_type_code"} +{"answer": "Show each gender code and the corresponding count of guests sorted by the count in descending order.\nAdditional table information: table: apartment_rentals", "question": "SELECT gender_code, COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC"} +{"answer": "Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts.\nAdditional table information: table: apartment_rentals", "question": "SELECT gender_code, COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC"} +{"answer": "How many apartments do not have any facility?\nAdditional table information: table: apartment_rentals", "question": "SELECT COUNT(*) FROM Apartments WHERE NOT apt_id IN (SELECT apt_id FROM Apartment_Facilities)"} +{"answer": "Find the number of apartments that have no facility.\nAdditional table information: table: apartment_rentals", "question": "SELECT COUNT(*) FROM Apartments WHERE NOT apt_id IN (SELECT apt_id FROM Apartment_Facilities)"} +{"answer": "Show the apartment numbers of apartments with bookings that have status code both 'Provisional' and 'Confirmed'\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "Which apartments have bookings with both status codes 'Provisional' and 'Confirmed'? Give me the apartment numbers.\nAdditional table information: table: apartment_rentals", "question": "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'"} +{"answer": "Show the apartment numbers of apartments with unit status availability of both 0 and 1.\nAdditional table information: table: apartment_rentals", "question": "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"} +{"answer": "Which apartments have unit status availability of both 0 and 1? Return their apartment numbers.\nAdditional table information: table: apartment_rentals", "question": "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"} +{"answer": "How many games are held after season 2007?\nAdditional table information: table: game_injury", "question": "SELECT COUNT(*) FROM game WHERE season > 2007"} +{"answer": "List the dates of games by the home team name in descending order.\nAdditional table information: table: game_injury", "question": "SELECT Date FROM game ORDER BY home_team DESC"} +{"answer": "List the season, home team, away team of all the games.\nAdditional table information: table: game_injury", "question": "SELECT season, home_team, away_team FROM game"} +{"answer": "What are the maximum, minimum and average home games each stadium held?\nAdditional table information: table: game_injury", "question": "SELECT MAX(home_games), MIN(home_games), AVG(home_games) FROM stadium"} +{"answer": "What is the average attendance of stadiums with capacity percentage higher than 100%?\nAdditional table information: table: game_injury", "question": "SELECT average_attendance FROM stadium WHERE capacity_percentage > 100"} +{"answer": "What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'?\nAdditional table information: table: game_injury", "question": "SELECT player, number_of_matches, SOURCE FROM injury_accident WHERE injury <> 'Knee problem'"} +{"answer": "What is the season of the game which causes the player 'Walter Samuel' to get injured?\nAdditional table information: table: game_injury", "question": "SELECT T1.season FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id WHERE T2.player = 'Walter Samuel'"} +{"answer": "What are the ids, scores, and dates of the games which caused at least two injury accidents?\nAdditional table information: table: game_injury", "question": "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"} +{"answer": "What are the id and name of the stadium where the most injury accidents happened?\nAdditional table information: table: game_injury", "question": "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"} +{"answer": "Find the id and name of the stadium where the largest number of injury accidents occurred.\nAdditional table information: table: game_injury", "question": "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"} +{"answer": "In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'?\nAdditional table information: table: game_injury", "question": "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'"} +{"answer": "How many different kinds of information sources are there for injury accidents?\nAdditional table information: table: game_injury", "question": "SELECT COUNT(DISTINCT SOURCE) FROM injury_accident"} +{"answer": "How many games are free of injury accidents?\nAdditional table information: table: game_injury", "question": "SELECT COUNT(*) FROM game WHERE NOT id IN (SELECT game_id FROM injury_accident)"} +{"answer": "How many distinct kinds of injuries happened after season 2010?\nAdditional table information: table: game_injury", "question": "SELECT COUNT(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.season > 2010"} +{"answer": "List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured.\nAdditional table information: table: game_injury", "question": "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'"} +{"answer": "Show the name, average attendance, total attendance for stadiums where no accidents happened.\nAdditional table information: table: game_injury", "question": "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"} +{"answer": "Which stadium name contains the substring 'Bank'?\nAdditional table information: table: game_injury", "question": "SELECT name FROM stadium WHERE name LIKE '%Bank%'"} +{"answer": "How many games has each stadium held?\nAdditional table information: table: game_injury", "question": "SELECT T1.id, COUNT(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.id"} +{"answer": "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.\nAdditional table information: table: game_injury", "question": "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"} +{"answer": "List all country and league names.\nAdditional table information: table: soccer_1", "question": "SELECT T1.name, T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id"} +{"answer": "How many leagues are there in England?\nAdditional table information: table: soccer_1", "question": "SELECT COUNT(*) FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id WHERE T1.name = 'England'"} +{"answer": "What is the average weight of all players?\nAdditional table information: table: soccer_1", "question": "SELECT AVG(weight) FROM Player"} +{"answer": "What is the maximum and minimum height of all players?\nAdditional table information: table: soccer_1", "question": "SELECT MAX(weight), MIN(weight) FROM Player"} +{"answer": "List all player names who have an overall rating higher than the average.\nAdditional table information: table: soccer_1", "question": "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)"} +{"answer": "What are the names of players who have the best dribbling?\nAdditional table information: table: soccer_1", "question": "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)"} +{"answer": "List the names of all players who have a crossing score higher than 90 and prefer their right foot.\nAdditional table information: table: soccer_1", "question": "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'"} +{"answer": "List the names of all left-footed players who have overall rating between 85 and 90.\nAdditional table information: table: soccer_1", "question": "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"} +{"answer": "What is the average rating for right-footed players and left-footed players?\nAdditional table information: table: soccer_1", "question": "SELECT preferred_foot, AVG(overall_rating) FROM Player_Attributes GROUP BY preferred_foot"} +{"answer": "Of all players with an overall rating greater than 80, how many are right-footed and left-footed?\nAdditional table information: table: soccer_1", "question": "SELECT preferred_foot, COUNT(*) FROM Player_Attributes WHERE overall_rating > 80 GROUP BY preferred_foot"} +{"answer": "List all of the player ids with a height of at least 180cm and an overall rating higher than 85.\nAdditional table information: table: soccer_1", "question": "SELECT player_api_id FROM Player WHERE height >= 180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating > 85"} +{"answer": "List all of the ids for left-footed players with a height between 180cm and 190cm.\nAdditional table information: table: soccer_1", "question": "SELECT player_api_id FROM Player WHERE height >= 180 AND height <= 190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = 'left'"} +{"answer": "Who are the top 3 players in terms of overall rating?\nAdditional table information: table: soccer_1", "question": "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"} +{"answer": "List the names and birthdays of the top five players in terms of potential.\nAdditional table information: table: soccer_1", "question": "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"} +{"answer": "How many performances are there?\nAdditional table information: table: performance_attendance", "question": "SELECT COUNT(*) FROM performance"} +{"answer": "List the hosts of performances in ascending order of attendance.\nAdditional table information: table: performance_attendance", "question": "SELECT HOST FROM performance ORDER BY Attendance ASC NULLS FIRST"} +{"answer": "What are the dates and locations of performances?\nAdditional table information: table: performance_attendance", "question": "SELECT Date, LOCATION FROM performance"} +{"answer": "Show the attendances of the performances at location 'TD Garden' or 'Bell Centre'\nAdditional table information: table: performance_attendance", "question": "SELECT Attendance FROM performance WHERE LOCATION = 'TD Garden' OR LOCATION = 'Bell Centre'"} +{"answer": "What is the average number of attendees for performances?\nAdditional table information: table: performance_attendance", "question": "SELECT AVG(Attendance) FROM performance"} +{"answer": "What is the date of the performance with the highest number of attendees?\nAdditional table information: table: performance_attendance", "question": "SELECT Date FROM performance ORDER BY Attendance DESC LIMIT 1"} +{"answer": "Show different locations and the number of performances at each location.\nAdditional table information: table: performance_attendance", "question": "SELECT LOCATION, COUNT(*) FROM performance GROUP BY LOCATION"} +{"answer": "Show the most common location of performances.\nAdditional table information: table: performance_attendance", "question": "SELECT LOCATION FROM performance GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the locations that have at least two performances.\nAdditional table information: table: performance_attendance", "question": "SELECT LOCATION FROM performance GROUP BY LOCATION HAVING COUNT(*) >= 2"} +{"answer": "Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees.\nAdditional table information: table: performance_attendance", "question": "SELECT LOCATION FROM performance WHERE Attendance > 2000 INTERSECT SELECT LOCATION FROM performance WHERE Attendance < 1000"} +{"answer": "Show the names of members and the location of the performances they attended.\nAdditional table information: table: performance_attendance", "question": "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"} +{"answer": "Show the names of members and the location of performances they attended in ascending alphabetical order of their names.\nAdditional table information: table: performance_attendance", "question": "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 NULLS FIRST"} +{"answer": "Show the dates of performances with attending members whose roles are 'Violin'.\nAdditional table information: table: performance_attendance", "question": "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'"} +{"answer": "Show the names of members and the dates of performances they attended in descending order of attendance of the performances.\nAdditional table information: table: performance_attendance", "question": "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"} +{"answer": "List the names of members who did not attend any performance.\nAdditional table information: table: performance_attendance", "question": "SELECT Name FROM member WHERE NOT Member_ID IN (SELECT Member_ID FROM member_attendance)"} +{"answer": "Find the buildings which have rooms with capacity more than 50.\nAdditional table information: table: college_2", "question": "SELECT DISTINCT building FROM classroom WHERE capacity > 50"} +{"answer": "What are the distinct buildings with capacities of greater than 50?\nAdditional table information: table: college_2", "question": "SELECT DISTINCT building FROM classroom WHERE capacity > 50"} +{"answer": "Count the number of rooms that are not in the Lamberton building.\nAdditional table information: table: college_2", "question": "SELECT COUNT(*) FROM classroom WHERE building <> 'Lamberton'"} +{"answer": "How many classrooms are not in Lamberton?\nAdditional table information: table: college_2", "question": "SELECT COUNT(*) FROM classroom WHERE building <> 'Lamberton'"} +{"answer": "What is the name and building of the departments whose budget is more than the average budget?\nAdditional table information: table: college_2", "question": "SELECT dept_name, building FROM department WHERE budget > (SELECT AVG(budget) FROM department)"} +{"answer": "Give the name and building of the departments with greater than average budget.\nAdditional table information: table: college_2", "question": "SELECT dept_name, building FROM department WHERE budget > (SELECT AVG(budget) FROM department)"} +{"answer": "Find the room number of the rooms which can sit 50 to 100 students and their buildings.\nAdditional table information: table: college_2", "question": "SELECT building, room_number FROM classroom WHERE capacity BETWEEN 50 AND 100"} +{"answer": "What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students?\nAdditional table information: table: college_2", "question": "SELECT building, room_number FROM classroom WHERE capacity BETWEEN 50 AND 100"} +{"answer": "Find the name and building of the department with the highest budget.\nAdditional table information: table: college_2", "question": "SELECT dept_name, building FROM department ORDER BY budget DESC LIMIT 1"} +{"answer": "What is the department name and corresponding building for the department with the greatest budget?\nAdditional table information: table: college_2", "question": "SELECT dept_name, building FROM department ORDER BY budget DESC LIMIT 1"} +{"answer": "What is the name of the student who has the highest total credits in the History department.\nAdditional table information: table: college_2", "question": "SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1"} +{"answer": "Give the name of the student in the History department with the most credits.\nAdditional table information: table: college_2", "question": "SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1"} +{"answer": "How many rooms does the Lamberton building have?\nAdditional table information: table: college_2", "question": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton'"} +{"answer": "Count the number of classrooms in Lamberton.\nAdditional table information: table: college_2", "question": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton'"} +{"answer": "How many students have advisors?\nAdditional table information: table: college_2", "question": "SELECT COUNT(DISTINCT s_id) FROM advisor"} +{"answer": "Count the number of students who have advisors.\nAdditional table information: table: college_2", "question": "SELECT COUNT(DISTINCT s_id) FROM advisor"} +{"answer": "How many departments offer courses?\nAdditional table information: table: college_2", "question": "SELECT COUNT(DISTINCT dept_name) FROM course"} +{"answer": "Count the number of departments which offer courses.\nAdditional table information: table: college_2", "question": "SELECT COUNT(DISTINCT dept_name) FROM course"} +{"answer": "How many different courses offered by Physics department?\nAdditional table information: table: college_2", "question": "SELECT COUNT(DISTINCT course_id) FROM course WHERE dept_name = 'Physics'"} +{"answer": "Count the number of courses in the Physics department.\nAdditional table information: table: college_2", "question": "SELECT COUNT(DISTINCT course_id) FROM course WHERE dept_name = 'Physics'"} +{"answer": "Find the title of courses that have two prerequisites?\nAdditional table information: table: college_2", "question": "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"} +{"answer": "What are the titles for courses with two prerequisites?\nAdditional table information: table: college_2", "question": "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"} +{"answer": "Find the title, credit, and department name of courses that have more than one prerequisites?\nAdditional table information: table: college_2", "question": "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"} +{"answer": "What is the title, credit value, and department name for courses with more than one prerequisite?\nAdditional table information: table: college_2", "question": "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"} +{"answer": "How many courses that do not have prerequisite?\nAdditional table information: table: college_2", "question": "SELECT COUNT(*) FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)"} +{"answer": "Count the number of courses without prerequisites.\nAdditional table information: table: college_2", "question": "SELECT COUNT(*) FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)"} +{"answer": "Find the name of the courses that do not have any prerequisite?\nAdditional table information: table: college_2", "question": "SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)"} +{"answer": "What are the titles of courses without prerequisites?\nAdditional table information: table: college_2", "question": "SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)"} +{"answer": "How many different instructors have taught some course?\nAdditional table information: table: college_2", "question": "SELECT COUNT(DISTINCT id) FROM teaches"} +{"answer": "Count the number of distinct instructors who have taught a course.\nAdditional table information: table: college_2", "question": "SELECT COUNT(DISTINCT id) FROM teaches"} +{"answer": "Find the total budgets of the Marketing or Finance department.\nAdditional table information: table: college_2", "question": "SELECT SUM(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance'"} +{"answer": "What is the sum of budgets of the Marketing and Finance departments?\nAdditional table information: table: college_2", "question": "SELECT SUM(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance'"} +{"answer": "Find the department name of the instructor whose name contains 'Soisalon'.\nAdditional table information: table: college_2", "question": "SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'"} +{"answer": "What is the name of the department with an instructure who has a name like 'Soisalon'?\nAdditional table information: table: college_2", "question": "SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'"} +{"answer": "How many rooms whose capacity is less than 50 does the Lamberton building have?\nAdditional table information: table: college_2", "question": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50"} +{"answer": "Count the number of rooms in Lamberton with capacity lower than 50.\nAdditional table information: table: college_2", "question": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50"} +{"answer": "Find the name and budget of departments whose budgets are more than the average budget.\nAdditional table information: table: college_2", "question": "SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department)"} +{"answer": "What are the names and budgets of departments with budgets greater than the average?\nAdditional table information: table: college_2", "question": "SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department)"} +{"answer": "what is the name of the instructor who is in Statistics department and earns the lowest salary?\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary NULLS FIRST LIMIT 1"} +{"answer": "Give the name of the lowest earning instructor in the Statistics department.\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary NULLS FIRST LIMIT 1"} +{"answer": "Find the title of course that is provided by both Statistics and Psychology departments.\nAdditional table information: table: college_2", "question": "SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology'"} +{"answer": "What is the title of a course that is listed in both the Statistics and Psychology departments?\nAdditional table information: table: college_2", "question": "SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology'"} +{"answer": "Find the title of course that is provided by Statistics but not Psychology departments.\nAdditional table information: table: college_2", "question": "SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology'"} +{"answer": "What are the titles of courses that are in the Statistics department but not the Psychology department?\nAdditional table information: table: college_2", "question": "SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology'"} +{"answer": "Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010.\nAdditional table information: table: college_2", "question": "SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010"} +{"answer": "What are the ids of instructors who taught in the Fall of 2009 but not in the Spring of 2010?\nAdditional table information: table: college_2", "question": "SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010"} +{"answer": "Find the name of students who took any class in the years of 2009 and 2010.\nAdditional table information: table: college_2", "question": "SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010"} +{"answer": "What are the names of the students who took classes in 2009 or 2010?\nAdditional table information: table: college_2", "question": "SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010"} +{"answer": "Find the names of the top 3 departments that provide the largest amount of courses?\nAdditional table information: table: college_2", "question": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 3"} +{"answer": "What are the names of the 3 departments with the most courses?\nAdditional table information: table: college_2", "question": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 3"} +{"answer": "Find the name of the department that offers the highest total credits?\nAdditional table information: table: college_2", "question": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY SUM(credits) DESC LIMIT 1"} +{"answer": "What is the name of the department with the most credits?\nAdditional table information: table: college_2", "question": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY SUM(credits) DESC LIMIT 1"} +{"answer": "List the names of all courses ordered by their titles and credits.\nAdditional table information: table: college_2", "question": "SELECT title FROM course ORDER BY title NULLS FIRST, credits NULLS FIRST"} +{"answer": "Given the titles of all courses, in order of titles and credits.\nAdditional table information: table: college_2", "question": "SELECT title FROM course ORDER BY title NULLS FIRST, credits NULLS FIRST"} +{"answer": "Which department has the lowest budget?\nAdditional table information: table: college_2", "question": "SELECT dept_name FROM department ORDER BY budget NULLS FIRST LIMIT 1"} +{"answer": "Give the name of the department with the lowest budget.\nAdditional table information: table: college_2", "question": "SELECT dept_name FROM department ORDER BY budget NULLS FIRST LIMIT 1"} +{"answer": "List the names and buildings of all departments sorted by the budget from large to small.\nAdditional table information: table: college_2", "question": "SELECT dept_name, building FROM department ORDER BY budget DESC"} +{"answer": "What are the names and buildings of the deparments, sorted by budget descending?\nAdditional table information: table: college_2", "question": "SELECT dept_name, building FROM department ORDER BY budget DESC"} +{"answer": "Who is the instructor with the highest salary?\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor ORDER BY salary DESC LIMIT 1"} +{"answer": "Give the name of the highest paid instructor.\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor ORDER BY salary DESC LIMIT 1"} +{"answer": "List the information of all instructors ordered by their salary in ascending order.\nAdditional table information: table: college_2", "question": "SELECT * FROM instructor ORDER BY salary NULLS FIRST"} +{"answer": "Give all information regarding instructors, in order of salary from least to greatest.\nAdditional table information: table: college_2", "question": "SELECT * FROM instructor ORDER BY salary NULLS FIRST"} +{"answer": "Find the name of the students and their department names sorted by their total credits in ascending order.\nAdditional table information: table: college_2", "question": "SELECT name, dept_name FROM student ORDER BY tot_cred NULLS FIRST"} +{"answer": "What are the names of students and their respective departments, ordered by number of credits from least to greatest?\nAdditional table information: table: college_2", "question": "SELECT name, dept_name FROM student ORDER BY tot_cred NULLS FIRST"} +{"answer": "list in alphabetic order all course names and their instructors' names in year 2008.\nAdditional table information: table: college_2", "question": "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 NULLS FIRST"} +{"answer": "Show all titles and their instructors' names for courses in 2008, in alphabetical order by title.\nAdditional table information: table: college_2", "question": "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 NULLS FIRST"} +{"answer": "Find the name of instructors who are advising more than one student.\nAdditional table information: table: college_2", "question": "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"} +{"answer": "What are the names of instructors who advise more than one student?\nAdditional table information: table: college_2", "question": "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"} +{"answer": "Find the name of the students who have more than one advisor?\nAdditional table information: table: college_2", "question": "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"} +{"answer": "What are the names of students who have more than one advisor?\nAdditional table information: table: college_2", "question": "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"} +{"answer": "Find the number of rooms with more than 50 capacity for each building.\nAdditional table information: table: college_2", "question": "SELECT COUNT(*), building FROM classroom WHERE capacity > 50 GROUP BY building"} +{"answer": "How many rooms in each building have a capacity of over 50?\nAdditional table information: table: college_2", "question": "SELECT COUNT(*), building FROM classroom WHERE capacity > 50 GROUP BY building"} +{"answer": "Find the maximum and average capacity among rooms in each building.\nAdditional table information: table: college_2", "question": "SELECT MAX(capacity), AVG(capacity), building FROM classroom GROUP BY building"} +{"answer": "What are the greatest and average capacity for rooms in each building?\nAdditional table information: table: college_2", "question": "SELECT MAX(capacity), AVG(capacity), building FROM classroom GROUP BY building"} +{"answer": "Find the title of the course that is offered by more than one department.\nAdditional table information: table: college_2", "question": "SELECT title FROM course GROUP BY title HAVING COUNT(*) > 1"} +{"answer": "What are the titles of courses that are offered in more than one department?\nAdditional table information: table: college_2", "question": "SELECT title FROM course GROUP BY title HAVING COUNT(*) > 1"} +{"answer": "Find the total credits of courses provided by different department.\nAdditional table information: table: college_2", "question": "SELECT SUM(credits), dept_name FROM course GROUP BY dept_name"} +{"answer": "How many total credits are offered by each department?\nAdditional table information: table: college_2", "question": "SELECT SUM(credits), dept_name FROM course GROUP BY dept_name"} +{"answer": "Find the minimum salary for the departments whose average salary is above the average payment of all instructors.\nAdditional table information: table: college_2", "question": "SELECT MIN(salary), dept_name FROM instructor GROUP BY dept_name HAVING AVG(salary) > (SELECT AVG(salary) FROM instructor)"} +{"answer": "What is the lowest salary in departments with average salary greater than the overall average.\nAdditional table information: table: college_2", "question": "SELECT MIN(salary), dept_name FROM instructor GROUP BY dept_name HAVING AVG(salary) > (SELECT AVG(salary) FROM instructor)"} +{"answer": "Find the number of courses provided in each semester and year.\nAdditional table information: table: college_2", "question": "SELECT COUNT(*), semester, YEAR FROM SECTION GROUP BY semester, YEAR"} +{"answer": "How many courses are provided in each semester and year?\nAdditional table information: table: college_2", "question": "SELECT COUNT(*), semester, YEAR FROM SECTION GROUP BY semester, YEAR"} +{"answer": "Find the year which offers the largest number of courses.\nAdditional table information: table: college_2", "question": "SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which year had the greatest number of courses?\nAdditional table information: table: college_2", "question": "SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the year and semester when offers the largest number of courses.\nAdditional table information: table: college_2", "question": "SELECT semester, YEAR FROM SECTION GROUP BY semester, YEAR ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the year and semester with the most courses?\nAdditional table information: table: college_2", "question": "SELECT semester, YEAR FROM SECTION GROUP BY semester, YEAR ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the name of department has the highest amount of students?\nAdditional table information: table: college_2", "question": "SELECT dept_name FROM student GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the name of the deparment with the highest enrollment?\nAdditional table information: table: college_2", "question": "SELECT dept_name FROM student GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the total number of students in each department.\nAdditional table information: table: college_2", "question": "SELECT COUNT(*), dept_name FROM student GROUP BY dept_name"} +{"answer": "How many students are in each department?\nAdditional table information: table: college_2", "question": "SELECT COUNT(*), dept_name FROM student GROUP BY dept_name"} +{"answer": "Find the semester and year which has the least number of student taking any class.\nAdditional table information: table: college_2", "question": "SELECT semester, YEAR FROM takes GROUP BY semester, YEAR ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "Which semeseter and year had the fewest students?\nAdditional table information: table: college_2", "question": "SELECT semester, YEAR FROM takes GROUP BY semester, YEAR ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "What is the id of the instructor who advises of all students from History department?\nAdditional table information: table: college_2", "question": "SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History'"} +{"answer": "Give id of the instructor who advises students in the History department.\nAdditional table information: table: college_2", "question": "SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History'"} +{"answer": "Find the name and salary of the instructors who are advisors of any student from History department?\nAdditional table information: table: college_2", "question": "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'"} +{"answer": "What are the names and salaries of instructors who advises students in the History department?\nAdditional table information: table: college_2", "question": "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'"} +{"answer": "Find the id of the courses that do not have any prerequisite?\nAdditional table information: table: college_2", "question": "SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq"} +{"answer": "What are the ids of courses without prerequisites?\nAdditional table information: table: college_2", "question": "SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq"} +{"answer": "Find the name of the courses that do not have any prerequisite?\nAdditional table information: table: college_2", "question": "SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)"} +{"answer": "What are the names of courses without prerequisites?\nAdditional table information: table: college_2", "question": "SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)"} +{"answer": "What is the title of the prerequisite class of International Finance course?\nAdditional table information: table: college_2", "question": "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')"} +{"answer": "Give the title of the prerequisite to the course International Finance.\nAdditional table information: table: college_2", "question": "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')"} +{"answer": "Find the title of course whose prerequisite is course Differential Geometry.\nAdditional table information: table: college_2", "question": "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')"} +{"answer": "What is the title of the course with Differential Geometry as a prerequisite?\nAdditional table information: table: college_2", "question": "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')"} +{"answer": "Find the names of students who have taken any course in the fall semester of year 2003.\nAdditional table information: table: college_2", "question": "SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003)"} +{"answer": "What are the names of students who took a course in the Fall of 2003?\nAdditional table information: table: college_2", "question": "SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003)"} +{"answer": "What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010?\nAdditional table information: table: college_2", "question": "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"} +{"answer": "Give the title of the course offered in Chandler during the Fall of 2010.\nAdditional table information: table: college_2", "question": "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"} +{"answer": "Find the name of the instructors who taught C Programming course before.\nAdditional table information: table: college_2", "question": "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'"} +{"answer": "What are the names of instructors who have taught C Programming courses?\nAdditional table information: table: college_2", "question": "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'"} +{"answer": "Find the name and salary of instructors who are advisors of the students from the Math department.\nAdditional table information: table: college_2", "question": "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'"} +{"answer": "What are the names and salaries of instructors who advise students in the Math department?\nAdditional table information: table: college_2", "question": "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'"} +{"answer": "Find the name of instructors who are advisors of the students from the Math department, and sort the results by students' total credit.\nAdditional table information: table: college_2", "question": "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 NULLS FIRST"} +{"answer": "What are the names of all instructors who advise students in the math depart sorted by total credits of the student.\nAdditional table information: table: college_2", "question": "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 NULLS FIRST"} +{"answer": "What is the course title of the prerequisite of course Mobile Computing?\nAdditional table information: table: college_2", "question": "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')"} +{"answer": "What is the title of the course that is a prerequisite for Mobile Computing?\nAdditional table information: table: college_2", "question": "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')"} +{"answer": "Find the name of instructor who is the advisor of the student who has the highest number of total credits.\nAdditional table information: table: college_2", "question": "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"} +{"answer": "What is the name of the instructor who advises the student with the greatest number of total credits?\nAdditional table information: table: college_2", "question": "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"} +{"answer": "Find the name of instructors who didn't teach any courses?\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches)"} +{"answer": "What are the names of instructors who didn't teach?\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches)"} +{"answer": "Find the id of instructors who didn't teach any courses?\nAdditional table information: table: college_2", "question": "SELECT id FROM instructor EXCEPT SELECT id FROM teaches"} +{"answer": "What are the ids of instructors who didnt' teach?\nAdditional table information: table: college_2", "question": "SELECT id FROM instructor EXCEPT SELECT id FROM teaches"} +{"answer": "Find the names of instructors who didn't each any courses in any Spring semester.\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches WHERE semester = 'Spring')"} +{"answer": "What are the names of instructors who didn't teach courses in the Spring?\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches WHERE semester = 'Spring')"} +{"answer": "Find the name of the department which has the highest average salary of professors.\nAdditional table information: table: college_2", "question": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY AVG(salary) DESC LIMIT 1"} +{"answer": "Which department has the highest average instructor salary?\nAdditional table information: table: college_2", "question": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY AVG(salary) DESC LIMIT 1"} +{"answer": "Find the number and averaged salary of all instructors who are in the department with the highest budget.\nAdditional table information: table: college_2", "question": "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"} +{"answer": "How many instructors are in the department with the highest budget, and what is their average salary?\nAdditional table information: table: college_2", "question": "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"} +{"answer": "What is the title and credits of the course that is taught in the largest classroom (with the highest capacity)?\nAdditional table information: table: college_2", "question": "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)"} +{"answer": "Give the title and credits for the course that is taught in the classroom with the greatest capacity.\nAdditional table information: table: college_2", "question": "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)"} +{"answer": "Find the name of students who didn't take any course from Biology department.\nAdditional table information: table: college_2", "question": "SELECT name FROM student WHERE NOT id IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology')"} +{"answer": "What are the names of students who haven't taken any Biology courses?\nAdditional table information: table: college_2", "question": "SELECT name FROM student WHERE NOT id IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology')"} +{"answer": "Find the total number of students and total number of instructors for each department.\nAdditional table information: table: college_2", "question": "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"} +{"answer": "How many students and instructors are in each department?\nAdditional table information: table: college_2", "question": "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"} +{"answer": "Find the name of students who have taken the prerequisite course of the course with title International Finance.\nAdditional table information: table: college_2", "question": "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')"} +{"answer": "What are the names of students who have taken the prerequisite for the course International Finance?\nAdditional table information: table: college_2", "question": "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')"} +{"answer": "Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department.\nAdditional table information: table: college_2", "question": "SELECT name, salary FROM instructor WHERE salary < (SELECT AVG(salary) FROM instructor WHERE dept_name = 'Physics')"} +{"answer": "What are the names and salaries for instructors who earn less than the average salary of instructors in the Physics department?\nAdditional table information: table: college_2", "question": "SELECT name, salary FROM instructor WHERE salary < (SELECT AVG(salary) FROM instructor WHERE dept_name = 'Physics')"} +{"answer": "Find the name of students who took some course offered by Statistics department.\nAdditional table information: table: college_2", "question": "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'"} +{"answer": "What are the names of students who have taken Statistics courses?\nAdditional table information: table: college_2", "question": "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'"} +{"answer": "Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles.\nAdditional table information: table: college_2", "question": "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 NULLS FIRST"} +{"answer": "What are the building, room number, semester and year of courses in the Psychology department, sorted using course title?\nAdditional table information: table: college_2", "question": "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 NULLS FIRST"} +{"answer": "Find the names of all instructors in computer science department\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.'"} +{"answer": "What are the names of all instructors in the Comp. Sci. department?\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.'"} +{"answer": "Find the names of all instructors in Comp. Sci. department with salary > 80000.\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000"} +{"answer": "What are the names of the instructors in the Comp. Sci. department who earn more than 80000?\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000"} +{"answer": "Find the names of all instructors who have taught some course and the course_id.\nAdditional table information: table: college_2", "question": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID"} +{"answer": "What are the names of all instructors who have taught a course, as well as the corresponding course id?\nAdditional table information: table: college_2", "question": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID"} +{"answer": "Find the names of all instructors in the Art department who have taught some course and the course_id.\nAdditional table information: table: college_2", "question": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art'"} +{"answer": "What are the names of Art instructors who have taught a course, and the corresponding course id?\nAdditional table information: table: college_2", "question": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art'"} +{"answer": "Find the names of all instructors whose name includes the substring \u201cdar\u201d.\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE name LIKE '%dar%'"} +{"answer": "What are the names of all instructors with names that include 'dar'?\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE name LIKE '%dar%'"} +{"answer": "List in alphabetic order the names of all distinct instructors.\nAdditional table information: table: college_2", "question": "SELECT DISTINCT name FROM instructor ORDER BY name NULLS FIRST"} +{"answer": "List the distinct names of the instructors, ordered by name.\nAdditional table information: table: college_2", "question": "SELECT DISTINCT name FROM instructor ORDER BY name NULLS FIRST"} +{"answer": "Find courses that ran in Fall 2009 or in Spring 2010.\nAdditional table information: table: college_2", "question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010"} +{"answer": "What are the ids for courses in the Fall of 2009 or the Spring of 2010?\nAdditional table information: table: college_2", "question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010"} +{"answer": "Find courses that ran in Fall 2009 and in Spring 2010.\nAdditional table information: table: college_2", "question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010"} +{"answer": "What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010?\nAdditional table information: table: college_2", "question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010"} +{"answer": "Find courses that ran in Fall 2009 but not in Spring 2010.\nAdditional table information: table: college_2", "question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010"} +{"answer": "What are the ids of courses offered in Fall of 2009 but not in Spring of 2010?\nAdditional table information: table: college_2", "question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010"} +{"answer": "Find the salaries of all distinct instructors that are less than the largest salary.\nAdditional table information: table: college_2", "question": "SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT MAX(salary) FROM instructor)"} +{"answer": "What are the distinct salaries of all instructors who earned less than the maximum salary?\nAdditional table information: table: college_2", "question": "SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT MAX(salary) FROM instructor)"} +{"answer": "Find the total number of instructors who teach a course in the Spring 2010 semester.\nAdditional table information: table: college_2", "question": "SELECT COUNT(DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010"} +{"answer": "How many instructors teach a course in the Spring of 2010?\nAdditional table information: table: college_2", "question": "SELECT COUNT(DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010"} +{"answer": "Find the names and average salaries of all departments whose average salary is greater than 42000.\nAdditional table information: table: college_2", "question": "SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name HAVING AVG(salary) > 42000"} +{"answer": "What are the names and average salaries for departments with average salary higher than 42000?\nAdditional table information: table: college_2", "question": "SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name HAVING AVG(salary) > 42000"} +{"answer": "Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department.\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology')"} +{"answer": "What are the names of instructors who earn more than at least one instructor from the Biology department?\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology')"} +{"answer": "Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department.\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE salary > (SELECT MAX(salary) FROM instructor WHERE dept_name = 'Biology')"} +{"answer": "What are the names of all instructors with a higher salary than any of the instructors in the Biology department?\nAdditional table information: table: college_2", "question": "SELECT name FROM instructor WHERE salary > (SELECT MAX(salary) FROM instructor WHERE dept_name = 'Biology')"} +{"answer": "How many debates are there?\nAdditional table information: table: debate", "question": "SELECT COUNT(*) FROM debate"} +{"answer": "List the venues of debates in ascending order of the number of audience.\nAdditional table information: table: debate", "question": "SELECT Venue FROM debate ORDER BY Num_of_Audience ASC NULLS FIRST"} +{"answer": "What are the date and venue of each debate?\nAdditional table information: table: debate", "question": "SELECT Date, Venue FROM debate"} +{"answer": "List the dates of debates with number of audience bigger than 150\nAdditional table information: table: debate", "question": "SELECT Date FROM debate WHERE Num_of_Audience > 150"} +{"answer": "Show the names of people aged either 35 or 36.\nAdditional table information: table: debate", "question": "SELECT Name FROM people WHERE Age = 35 OR Age = 36"} +{"answer": "What is the party of the youngest people?\nAdditional table information: table: debate", "question": "SELECT Party FROM people ORDER BY Age ASC NULLS FIRST LIMIT 1"} +{"answer": "Show different parties of people along with the number of people in each party.\nAdditional table information: table: debate", "question": "SELECT Party, COUNT(*) FROM people GROUP BY Party"} +{"answer": "Show the party that has the most people.\nAdditional table information: table: debate", "question": "SELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the distinct venues of debates\nAdditional table information: table: debate", "question": "SELECT DISTINCT Venue FROM debate"} +{"answer": "Show the names of people, and dates and venues of debates they are on the affirmative side.\nAdditional table information: table: debate", "question": "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"} +{"answer": "Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name.\nAdditional table information: table: debate", "question": "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 NULLS FIRST"} +{"answer": "Show the names of people that are on affirmative side of debates with number of audience bigger than 200.\nAdditional table information: table: debate", "question": "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"} +{"answer": "Show the names of people and the number of times they have been on the affirmative side of debates.\nAdditional table information: table: debate", "question": "SELECT T2.Name, COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name"} +{"answer": "Show the names of people who have been on the negative side of debates at least twice.\nAdditional table information: table: debate", "question": "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"} +{"answer": "List the names of people that have not been on the affirmative side of debates.\nAdditional table information: table: debate", "question": "SELECT Name FROM people WHERE NOT People_id IN (SELECT Affirmative FROM debate_people)"} +{"answer": "List the names of all the customers in alphabetical order.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT customer_details FROM customers ORDER BY customer_details NULLS FIRST"} +{"answer": "Sort the customer names in alphabetical order.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT customer_details FROM customers ORDER BY customer_details NULLS FIRST"} +{"answer": "Find all the policy type codes associated with the customer 'Dayana Robel'\nAdditional table information: table: insurance_and_eClaims", "question": "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'"} +{"answer": "What are the type codes of the policies used by the customer 'Dayana Robel'?\nAdditional table information: table: insurance_and_eClaims", "question": "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'"} +{"answer": "Which type of policy is most frequently used? Give me the policy type code.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the type code of the most frequently used policy.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find all the policy types that are used by more than 2 customers.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING COUNT(*) > 2"} +{"answer": "Which types of policy are chosen by more than 2 customers? Give me the policy type codes.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING COUNT(*) > 2"} +{"answer": "Find the total and average amount paid in claim headers.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT SUM(amount_piad), AVG(amount_piad) FROM claim_headers"} +{"answer": "What are the total amount and average amount paid in claim headers?\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT SUM(amount_piad), AVG(amount_piad) FROM claim_headers"} +{"answer": "Find the total amount claimed in the most recently created document.\nAdditional table information: table: insurance_and_eClaims", "question": "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 NULLS FIRST LIMIT 1)"} +{"answer": "How much amount in total were claimed in the most recently created document?\nAdditional table information: table: insurance_and_eClaims", "question": "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 NULLS FIRST LIMIT 1)"} +{"answer": "What is the name of the customer who has made the largest amount of claim in a single claim?\nAdditional table information: table: insurance_and_eClaims", "question": "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)"} +{"answer": "Which customer made the largest amount of claim in a single claim? Return the customer details.\nAdditional table information: table: insurance_and_eClaims", "question": "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)"} +{"answer": "What is the name of the customer who has made the minimum amount of payment in one claim?\nAdditional table information: table: insurance_and_eClaims", "question": "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)"} +{"answer": "Which customer made the smallest amount of claim in one claim? Return the customer details.\nAdditional table information: table: insurance_and_eClaims", "question": "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)"} +{"answer": "Find the names of customers who have no policies associated.\nAdditional table information: table: insurance_and_eClaims", "question": "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"} +{"answer": "What are the names of customers who do not have any policies?\nAdditional table information: table: insurance_and_eClaims", "question": "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"} +{"answer": "How many claim processing stages are there in total?\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT COUNT(*) FROM claims_processing_stages"} +{"answer": "Find the number of distinct stages in claim processing.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT COUNT(*) FROM claims_processing_stages"} +{"answer": "What is the name of the claim processing stage that most of the claims are on?\nAdditional table information: table: insurance_and_eClaims", "question": "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"} +{"answer": "Which claim processing stage has the most claims? Show the claim status name.\nAdditional table information: table: insurance_and_eClaims", "question": "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"} +{"answer": "Find the names of customers whose name contains 'Diana'.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT customer_details FROM customers WHERE customer_details LIKE '%Diana%'"} +{"answer": "Which customers have the substring 'Diana' in their names? Return the customer details.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT customer_details FROM customers WHERE customer_details LIKE '%Diana%'"} +{"answer": "Find the names of the customers who have an deputy policy.\nAdditional table information: table: insurance_and_eClaims", "question": "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'"} +{"answer": "Which customers have an insurance policy with the type code 'Deputy'? Give me the customer details.\nAdditional table information: table: insurance_and_eClaims", "question": "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'"} +{"answer": "Find the names of customers who either have an deputy policy or uniformed policy.\nAdditional table information: table: insurance_and_eClaims", "question": "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'"} +{"answer": "Which customers have an insurance policy with the type code 'Deputy' or 'Uniform'? Return the customer details.\nAdditional table information: table: insurance_and_eClaims", "question": "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'"} +{"answer": "Find the names of all the customers and staff members.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT customer_details FROM customers UNION SELECT staff_details FROM staff"} +{"answer": "What are the names of the customers and staff members?\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT customer_details FROM customers UNION SELECT staff_details FROM staff"} +{"answer": "Find the number of records of each policy type and its type code.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT policy_type_code, COUNT(*) FROM policies GROUP BY policy_type_code"} +{"answer": "For each policy type, return its type code and its count in the record.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT policy_type_code, COUNT(*) FROM policies GROUP BY policy_type_code"} +{"answer": "Find the name of the customer that has been involved in the most policies.\nAdditional table information: table: insurance_and_eClaims", "question": "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"} +{"answer": "Which customer have the most policies? Give me the customer details.\nAdditional table information: table: insurance_and_eClaims", "question": "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"} +{"answer": "What is the description of the claim status 'Open'?\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = 'Open'"} +{"answer": "Find the description of the claim status 'Open'.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = 'Open'"} +{"answer": "How many distinct claim outcome codes are there?\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT COUNT(DISTINCT claim_outcome_code) FROM claims_processing"} +{"answer": "Count the number of distinct claim outcome codes.\nAdditional table information: table: insurance_and_eClaims", "question": "SELECT COUNT(DISTINCT claim_outcome_code) FROM claims_processing"} +{"answer": "Which customer is associated with the latest policy?\nAdditional table information: table: insurance_and_eClaims", "question": "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)"} +{"answer": "Find the customer who started a policy most recently.\nAdditional table information: table: insurance_and_eClaims", "question": "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)"} +{"answer": "Show the number of accounts.\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*) FROM Accounts"} +{"answer": "How many accounts are there?\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*) FROM Accounts"} +{"answer": "How many customers have opened an account?\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(DISTINCT customer_id) FROM Accounts"} +{"answer": "Count the number of customers who have an account.\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(DISTINCT customer_id) FROM Accounts"} +{"answer": "Show the id, the date of account opened, the account name, and other account detail for all accounts.\nAdditional table information: table: customers_and_invoices", "question": "SELECT account_id, date_account_opened, account_name, other_account_details FROM Accounts"} +{"answer": "What are the ids, date opened, name, and other details for all accounts?\nAdditional table information: table: customers_and_invoices", "question": "SELECT account_id, date_account_opened, account_name, other_account_details FROM Accounts"} +{"answer": "Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'.\nAdditional table information: table: customers_and_invoices", "question": "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'"} +{"answer": "What are the ids, names, dates of opening, and other details for accounts corresponding to the customer with the first name 'Meaghan'?\nAdditional table information: table: customers_and_invoices", "question": "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'"} +{"answer": "Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling.\nAdditional table information: table: customers_and_invoices", "question": "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'"} +{"answer": "What are the names and other details for accounts corresponding to the customer named Meaghan Keeling?\nAdditional table information: table: customers_and_invoices", "question": "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'"} +{"answer": "Show the first name and last name for the customer with account name 900.\nAdditional table information: table: customers_and_invoices", "question": "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'"} +{"answer": "What are the full names of customers with the account name 900?\nAdditional table information: table: customers_and_invoices", "question": "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'"} +{"answer": "How many customers don't have an account?\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts)"} +{"answer": "Count the number of customers who do not have an account.\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts)"} +{"answer": "Show the unique first names, last names, and phone numbers for all customers with any account.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "What are the distinct first names, last names, and phone numbers for customers with accounts?\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Show customer ids who don't have an account.\nAdditional table information: table: customers_and_invoices", "question": "SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts"} +{"answer": "What are the customer ids for customers who do not have an account?\nAdditional table information: table: customers_and_invoices", "question": "SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts"} +{"answer": "How many accounts does each customer have? List the number and customer id.\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*), customer_id FROM Accounts GROUP BY customer_id"} +{"answer": "Count the number of accounts corresponding to each customer id.\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*), customer_id FROM Accounts GROUP BY customer_id"} +{"answer": "What is the customer id, first and last name with most number of accounts.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Return the id and full name of the customer with the most accounts.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Show id, first name and last name for all customers and the number of accounts.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "What are the the full names and ids for all customers, and how many accounts does each have?\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Show first name and id for all customers with at least 2 accounts.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "What are the first names and ids for customers who have two or more accounts?\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Show the number of customers.\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*) FROM Customers"} +{"answer": "Count the number of customers.\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*) FROM Customers"} +{"answer": "Show the number of customers for each gender.\nAdditional table information: table: customers_and_invoices", "question": "SELECT gender, COUNT(*) FROM Customers GROUP BY gender"} +{"answer": "How many customers are there of each gender?\nAdditional table information: table: customers_and_invoices", "question": "SELECT gender, COUNT(*) FROM Customers GROUP BY gender"} +{"answer": "How many transactions do we have?\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*) FROM Financial_transactions"} +{"answer": "Count the number of transactions.\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*) FROM Financial_transactions"} +{"answer": "How many transaction does each account have? Show the number and account id.\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*), account_id FROM Financial_transactions"} +{"answer": "Count the number of financial transactions that correspond to each account id.\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*), account_id FROM Financial_transactions"} +{"answer": "How many transaction does account with name 337 have?\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = '337'"} +{"answer": "Count the number of financial transactions that the account with the name 337 has.\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = '337'"} +{"answer": "What is the average, minimum, maximum, and total transaction amount?\nAdditional table information: table: customers_and_invoices", "question": "SELECT AVG(transaction_amount), MIN(transaction_amount), MAX(transaction_amount), SUM(transaction_amount) FROM Financial_transactions"} +{"answer": "Return the average, minimum, maximum, and total transaction amounts.\nAdditional table information: table: customers_and_invoices", "question": "SELECT AVG(transaction_amount), MIN(transaction_amount), MAX(transaction_amount), SUM(transaction_amount) FROM Financial_transactions"} +{"answer": "Show ids for all transactions whose amounts are greater than the average.\nAdditional table information: table: customers_and_invoices", "question": "SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT AVG(transaction_amount) FROM Financial_transactions)"} +{"answer": "What are the ids for transactions that have an amount greater than the average amount of a transaction?\nAdditional table information: table: customers_and_invoices", "question": "SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT AVG(transaction_amount) FROM Financial_transactions)"} +{"answer": "Show the transaction types and the total amount of transactions.\nAdditional table information: table: customers_and_invoices", "question": "SELECT transaction_type, SUM(transaction_amount) FROM Financial_transactions GROUP BY transaction_type"} +{"answer": "What are total transaction amounts for each transaction type?\nAdditional table information: table: customers_and_invoices", "question": "SELECT transaction_type, SUM(transaction_amount) FROM Financial_transactions GROUP BY transaction_type"} +{"answer": "Show the account name, id and the number of transactions for each account.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Return the names and ids of each account, as well as the number of transactions.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Show the account id with most number of transactions.\nAdditional table information: table: customers_and_invoices", "question": "SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the id of the account with the most transactions?\nAdditional table information: table: customers_and_invoices", "question": "SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the account id and name with at least 4 transactions.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "What are the ids and names of accounts with 4 or more transactions?\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Show all product sizes.\nAdditional table information: table: customers_and_invoices", "question": "SELECT DISTINCT product_size FROM Products"} +{"answer": "What are the different product sizes?\nAdditional table information: table: customers_and_invoices", "question": "SELECT DISTINCT product_size FROM Products"} +{"answer": "Show all product colors.\nAdditional table information: table: customers_and_invoices", "question": "SELECT DISTINCT product_color FROM Products"} +{"answer": "What are the different product colors?\nAdditional table information: table: customers_and_invoices", "question": "SELECT DISTINCT product_color FROM Products"} +{"answer": "Show the invoice number and the number of transactions for each invoice.\nAdditional table information: table: customers_and_invoices", "question": "SELECT invoice_number, COUNT(*) FROM Financial_transactions GROUP BY invoice_number"} +{"answer": "How many transactions correspond to each invoice number?\nAdditional table information: table: customers_and_invoices", "question": "SELECT invoice_number, COUNT(*) FROM Financial_transactions GROUP BY invoice_number"} +{"answer": "What is the invoice number and invoice date for the invoice with most number of transactions?\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions?\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "How many invoices do we have?\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*) FROM Invoices"} +{"answer": "Count the number of invoices.\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*) FROM Invoices"} +{"answer": "Show invoice dates and order id and details for all invoices.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "What are the invoice dates, order ids, and order details for all invoices?\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Show the order ids and the number of invoices for each order.\nAdditional table information: table: customers_and_invoices", "question": "SELECT order_id, COUNT(*) FROM Invoices GROUP BY order_id"} +{"answer": "How many invoices correspond to each order id?\nAdditional table information: table: customers_and_invoices", "question": "SELECT order_id, COUNT(*) FROM Invoices GROUP BY order_id"} +{"answer": "What is the order id and order details for the order more than two invoices.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Return the order ids and details for orderes with two or more invoices.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "What is the customer last name, id and phone number with most number of orders?\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Return the last name, id and phone number of the customer who has made the greatest number of orders.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Show all product names without an order.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "What are the names of products that have never been ordered?\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Show all product names and the total quantity ordered for each product name.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "What are the different product names, and what is the sum of quantity ordered for each product?\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Show the order ids and the number of items in each order.\nAdditional table information: table: customers_and_invoices", "question": "SELECT order_id, COUNT(*) FROM Order_items GROUP BY order_id"} +{"answer": "How many order items correspond to each order id?\nAdditional table information: table: customers_and_invoices", "question": "SELECT order_id, COUNT(*) FROM Order_items GROUP BY order_id"} +{"answer": "Show the product ids and the number of unique orders containing each product.\nAdditional table information: table: customers_and_invoices", "question": "SELECT product_id, COUNT(DISTINCT order_id) FROM Order_items GROUP BY product_id"} +{"answer": "How many distinct order ids correspond to each product?\nAdditional table information: table: customers_and_invoices", "question": "SELECT product_id, COUNT(DISTINCT order_id) FROM Order_items GROUP BY product_id"} +{"answer": "Show all product names and the number of customers having an order on each product.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "What are teh names of the different products, as well as the number of customers who have ordered each product.\nAdditional table information: table: customers_and_invoices", "question": "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"} +{"answer": "Show order ids and the number of products in each order.\nAdditional table information: table: customers_and_invoices", "question": "SELECT order_id, COUNT(DISTINCT product_id) FROM Order_items GROUP BY order_id"} +{"answer": "How many different products correspond to each order id?\nAdditional table information: table: customers_and_invoices", "question": "SELECT order_id, COUNT(DISTINCT product_id) FROM Order_items GROUP BY order_id"} +{"answer": "Show order ids and the total quantity in each order.\nAdditional table information: table: customers_and_invoices", "question": "SELECT order_id, SUM(product_quantity) FROM Order_items GROUP BY order_id"} +{"answer": "Give the order ids for all orders, as well as the total product quantity in each.\nAdditional table information: table: customers_and_invoices", "question": "SELECT order_id, SUM(product_quantity) FROM Order_items GROUP BY order_id"} +{"answer": "How many products were not included in any order?\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*) FROM products WHERE NOT product_id IN (SELECT product_id FROM Order_items)"} +{"answer": "Count the number of products that were never ordered.\nAdditional table information: table: customers_and_invoices", "question": "SELECT COUNT(*) FROM products WHERE NOT product_id IN (SELECT product_id FROM Order_items)"} +{"answer": "How many churches opened before 1850 are there?\nAdditional table information: table: wedding", "question": "SELECT COUNT(*) FROM Church WHERE Open_Date < 1850"} +{"answer": "Show the name, open date, and organizer for all churches.\nAdditional table information: table: wedding", "question": "SELECT name, open_date, organized_by FROM Church"} +{"answer": "List all church names in descending order of opening date.\nAdditional table information: table: wedding", "question": "SELECT name FROM church ORDER BY open_date DESC"} +{"answer": "Show the opening year in whcih at least two churches opened.\nAdditional table information: table: wedding", "question": "SELECT open_date FROM church GROUP BY open_date HAVING COUNT(*) >= 2"} +{"answer": "Show the organizer and name for churches that opened between 1830 and 1840.\nAdditional table information: table: wedding", "question": "SELECT organized_by, name FROM church WHERE open_date BETWEEN 1830 AND 1840"} +{"answer": "Show all opening years and the number of churches that opened in that year.\nAdditional table information: table: wedding", "question": "SELECT open_date, COUNT(*) FROM church GROUP BY open_date"} +{"answer": "Show the name and opening year for three churches that opened most recently.\nAdditional table information: table: wedding", "question": "SELECT name, open_date FROM church ORDER BY open_date DESC LIMIT 3"} +{"answer": "How many female people are older than 30 in our record?\nAdditional table information: table: wedding", "question": "SELECT COUNT(*) FROM people WHERE is_male = 'F' AND age > 30"} +{"answer": "Show the country where people older than 30 and younger than 25 are from.\nAdditional table information: table: wedding", "question": "SELECT country FROM people WHERE age < 25 INTERSECT SELECT country FROM people WHERE age > 30"} +{"answer": "Show the minimum, maximum, and average age for all people.\nAdditional table information: table: wedding", "question": "SELECT MIN(age), MAX(age), AVG(age) FROM people"} +{"answer": "Show the name and country for all people whose age is smaller than the average.\nAdditional table information: table: wedding", "question": "SELECT name, country FROM people WHERE age < (SELECT AVG(age) FROM people)"} +{"answer": "Show the pair of male and female names in all weddings after year 2014\nAdditional table information: table: wedding", "question": "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"} +{"answer": "Show the name and age for all male people who don't have a wedding.\nAdditional table information: table: wedding", "question": "SELECT name, age FROM people WHERE is_male = 'T' AND NOT people_id IN (SELECT male_id FROM wedding)"} +{"answer": "Show all church names except for those that had a wedding in year 2015.\nAdditional table information: table: wedding", "question": "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"} +{"answer": "Show all church names that have hosted least two weddings.\nAdditional table information: table: wedding", "question": "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"} +{"answer": "Show the names for all females from Canada having a wedding in year 2016.\nAdditional table information: table: wedding", "question": "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'"} +{"answer": "How many weddings are there in year 2016?\nAdditional table information: table: wedding", "question": "SELECT COUNT(*) FROM wedding WHERE YEAR = 2016"} +{"answer": "Show the church names for the weddings of all people older than 30.\nAdditional table information: table: wedding", "question": "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"} +{"answer": "Show all countries and the number of people from each country.\nAdditional table information: table: wedding", "question": "SELECT country, COUNT(*) FROM people GROUP BY country"} +{"answer": "How many churches have a wedding in year 2016?\nAdditional table information: table: wedding", "question": "SELECT COUNT(DISTINCT church_id) FROM wedding WHERE YEAR = 2016"} +{"answer": "How many artists do we have?\nAdditional table information: table: theme_gallery", "question": "SELECT COUNT(*) FROM artist"} +{"answer": "Count the number of artists.\nAdditional table information: table: theme_gallery", "question": "SELECT COUNT(*) FROM artist"} +{"answer": "Show all artist name, age, and country ordered by the yeared they joined.\nAdditional table information: table: theme_gallery", "question": "SELECT name, age, country FROM artist ORDER BY Year_Join NULLS FIRST"} +{"answer": "What are the names, ages, and countries of artists, sorted by the year they joined?\nAdditional table information: table: theme_gallery", "question": "SELECT name, age, country FROM artist ORDER BY Year_Join NULLS FIRST"} +{"answer": "What are all distinct country for artists?\nAdditional table information: table: theme_gallery", "question": "SELECT DISTINCT country FROM artist"} +{"answer": "Return the different countries for artists.\nAdditional table information: table: theme_gallery", "question": "SELECT DISTINCT country FROM artist"} +{"answer": "Show all artist names and the year joined who are not from United States.\nAdditional table information: table: theme_gallery", "question": "SELECT name, year_join FROM artist WHERE country <> 'United States'"} +{"answer": "What are the names and year of joining for artists that do not have the country 'United States'?\nAdditional table information: table: theme_gallery", "question": "SELECT name, year_join FROM artist WHERE country <> 'United States'"} +{"answer": "How many artists are above age 46 and joined after 1990?\nAdditional table information: table: theme_gallery", "question": "SELECT COUNT(*) FROM artist WHERE age > 46 AND year_join > 1990"} +{"answer": "Count the number of artists who are older than 46 and joined after 1990.\nAdditional table information: table: theme_gallery", "question": "SELECT COUNT(*) FROM artist WHERE age > 46 AND year_join > 1990"} +{"answer": "What is the average and minimum age of all artists from United States.\nAdditional table information: table: theme_gallery", "question": "SELECT AVG(age), MIN(age) FROM artist WHERE country = 'United States'"} +{"answer": "Return the average and minimum ages across artists from the United States.\nAdditional table information: table: theme_gallery", "question": "SELECT AVG(age), MIN(age) FROM artist WHERE country = 'United States'"} +{"answer": "What is the name of the artist who joined latest?\nAdditional table information: table: theme_gallery", "question": "SELECT name FROM artist ORDER BY year_join DESC LIMIT 1"} +{"answer": "Return the name of the artist who has the latest join year.\nAdditional table information: table: theme_gallery", "question": "SELECT name FROM artist ORDER BY year_join DESC LIMIT 1"} +{"answer": "How many exhibition are there in year 2005 or after?\nAdditional table information: table: theme_gallery", "question": "SELECT COUNT(*) FROM exhibition WHERE YEAR >= 2005"} +{"answer": "Count the number of exhibitions that happened in or after 2005.\nAdditional table information: table: theme_gallery", "question": "SELECT COUNT(*) FROM exhibition WHERE YEAR >= 2005"} +{"answer": "Show theme and year for all exhibitions with ticket prices lower than 15.\nAdditional table information: table: theme_gallery", "question": "SELECT theme, YEAR FROM exhibition WHERE ticket_price < 15"} +{"answer": "What are the theme and year for all exhibitions that have a ticket price under 15?\nAdditional table information: table: theme_gallery", "question": "SELECT theme, YEAR FROM exhibition WHERE ticket_price < 15"} +{"answer": "Show all artist names and the number of exhibitions for each artist.\nAdditional table information: table: theme_gallery", "question": "SELECT T2.name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id"} +{"answer": "How many exhibitions has each artist had?\nAdditional table information: table: theme_gallery", "question": "SELECT T2.name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id"} +{"answer": "What is the name and country for the artist with most number of exhibitions?\nAdditional table information: table: theme_gallery", "question": "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"} +{"answer": "Return the name and country corresponding to the artist who has had the most exhibitions.\nAdditional table information: table: theme_gallery", "question": "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"} +{"answer": "Show names for artists without any exhibition.\nAdditional table information: table: theme_gallery", "question": "SELECT name FROM artist WHERE NOT artist_id IN (SELECT artist_id FROM exhibition)"} +{"answer": "What are the names of artists that have not had any exhibitions?\nAdditional table information: table: theme_gallery", "question": "SELECT name FROM artist WHERE NOT artist_id IN (SELECT artist_id FROM exhibition)"} +{"answer": "What is the theme and artist name for the exhibition with a ticket price higher than the average?\nAdditional table information: table: theme_gallery", "question": "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)"} +{"answer": "Return the names of artists and the themes of their exhibitions that had a ticket price higher than average.\nAdditional table information: table: theme_gallery", "question": "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)"} +{"answer": "Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009.\nAdditional table information: table: theme_gallery", "question": "SELECT AVG(ticket_price), MIN(ticket_price), MAX(ticket_price) FROM exhibition WHERE YEAR < 2009"} +{"answer": "What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009?\nAdditional table information: table: theme_gallery", "question": "SELECT AVG(ticket_price), MIN(ticket_price), MAX(ticket_price) FROM exhibition WHERE YEAR < 2009"} +{"answer": "Show theme and year for all exhibitions in an descending order of ticket price.\nAdditional table information: table: theme_gallery", "question": "SELECT theme, YEAR FROM exhibition ORDER BY ticket_price DESC"} +{"answer": "What are the themes and years for exhibitions, sorted by ticket price descending?\nAdditional table information: table: theme_gallery", "question": "SELECT theme, YEAR FROM exhibition ORDER BY ticket_price DESC"} +{"answer": "What is the theme, date, and attendance for the exhibition in year 2004?\nAdditional table information: table: theme_gallery", "question": "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"} +{"answer": "Return the themes, dates, and attendance for exhibitions that happened in 2004.\nAdditional table information: table: theme_gallery", "question": "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"} +{"answer": "Show all artist names who didn't have an exhibition in 2004.\nAdditional table information: table: theme_gallery", "question": "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"} +{"answer": "What are the names of artists who did not have an exhibition in 2004?\nAdditional table information: table: theme_gallery", "question": "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"} +{"answer": "Show the theme for exhibitions with both records of an attendance below 100 and above 500.\nAdditional table information: table: theme_gallery", "question": "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"} +{"answer": "Which themes have had corresponding exhibitions that have had attendance both below 100 and above 500?\nAdditional table information: table: theme_gallery", "question": "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"} +{"answer": "How many exhibitions have a attendance more than 100 or have a ticket price below 10?\nAdditional table information: table: theme_gallery", "question": "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"} +{"answer": "Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10.\nAdditional table information: table: theme_gallery", "question": "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"} +{"answer": "Show all artist names with an average exhibition attendance over 200.\nAdditional table information: table: theme_gallery", "question": "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"} +{"answer": "What are the names of artist whose exhibitions draw over 200 attendees on average?\nAdditional table information: table: theme_gallery", "question": "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"} +{"answer": "Find the id of the item whose title is 'orange'.\nAdditional table information: table: epinions_1", "question": "SELECT i_id FROM item WHERE title = 'orange'"} +{"answer": "List all information in the item table.\nAdditional table information: table: epinions_1", "question": "SELECT * FROM item"} +{"answer": "Find the number of reviews.\nAdditional table information: table: epinions_1", "question": "SELECT COUNT(*) FROM review"} +{"answer": "How many users are there?\nAdditional table information: table: epinions_1", "question": "SELECT COUNT(*) FROM useracct"} +{"answer": "Find the average and maximum rating of all reviews.\nAdditional table information: table: epinions_1", "question": "SELECT AVG(rating), MAX(rating) FROM review"} +{"answer": "Find the highest rank of all reviews.\nAdditional table information: table: epinions_1", "question": "SELECT MIN(rank) FROM review"} +{"answer": "How many different users wrote some reviews?\nAdditional table information: table: epinions_1", "question": "SELECT COUNT(DISTINCT u_id) FROM review"} +{"answer": "How many different items were reviewed by some users?\nAdditional table information: table: epinions_1", "question": "SELECT COUNT(DISTINCT i_id) FROM review"} +{"answer": "Find the number of items that did not receive any review.\nAdditional table information: table: epinions_1", "question": "SELECT COUNT(*) FROM item WHERE NOT i_id IN (SELECT i_id FROM review)"} +{"answer": "Find the names of users who did not leave any review.\nAdditional table information: table: epinions_1", "question": "SELECT name FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review)"} +{"answer": "Find the names of goods that receive a rating of 10.\nAdditional table information: table: epinions_1", "question": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating = 10"} +{"answer": "Find the titles of items whose rating is higher than the average review rating of all items.\nAdditional table information: table: epinions_1", "question": "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)"} +{"answer": "Find the titles of items that received any rating below 5.\nAdditional table information: table: epinions_1", "question": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5"} +{"answer": "Find the titles of items that received both a rating higher than 8 and a rating below 5.\nAdditional table information: table: epinions_1", "question": "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"} +{"answer": "Find the names of items whose rank is higher than 3 and whose average rating is above 5.\nAdditional table information: table: epinions_1", "question": "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"} +{"answer": "Find the name of the item with the lowest average rating.\nAdditional table information: table: epinions_1", "question": "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) NULLS FIRST LIMIT 1"} +{"answer": "List the titles of all items in alphabetic order .\nAdditional table information: table: epinions_1", "question": "SELECT title FROM item ORDER BY title NULLS FIRST"} +{"answer": "Find the name of the user who gives the most reviews.\nAdditional table information: table: epinions_1", "question": "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"} +{"answer": "Find the name and id of the item with the highest average rating.\nAdditional table information: table: epinions_1", "question": "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"} +{"answer": "Find the name and id of the good with the highest average rank.\nAdditional table information: table: epinions_1", "question": "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"} +{"answer": "For each user, return the name and the average rating of reviews given by them.\nAdditional table information: table: epinions_1", "question": "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"} +{"answer": "For each user, find their name and the number of reviews written by them.\nAdditional table information: table: epinions_1", "question": "SELECT T1.name, COUNT(*) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id"} +{"answer": "Find the name of the user who gave the highest rating.\nAdditional table information: table: epinions_1", "question": "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"} +{"answer": "Find the name of the source user with the highest average trust score.\nAdditional table information: table: epinions_1", "question": "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"} +{"answer": "Find each target user's name and average trust score.\nAdditional table information: table: epinions_1", "question": "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"} +{"answer": "Find the name of the target user with the lowest trust score.\nAdditional table information: table: epinions_1", "question": "SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id ORDER BY trust NULLS FIRST LIMIT 1"} +{"answer": "Find the names of the items that did not receive any review.\nAdditional table information: table: epinions_1", "question": "SELECT title FROM item WHERE NOT i_id IN (SELECT i_id FROM review)"} +{"answer": "Find the names of users who did not leave any review.\nAdditional table information: table: epinions_1", "question": "SELECT name FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review)"} +{"answer": "Find the number of users who did not write any review.\nAdditional table information: table: epinions_1", "question": "SELECT COUNT(*) FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review)"} +{"answer": "Find the number of items without any review.\nAdditional table information: table: epinions_1", "question": "SELECT COUNT(*) FROM item WHERE NOT i_id IN (SELECT i_id FROM review)"} +{"answer": "How many players are there?\nAdditional table information: table: riding_club", "question": "SELECT COUNT(*) FROM player"} +{"answer": "List the names of players in ascending order of votes.\nAdditional table information: table: riding_club", "question": "SELECT Player_name FROM player ORDER BY Votes ASC NULLS FIRST"} +{"answer": "What are the gender and occupation of players?\nAdditional table information: table: riding_club", "question": "SELECT Gender, Occupation FROM player"} +{"answer": "List the name and residence for players whose occupation is not 'Researcher'.\nAdditional table information: table: riding_club", "question": "SELECT Player_name, residence FROM player WHERE Occupation <> 'Researcher'"} +{"answer": "Show the names of sponsors of players whose residence is either 'Brandon' or 'Birtle'.\nAdditional table information: table: riding_club", "question": "SELECT Sponsor_name FROM player WHERE Residence = 'Brandon' OR Residence = 'Birtle'"} +{"answer": "What is the name of the player with the largest number of votes?\nAdditional table information: table: riding_club", "question": "SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1"} +{"answer": "Show different occupations along with the number of players in each occupation.\nAdditional table information: table: riding_club", "question": "SELECT Occupation, COUNT(*) FROM player GROUP BY Occupation"} +{"answer": "Please show the most common occupation of players.\nAdditional table information: table: riding_club", "question": "SELECT Occupation FROM player GROUP BY Occupation ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the residences that have at least two players.\nAdditional table information: table: riding_club", "question": "SELECT Residence FROM player GROUP BY Residence HAVING COUNT(*) >= 2"} +{"answer": "Show the names of players and names of their coaches.\nAdditional table information: table: riding_club", "question": "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"} +{"answer": "Show the names of players coached by the rank 1 coach.\nAdditional table information: table: riding_club", "question": "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"} +{"answer": "Show the names and genders of players with a coach starting after 2011.\nAdditional table information: table: riding_club", "question": "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"} +{"answer": "Show the names of players and names of their coaches in descending order of the votes of players.\nAdditional table information: table: riding_club", "question": "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"} +{"answer": "List the names of players that do not have coaches.\nAdditional table information: table: riding_club", "question": "SELECT Player_name FROM player WHERE NOT Player_ID IN (SELECT Player_ID FROM player_coach)"} +{"answer": "Show the residences that have both a player of gender 'M' and a player of gender 'F'.\nAdditional table information: table: riding_club", "question": "SELECT Residence FROM player WHERE gender = 'M' INTERSECT SELECT Residence FROM player WHERE gender = 'F'"} +{"answer": "How many coaches does each club has? List the club id, name and the number of coaches.\nAdditional table information: table: riding_club", "question": "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"} +{"answer": "How many gold medals has the club with the most coaches won?\nAdditional table information: table: riding_club", "question": "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"} +{"answer": "How many gymnasts are there?\nAdditional table information: table: gymnast", "question": "SELECT COUNT(*) FROM gymnast"} +{"answer": "Count the number of gymnasts.\nAdditional table information: table: gymnast", "question": "SELECT COUNT(*) FROM gymnast"} +{"answer": "List the total points of gymnasts in descending order.\nAdditional table information: table: gymnast", "question": "SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC"} +{"answer": "What are the total points for all gymnasts, ordered by total points descending?\nAdditional table information: table: gymnast", "question": "SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC"} +{"answer": "List the total points of gymnasts in descending order of floor exercise points.\nAdditional table information: table: gymnast", "question": "SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC"} +{"answer": "What are the total points of gymnasts, ordered by their floor exercise points descending?\nAdditional table information: table: gymnast", "question": "SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC"} +{"answer": "What is the average horizontal bar points for all gymnasts?\nAdditional table information: table: gymnast", "question": "SELECT AVG(Horizontal_Bar_Points) FROM gymnast"} +{"answer": "Return the average horizontal bar points across all gymnasts.\nAdditional table information: table: gymnast", "question": "SELECT AVG(Horizontal_Bar_Points) FROM gymnast"} +{"answer": "What are the names of people in ascending alphabetical order?\nAdditional table information: table: gymnast", "question": "SELECT Name FROM People ORDER BY Name ASC NULLS FIRST"} +{"answer": "Return the names of people, ordered alphabetically.\nAdditional table information: table: gymnast", "question": "SELECT Name FROM People ORDER BY Name ASC NULLS FIRST"} +{"answer": "What are the names of gymnasts?\nAdditional table information: table: gymnast", "question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID"} +{"answer": "Return the names of the gymnasts.\nAdditional table information: table: gymnast", "question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID"} +{"answer": "What are the names of gymnasts whose hometown is not 'Santo Domingo'?\nAdditional table information: table: gymnast", "question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown <> 'Santo Domingo'"} +{"answer": "Return the names of gymnasts who did not grow up in Santo Domingo.\nAdditional table information: table: gymnast", "question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown <> 'Santo Domingo'"} +{"answer": "What is the age of the tallest person?\nAdditional table information: table: gymnast", "question": "SELECT Age FROM people ORDER BY Height DESC LIMIT 1"} +{"answer": "Return the age of the person with the greatest height.\nAdditional table information: table: gymnast", "question": "SELECT Age FROM people ORDER BY Height DESC LIMIT 1"} +{"answer": "List the names of the top 5 oldest people.\nAdditional table information: table: gymnast", "question": "SELECT Name FROM People ORDER BY Age DESC LIMIT 5"} +{"answer": "What are the names of the five oldest people?\nAdditional table information: table: gymnast", "question": "SELECT Name FROM People ORDER BY Age DESC LIMIT 5"} +{"answer": "What is the total point count of the youngest gymnast?\nAdditional table information: table: gymnast", "question": "SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC NULLS FIRST LIMIT 1"} +{"answer": "Return the total points of the gymnast with the lowest age.\nAdditional table information: table: gymnast", "question": "SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC NULLS FIRST LIMIT 1"} +{"answer": "What is the average age of all gymnasts?\nAdditional table information: table: gymnast", "question": "SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID"} +{"answer": "Return the average age across all gymnasts.\nAdditional table information: table: gymnast", "question": "SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID"} +{"answer": "What are the distinct hometowns of gymnasts with total points more than 57.5?\nAdditional table information: table: gymnast", "question": "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"} +{"answer": "Give the different hometowns of gymnasts that have a total point score of above 57.5.\nAdditional table information: table: gymnast", "question": "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"} +{"answer": "What are the hometowns of gymnasts and the corresponding number of gymnasts?\nAdditional table information: table: gymnast", "question": "SELECT T2.Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown"} +{"answer": "How many gymnasts are from each hometown?\nAdditional table information: table: gymnast", "question": "SELECT T2.Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown"} +{"answer": "What is the most common hometown of gymnasts?\nAdditional table information: table: gymnast", "question": "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"} +{"answer": "Return the hometown that is most common among gymnasts.\nAdditional table information: table: gymnast", "question": "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"} +{"answer": "What are the hometowns that are shared by at least two gymnasts?\nAdditional table information: table: gymnast", "question": "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"} +{"answer": "Give the hometowns from which two or more gymnasts are from.\nAdditional table information: table: gymnast", "question": "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"} +{"answer": "List the names of gymnasts in ascending order by their heights.\nAdditional table information: table: gymnast", "question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC NULLS FIRST"} +{"answer": "What are the names of gymnasts, ordered by their heights ascending?\nAdditional table information: table: gymnast", "question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC NULLS FIRST"} +{"answer": "List the distinct hometowns that are not associated with any gymnast.\nAdditional table information: table: gymnast", "question": "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"} +{"answer": "From which hometowns did no gymnasts come from?\nAdditional table information: table: gymnast", "question": "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"} +{"answer": "Show the hometowns shared by people older than 23 and younger than 20.\nAdditional table information: table: gymnast", "question": "SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20"} +{"answer": "From which hometowns did both people older than 23 and younger than 20 come from?\nAdditional table information: table: gymnast", "question": "SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20"} +{"answer": "How many distinct hometowns did these people have?\nAdditional table information: table: gymnast", "question": "SELECT COUNT(DISTINCT Hometown) FROM people"} +{"answer": "Count the number of different hometowns of these people.\nAdditional table information: table: gymnast", "question": "SELECT COUNT(DISTINCT Hometown) FROM people"} +{"answer": "Show the ages of gymnasts in descending order of total points.\nAdditional table information: table: gymnast", "question": "SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC"} +{"answer": "What are the ages of the gymnasts, ordered descending by their total points?\nAdditional table information: table: gymnast", "question": "SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC"} +{"answer": "Find the total savings balance of all accounts except the account with name \u2018Brown\u2019.\nAdditional table information: table: small_bank_1", "question": "SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown'"} +{"answer": "What is the total balance of savings accounts not belonging to someone with the name Brown?\nAdditional table information: table: small_bank_1", "question": "SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown'"} +{"answer": "How many accounts are there in total?\nAdditional table information: table: small_bank_1", "question": "SELECT COUNT(*) FROM accounts"} +{"answer": "Count the number of accounts.\nAdditional table information: table: small_bank_1", "question": "SELECT COUNT(*) FROM accounts"} +{"answer": "What is the total checking balance in all accounts?\nAdditional table information: table: small_bank_1", "question": "SELECT SUM(balance) FROM checking"} +{"answer": "Find the total balance across checking accounts.\nAdditional table information: table: small_bank_1", "question": "SELECT SUM(balance) FROM checking"} +{"answer": "Find the average checking balance.\nAdditional table information: table: small_bank_1", "question": "SELECT AVG(balance) FROM checking"} +{"answer": "What is the average balance in checking accounts?\nAdditional table information: table: small_bank_1", "question": "SELECT AVG(balance) FROM checking"} +{"answer": "How many accounts have a savings balance above the average savings balance?\nAdditional table information: table: small_bank_1", "question": "SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings)"} +{"answer": "Find the number of accounts with a savings balance that is higher than the average savings balance.\nAdditional table information: table: small_bank_1", "question": "SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings)"} +{"answer": "Find the name and id of accounts whose checking balance is below the maximum checking balance.\nAdditional table information: table: small_bank_1", "question": "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)"} +{"answer": "What are the customer id and name corresponding to accounts with a checking balance less than the largest checking balance?\nAdditional table information: table: small_bank_1", "question": "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)"} +{"answer": "What is the checking balance of the account whose owner\u2019s name contains the substring \u2018ee\u2019?\nAdditional table information: table: small_bank_1", "question": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%'"} +{"answer": "Find the balance of the checking account belonging to an owner whose name contains 'ee'.\nAdditional table information: table: small_bank_1", "question": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%'"} +{"answer": "Find the checking balance and saving balance in the Brown\u2019s account.\nAdditional table information: table: small_bank_1", "question": "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'"} +{"answer": "What are the checking and savings balances in accounts belonging to Brown?\nAdditional table information: table: small_bank_1", "question": "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'"} +{"answer": "Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance.\nAdditional table information: table: small_bank_1", "question": "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)"} +{"answer": "What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance?\nAdditional table information: table: small_bank_1", "question": "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)"} +{"answer": "Find the checking balance of the accounts whose savings balance is higher than the average savings balance.\nAdditional table information: table: small_bank_1", "question": "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))"} +{"answer": "What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance?\nAdditional table information: table: small_bank_1", "question": "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))"} +{"answer": "List all customers\u2019 names in the alphabetical order.\nAdditional table information: table: small_bank_1", "question": "SELECT name FROM accounts ORDER BY name NULLS FIRST"} +{"answer": "What are the names of all the customers in alphabetical order?\nAdditional table information: table: small_bank_1", "question": "SELECT name FROM accounts ORDER BY name NULLS FIRST"} +{"answer": "Find the name of account that has the lowest total checking and saving balance.\nAdditional table information: table: small_bank_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the name corresponding to the accoung with the lowest sum of checking and savings balances?\nAdditional table information: table: small_bank_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.\nAdditional table information: table: small_bank_1", "question": "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)"} +{"answer": "What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance?\nAdditional table information: table: small_bank_1", "question": "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)"} +{"answer": "Find the name and checking balance of the account with the lowest savings balance.\nAdditional table information: table: small_bank_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What are the names and balances of checking accounts belonging to the customer with the lowest savings balance?\nAdditional table information: table: small_bank_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Find the number of checking accounts for each account name.\nAdditional table information: table: small_bank_1", "question": "SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name"} +{"answer": "What are the names of customers with accounts, and how many checking accounts do each of them have?\nAdditional table information: table: small_bank_1", "question": "SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name"} +{"answer": "Find the total saving balance for each account name.\nAdditional table information: table: small_bank_1", "question": "SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name"} +{"answer": "What are the names of customers with accounts, and what are the total savings balances for each?\nAdditional table information: table: small_bank_1", "question": "SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name"} +{"answer": "Find the name of accounts whose checking balance is below the average checking balance.\nAdditional table information: table: small_bank_1", "question": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking)"} +{"answer": "What are the names of customers with checking balances lower than the average checking balance?\nAdditional table information: table: small_bank_1", "question": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking)"} +{"answer": "Find the saving balance of the account with the highest checking balance.\nAdditional table information: table: small_bank_1", "question": "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"} +{"answer": "What is the savings balance of the account belonging to the customer with the highest checking balance?\nAdditional table information: table: small_bank_1", "question": "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"} +{"answer": "Find the total checking and saving balance of all accounts sorted by the total balance in ascending order.\nAdditional table information: table: small_bank_1", "question": "SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance NULLS FIRST"} +{"answer": "What is the sum of checking and savings balances for all customers, ordered by the total balance?\nAdditional table information: table: small_bank_1", "question": "SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance NULLS FIRST"} +{"answer": "Find the name and checking balance of the account with the lowest saving balance.\nAdditional table information: table: small_bank_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the name and checking balance of the account which has the lowest savings balance?\nAdditional table information: table: small_bank_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Find the name, checking balance and saving balance of all accounts in the bank.\nAdditional table information: table: small_bank_1", "question": "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"} +{"answer": "What are the names, checking balances, and savings balances for all customers?\nAdditional table information: table: small_bank_1", "question": "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"} +{"answer": "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.\nAdditional table information: table: small_bank_1", "question": "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"} +{"answer": "What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending?\nAdditional table information: table: small_bank_1", "question": "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"} +{"answer": "Find the name of accounts whose checking balance is higher than corresponding saving balance.\nAdditional table information: table: small_bank_1", "question": "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"} +{"answer": "What are the names of customers with a higher checking balance than savings balance?\nAdditional table information: table: small_bank_1", "question": "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"} +{"answer": "Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.\nAdditional table information: table: small_bank_1", "question": "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"} +{"answer": "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?\nAdditional table information: table: small_bank_1", "question": "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"} +{"answer": "Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.\nAdditional table information: table: small_bank_1", "question": "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"} +{"answer": "What are names and savings balances of the three accounts with the highest savings balances?\nAdditional table information: table: small_bank_1", "question": "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"} +{"answer": "How many main stream browsers whose market share is at least 5 exist?\nAdditional table information: table: browser_web", "question": "SELECT COUNT(*) FROM browser WHERE market_share >= 5"} +{"answer": "List the name of browsers in descending order by market share.\nAdditional table information: table: browser_web", "question": "SELECT name FROM browser ORDER BY market_share DESC"} +{"answer": "List the ids, names and market shares of all browsers.\nAdditional table information: table: browser_web", "question": "SELECT id, name, market_share FROM browser"} +{"answer": "What is the maximum, minimum and average market share of the listed browsers?\nAdditional table information: table: browser_web", "question": "SELECT MAX(market_share), MIN(market_share), AVG(market_share) FROM browser"} +{"answer": "What is the id and market share of the browser Safari?\nAdditional table information: table: browser_web", "question": "SELECT id, market_share FROM browser WHERE name = 'Safari'"} +{"answer": "What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?\nAdditional table information: table: browser_web", "question": "SELECT name, operating_system FROM web_client_accelerator WHERE CONNECTION <> 'Broadband'"} +{"answer": "What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?\nAdditional table information: table: browser_web", "question": "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"} +{"answer": "What are the ids and names of the web accelerators that are compatible with two or more browsers?\nAdditional table information: table: browser_web", "question": "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"} +{"answer": "What is the id and name of the browser that is compatible with the most web accelerators?\nAdditional table information: table: browser_web", "question": "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"} +{"answer": "When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?\nAdditional table information: table: browser_web", "question": "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'"} +{"answer": "How many different kinds of clients are supported by the web clients accelerators?\nAdditional table information: table: browser_web", "question": "SELECT COUNT(DISTINCT client) FROM web_client_accelerator"} +{"answer": "How many accelerators are not compatible with the browsers listed ?\nAdditional table information: table: browser_web", "question": "SELECT COUNT(*) FROM web_client_accelerator WHERE NOT id IN (SELECT accelerator_id FROM accelerator_compatible_browser)"} +{"answer": "What distinct accelerator names are compatible with the browswers that have market share higher than 15?\nAdditional table information: table: browser_web", "question": "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"} +{"answer": "List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.\nAdditional table information: table: browser_web", "question": "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'"} +{"answer": "Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'.\nAdditional table information: table: browser_web", "question": "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'"} +{"answer": "Which accelerator name contains substring 'Opera'?\nAdditional table information: table: browser_web", "question": "SELECT name FROM web_client_accelerator WHERE name LIKE '%Opera%'"} +{"answer": "Find the number of web accelerators used for each Operating system.\nAdditional table information: table: browser_web", "question": "SELECT Operating_system, COUNT(*) FROM web_client_accelerator GROUP BY Operating_system"} +{"answer": "give me names of all compatible browsers and accelerators in the descending order of compatible year\nAdditional table information: table: browser_web", "question": "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"} +{"answer": "How many wrestlers are there?\nAdditional table information: table: wrestler", "question": "SELECT COUNT(*) FROM wrestler"} +{"answer": "Count the number of wrestlers.\nAdditional table information: table: wrestler", "question": "SELECT COUNT(*) FROM wrestler"} +{"answer": "List the names of wrestlers in descending order of days held.\nAdditional table information: table: wrestler", "question": "SELECT Name FROM wrestler ORDER BY Days_held DESC"} +{"answer": "What are the names of the wrestlers, ordered descending by days held?\nAdditional table information: table: wrestler", "question": "SELECT Name FROM wrestler ORDER BY Days_held DESC"} +{"answer": "What is the name of the wrestler with the fewest days held?\nAdditional table information: table: wrestler", "question": "SELECT Name FROM wrestler ORDER BY Days_held ASC NULLS FIRST LIMIT 1"} +{"answer": "Return the name of the wrestler who had the lowest number of days held.\nAdditional table information: table: wrestler", "question": "SELECT Name FROM wrestler ORDER BY Days_held ASC NULLS FIRST LIMIT 1"} +{"answer": "What are the distinct reigns of wrestlers whose location is not 'Tokyo,Japan' ?\nAdditional table information: table: wrestler", "question": "SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> 'Tokyo , Japan'"} +{"answer": "Give the different reigns of wrestlers who are not located in Tokyo, Japan.\nAdditional table information: table: wrestler", "question": "SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> 'Tokyo , Japan'"} +{"answer": "What are the names and location of the wrestlers?\nAdditional table information: table: wrestler", "question": "SELECT Name, LOCATION FROM wrestler"} +{"answer": "Give the names and locations of all wrestlers.\nAdditional table information: table: wrestler", "question": "SELECT Name, LOCATION FROM wrestler"} +{"answer": "What are the elimination moves of wrestlers whose team is 'Team Orton'?\nAdditional table information: table: wrestler", "question": "SELECT Elimination_Move FROM Elimination WHERE Team = 'Team Orton'"} +{"answer": "Return the elimination movies of wrestlers on Team Orton.\nAdditional table information: table: wrestler", "question": "SELECT Elimination_Move FROM Elimination WHERE Team = 'Team Orton'"} +{"answer": "What are the names of wrestlers and the elimination moves?\nAdditional table information: table: wrestler", "question": "SELECT T2.Name, T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID"} +{"answer": "Give the names of wrestlers and their elimination moves.\nAdditional table information: table: wrestler", "question": "SELECT T2.Name, T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID"} +{"answer": "List the names of wrestlers and the teams in elimination in descending order of days held.\nAdditional table information: table: wrestler", "question": "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"} +{"answer": "What are the names of wrestlers and their teams in elimination, ordered descending by days held?\nAdditional table information: table: wrestler", "question": "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"} +{"answer": "List the time of elimination of the wrestlers with largest days held.\nAdditional table information: table: wrestler", "question": "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"} +{"answer": "What is the time of elimination for the wrestler with the most days held?\nAdditional table information: table: wrestler", "question": "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"} +{"answer": "Show times of elimination of wrestlers with days held more than 50.\nAdditional table information: table: wrestler", "question": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50"} +{"answer": "What are the times of elimination for wrestlers with over 50 days held?\nAdditional table information: table: wrestler", "question": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50"} +{"answer": "Show different teams in eliminations and the number of eliminations from each team.\nAdditional table information: table: wrestler", "question": "SELECT Team, COUNT(*) FROM elimination GROUP BY Team"} +{"answer": "How many eliminations did each team have?\nAdditional table information: table: wrestler", "question": "SELECT Team, COUNT(*) FROM elimination GROUP BY Team"} +{"answer": "Show teams that have suffered more than three eliminations.\nAdditional table information: table: wrestler", "question": "SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3"} +{"answer": "Which teams had more than 3 eliminations?\nAdditional table information: table: wrestler", "question": "SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3"} +{"answer": "Show the reign and days held of wrestlers.\nAdditional table information: table: wrestler", "question": "SELECT Reign, Days_held FROM wrestler"} +{"answer": "What are the reigns and days held of all wrestlers?\nAdditional table information: table: wrestler", "question": "SELECT Reign, Days_held FROM wrestler"} +{"answer": "What are the names of wrestlers days held less than 100?\nAdditional table information: table: wrestler", "question": "SELECT Name FROM wrestler WHERE Days_held < 100"} +{"answer": "Return the names of wrestlers with fewer than 100 days held.\nAdditional table information: table: wrestler", "question": "SELECT Name FROM wrestler WHERE Days_held < 100"} +{"answer": "Please show the most common reigns of wrestlers.\nAdditional table information: table: wrestler", "question": "SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which reign is the most common among wrestlers?\nAdditional table information: table: wrestler", "question": "SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the locations that are shared by more than two wrestlers.\nAdditional table information: table: wrestler", "question": "SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2"} +{"answer": "Which locations are shared by more than two wrestlers?\nAdditional table information: table: wrestler", "question": "SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2"} +{"answer": "List the names of wrestlers that have not been eliminated.\nAdditional table information: table: wrestler", "question": "SELECT Name FROM wrestler WHERE NOT Wrestler_ID IN (SELECT Wrestler_ID FROM elimination)"} +{"answer": "What are the names of wrestlers who have never been eliminated?\nAdditional table information: table: wrestler", "question": "SELECT Name FROM wrestler WHERE NOT Wrestler_ID IN (SELECT Wrestler_ID FROM elimination)"} +{"answer": "Show the teams that have both wrestlers eliminated by 'Orton' and wrestlers eliminated by 'Benjamin'.\nAdditional table information: table: wrestler", "question": "SELECT Team FROM Elimination WHERE Eliminated_By = 'Orton' INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = 'Benjamin'"} +{"answer": "What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin?\nAdditional table information: table: wrestler", "question": "SELECT Team FROM Elimination WHERE Eliminated_By = 'Orton' INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = 'Benjamin'"} +{"answer": "What is the number of distinct teams that suffer elimination?\nAdditional table information: table: wrestler", "question": "SELECT COUNT(DISTINCT team) FROM elimination"} +{"answer": "How many different teams have had eliminated wrestlers?\nAdditional table information: table: wrestler", "question": "SELECT COUNT(DISTINCT team) FROM elimination"} +{"answer": "Show the times of elimination by 'Punk' or 'Orton'.\nAdditional table information: table: wrestler", "question": "SELECT TIME FROM elimination WHERE Eliminated_By = 'Punk' OR Eliminated_By = 'Orton'"} +{"answer": "What are the times of elimination for any instances in which the elimination was done by Punk or Orton?\nAdditional table information: table: wrestler", "question": "SELECT TIME FROM elimination WHERE Eliminated_By = 'Punk' OR Eliminated_By = 'Orton'"} +{"answer": "How many schools are there?\nAdditional table information: table: school_finance", "question": "SELECT COUNT(*) FROM school"} +{"answer": "Count the number of schools.\nAdditional table information: table: school_finance", "question": "SELECT COUNT(*) FROM school"} +{"answer": "Show all school names in alphabetical order.\nAdditional table information: table: school_finance", "question": "SELECT school_name FROM school ORDER BY school_name NULLS FIRST"} +{"answer": "List the name, location, mascot for all schools.\nAdditional table information: table: school_finance", "question": "SELECT school_name, LOCATION, mascot FROM school"} +{"answer": "What are the total and average enrollment of all schools?\nAdditional table information: table: school_finance", "question": "SELECT SUM(enrollment), AVG(enrollment) FROM school"} +{"answer": "What are the mascots for schools with enrollments above the average?\nAdditional table information: table: school_finance", "question": "SELECT mascot FROM school WHERE enrollment > (SELECT AVG(enrollment) FROM school)"} +{"answer": "List the name of the school with the smallest enrollment.\nAdditional table information: table: school_finance", "question": "SELECT school_name FROM school ORDER BY enrollment NULLS FIRST LIMIT 1"} +{"answer": "Show the average, maximum, minimum enrollment of all schools.\nAdditional table information: table: school_finance", "question": "SELECT AVG(enrollment), MAX(enrollment), MIN(enrollment) FROM school"} +{"answer": "Show each county along with the number of schools and total enrollment in each county.\nAdditional table information: table: school_finance", "question": "SELECT county, COUNT(*), SUM(enrollment) FROM school GROUP BY county"} +{"answer": "How many donors have endowment for school named 'Glenn'?\nAdditional table information: table: school_finance", "question": "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'"} +{"answer": "List each donator name and the amount of endowment in descending order of the amount of endowment.\nAdditional table information: table: school_finance", "question": "SELECT donator_name, SUM(amount) FROM endowment GROUP BY donator_name ORDER BY SUM(amount) DESC"} +{"answer": "List the names of the schools without any endowment.\nAdditional table information: table: school_finance", "question": "SELECT school_name FROM school WHERE NOT school_id IN (SELECT school_id FROM endowment)"} +{"answer": "List all the names of schools with an endowment amount smaller than or equal to 10.\nAdditional table information: table: school_finance", "question": "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"} +{"answer": "Show the names of donors who donated to both school 'Glenn' and 'Triton.'\nAdditional table information: table: school_finance", "question": "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'"} +{"answer": "Show the names of all the donors except those whose donation amount less than 9.\nAdditional table information: table: school_finance", "question": "SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount < 9"} +{"answer": "List the amount and donor name for the largest amount of donation.\nAdditional table information: table: school_finance", "question": "SELECT amount, donator_name FROM endowment ORDER BY amount DESC LIMIT 1"} +{"answer": "How many budgets are above 3000 in year 2001 or before?\nAdditional table information: table: school_finance", "question": "SELECT COUNT(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001"} +{"answer": "Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000\nAdditional table information: table: school_finance", "question": "SELECT COUNT(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001"} +{"answer": "Show each school name, its budgeted amount, and invested amount in year 2002 or after.\nAdditional table information: table: school_finance", "question": "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"} +{"answer": "Show all donor names.\nAdditional table information: table: school_finance", "question": "SELECT DISTINCT donator_name FROM endowment"} +{"answer": "How many budget record has a budget amount smaller than the invested amount?\nAdditional table information: table: school_finance", "question": "SELECT COUNT(*) FROM budget WHERE budgeted < invested"} +{"answer": "What is the total budget amount for school 'Glenn' in all years?\nAdditional table information: table: school_finance", "question": "SELECT SUM(T1.budgeted) FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn'"} +{"answer": "Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10.\nAdditional table information: table: school_finance", "question": "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"} +{"answer": "Find the names of schools that have more than one donator with donation amount above 8.5.\nAdditional table information: table: school_finance", "question": "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"} +{"answer": "Find the number of schools that have more than one donator whose donation amount is less than 8.5.\nAdditional table information: table: school_finance", "question": "SELECT COUNT(*) FROM (SELECT * FROM endowment WHERE amount > 8.5 GROUP BY school_id HAVING COUNT(*) > 1)"} +{"answer": "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.\nAdditional table information: table: school_finance", "question": "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 NULLS FIRST, T2.total_budget_percent_budgeted NULLS FIRST"} +{"answer": "How many buildings are there?\nAdditional table information: table: protein_institute", "question": "SELECT COUNT(*) FROM building"} +{"answer": "Show the name, street address, and number of floors for all buildings ordered by the number of floors.\nAdditional table information: table: protein_institute", "question": "SELECT name, street_address, floors FROM building ORDER BY floors NULLS FIRST"} +{"answer": "What is the name of the tallest building?\nAdditional table information: table: protein_institute", "question": "SELECT name FROM building ORDER BY height_feet DESC LIMIT 1"} +{"answer": "What are the average, maximum, and minimum number of floors for all buildings?\nAdditional table information: table: protein_institute", "question": "SELECT AVG(floors), MAX(floors), MIN(floors) FROM building"} +{"answer": "Show the number of buildings with a height above the average or a number of floors above the average.\nAdditional table information: table: protein_institute", "question": "SELECT COUNT(*) FROM building WHERE height_feet > (SELECT AVG(height_feet) FROM building) OR floors > (SELECT AVG(floors) FROM building)"} +{"answer": "List the names of buildings with at least 200 feet of height and with at least 20 floors.\nAdditional table information: table: protein_institute", "question": "SELECT name FROM building WHERE height_feet >= 200 AND floors >= 20"} +{"answer": "Show the names and locations of institutions that are founded after 1990 and have the type 'Private'.\nAdditional table information: table: protein_institute", "question": "SELECT institution, LOCATION FROM institution WHERE founded > 1990 AND TYPE = 'Private'"} +{"answer": "Show institution types, along with the number of institutions and total enrollment for each type.\nAdditional table information: table: protein_institute", "question": "SELECT TYPE, COUNT(*), SUM(enrollment) FROM institution GROUP BY TYPE"} +{"answer": "Show the institution type with the largest number of institutions.\nAdditional table information: table: protein_institute", "question": "SELECT TYPE FROM institution GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment.\nAdditional table information: table: protein_institute", "question": "SELECT TYPE FROM institution WHERE founded > 1990 AND enrollment >= 1000"} +{"answer": "Show the name of buildings that do not have any institution.\nAdditional table information: table: protein_institute", "question": "SELECT name FROM building WHERE NOT building_id IN (SELECT building_id FROM institution)"} +{"answer": "Show the names of buildings except for those having an institution founded in 2003.\nAdditional table information: table: protein_institute", "question": "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"} +{"answer": "For each building, show the name of the building and the number of institutions in it.\nAdditional table information: table: protein_institute", "question": "SELECT T1.name, COUNT(*) FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id GROUP BY T1.building_id"} +{"answer": "Show the names and heights of buildings with at least two institutions founded after 1880.\nAdditional table information: table: protein_institute", "question": "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"} +{"answer": "Show all the distinct institution types.\nAdditional table information: table: protein_institute", "question": "SELECT DISTINCT TYPE FROM institution"} +{"answer": "Show institution names along with the number of proteins for each institution.\nAdditional table information: table: protein_institute", "question": "SELECT T1.institution, COUNT(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id GROUP BY T1.institution_id"} +{"answer": "How many proteins are associated with an institution founded after 1880 or an institution with type 'Private'?\nAdditional table information: table: protein_institute", "question": "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'"} +{"answer": "Show the protein name and the institution name.\nAdditional table information: table: protein_institute", "question": "SELECT T2.protein_name, T1.institution FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id"} +{"answer": "How many proteins are associated with an institution in a building with at least 20 floors?\nAdditional table information: table: protein_institute", "question": "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"} +{"answer": "How many institutions do not have an associated protein in our record?\nAdditional table information: table: protein_institute", "question": "SELECT COUNT(*) FROM institution WHERE NOT institution_id IN (SELECT institution_id FROM protein)"} +{"answer": "Show all the locations where no cinema has capacity over 800.\nAdditional table information: table: cinema", "question": "SELECT LOCATION FROM cinema EXCEPT SELECT LOCATION FROM cinema WHERE capacity > 800"} +{"answer": "Show all the locations where some cinemas were opened in both year 2010 and year 2011.\nAdditional table information: table: cinema", "question": "SELECT LOCATION FROM cinema WHERE openning_year = 2010 INTERSECT SELECT LOCATION FROM cinema WHERE openning_year = 2011"} +{"answer": "How many cinema do we have?\nAdditional table information: table: cinema", "question": "SELECT COUNT(*) FROM cinema"} +{"answer": "Count the number of cinemas.\nAdditional table information: table: cinema", "question": "SELECT COUNT(*) FROM cinema"} +{"answer": "Show name, opening year, and capacity for each cinema.\nAdditional table information: table: cinema", "question": "SELECT name, openning_year, capacity FROM cinema"} +{"answer": "Show the cinema name and location for cinemas with capacity above average.\nAdditional table information: table: cinema", "question": "SELECT name, LOCATION FROM cinema WHERE capacity > (SELECT AVG(capacity) FROM cinema)"} +{"answer": "What are all the locations with a cinema?\nAdditional table information: table: cinema", "question": "SELECT DISTINCT LOCATION FROM cinema"} +{"answer": "Find the distinct locations that has a cinema.\nAdditional table information: table: cinema", "question": "SELECT DISTINCT LOCATION FROM cinema"} +{"answer": "Show all the cinema names and opening years in descending order of opening year.\nAdditional table information: table: cinema", "question": "SELECT name, openning_year FROM cinema ORDER BY openning_year DESC"} +{"answer": "What are the name and location of the cinema with the largest capacity?\nAdditional table information: table: cinema", "question": "SELECT name, LOCATION FROM cinema ORDER BY capacity DESC LIMIT 1"} +{"answer": "Show the average, minimum, and maximum capacity for all the cinemas opened in year 2011 or later.\nAdditional table information: table: cinema", "question": "SELECT AVG(capacity), MIN(capacity), MAX(capacity) FROM cinema WHERE openning_year >= 2011"} +{"answer": "Show each location and the number of cinemas there.\nAdditional table information: table: cinema", "question": "SELECT LOCATION, COUNT(*) FROM cinema GROUP BY LOCATION"} +{"answer": "What is the location with the most cinemas opened in year 2010 or later?\nAdditional table information: table: cinema", "question": "SELECT LOCATION FROM cinema WHERE openning_year >= 2010 GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show all the locations with at least two cinemas with capacity above 300.\nAdditional table information: table: cinema", "question": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) >= 2"} +{"answer": "Which locations have 2 or more cinemas with capacity over 300?\nAdditional table information: table: cinema", "question": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) >= 2"} +{"answer": "Show the title and director for all films.\nAdditional table information: table: cinema", "question": "SELECT title, directed_by FROM film"} +{"answer": "What are the title and director of each film?\nAdditional table information: table: cinema", "question": "SELECT title, directed_by FROM film"} +{"answer": "Show all directors.\nAdditional table information: table: cinema", "question": "SELECT DISTINCT directed_by FROM film"} +{"answer": "Who are all the directors?\nAdditional table information: table: cinema", "question": "SELECT DISTINCT directed_by FROM film"} +{"answer": "List all directors along with the number of films directed by each director.\nAdditional table information: table: cinema", "question": "SELECT directed_by, COUNT(*) FROM film GROUP BY directed_by"} +{"answer": "What is total number of show times per dat for each cinema?\nAdditional table information: table: cinema", "question": "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"} +{"answer": "What are the title and maximum price of each film?\nAdditional table information: table: cinema", "question": "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"} +{"answer": "Give me the title and highest price for each film.\nAdditional table information: table: cinema", "question": "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"} +{"answer": "Show cinema name, film title, date, and price for each record in schedule.\nAdditional table information: table: cinema", "question": "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"} +{"answer": "What are the title and director of the films without any schedule?\nAdditional table information: table: cinema", "question": "SELECT title, directed_by FROM film WHERE NOT film_id IN (SELECT film_id FROM schedule)"} +{"answer": "Show director with the largest number of show times in total.\nAdditional table information: table: cinema", "question": "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"} +{"answer": "Find the locations that have more than one movie theater with capacity above 300.\nAdditional table information: table: cinema", "question": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) > 1"} +{"answer": "In which locations are there more than one movie theater with capacity above 300?\nAdditional table information: table: cinema", "question": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) > 1"} +{"answer": "How many films have the word 'Dummy' in their titles?\nAdditional table information: table: cinema", "question": "SELECT COUNT(*) FROM film WHERE title LIKE '%Dummy%'"} +{"answer": "Count the number of films whose title contains the word 'Dummy'.\nAdditional table information: table: cinema", "question": "SELECT COUNT(*) FROM film WHERE title LIKE '%Dummy%'"} +{"answer": "Are the customers holding coupons with amount 500 bad or good?\nAdditional table information: table: products_for_hire", "question": "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"} +{"answer": "How many bookings did each customer make? List the customer id, first name, and the count.\nAdditional table information: table: products_for_hire", "question": "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"} +{"answer": "What is the maximum total amount paid by a customer? List the customer id and amount.\nAdditional table information: table: products_for_hire", "question": "SELECT customer_id, SUM(amount_paid) FROM Payments GROUP BY customer_id ORDER BY SUM(amount_paid) DESC LIMIT 1"} +{"answer": "What are the id and the amount of refund of the booking that incurred the most times of payments?\nAdditional table information: table: products_for_hire", "question": "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"} +{"answer": "What is the id of the product that is booked for 3 times?\nAdditional table information: table: products_for_hire", "question": "SELECT product_id FROM products_booked GROUP BY product_id HAVING COUNT(*) = 3"} +{"answer": "What is the product description of the product booked with an amount of 102.76?\nAdditional table information: table: products_for_hire", "question": "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"} +{"answer": "What are the start date and end date of the booking that has booked the product named 'Book collection A'?\nAdditional table information: table: products_for_hire", "question": "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'"} +{"answer": "What are the names of products whose availability equals to 1?\nAdditional table information: table: products_for_hire", "question": "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"} +{"answer": "How many different product types are there?\nAdditional table information: table: products_for_hire", "question": "SELECT COUNT(DISTINCT product_type_code) FROM products_for_hire"} +{"answer": "What are the first name, last name, and gender of all the good customers? Order by their last name.\nAdditional table information: table: products_for_hire", "question": "SELECT first_name, last_name, gender_mf FROM customers WHERE good_or_bad_customer = 'good' ORDER BY last_name NULLS FIRST"} +{"answer": "What is the average amount due for all the payments?\nAdditional table information: table: products_for_hire", "question": "SELECT AVG(amount_due) FROM payments"} +{"answer": "What are the maximum, minimum, and average booked count for the products booked?\nAdditional table information: table: products_for_hire", "question": "SELECT MAX(booked_count), MIN(booked_count), AVG(booked_count) FROM products_booked"} +{"answer": "What are all the distinct payment types?\nAdditional table information: table: products_for_hire", "question": "SELECT DISTINCT payment_type_code FROM payments"} +{"answer": "What are the daily hire costs for the products with substring 'Book' in its name?\nAdditional table information: table: products_for_hire", "question": "SELECT daily_hire_cost FROM Products_for_hire WHERE product_name LIKE '%Book%'"} +{"answer": "How many products are never booked with amount higher than 200?\nAdditional table information: table: products_for_hire", "question": "SELECT COUNT(*) FROM Products_for_hire WHERE NOT product_id IN (SELECT product_id FROM products_booked WHERE booked_amount > 200)"} +{"answer": "What are the coupon amount of the coupons owned by both good and bad customers?\nAdditional table information: table: products_for_hire", "question": "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'"} +{"answer": "What are the payment date of the payment with amount paid higher than 300 or with payment type is 'Check'\nAdditional table information: table: products_for_hire", "question": "SELECT payment_date FROM payments WHERE amount_paid > 300 OR payment_type_code = 'Check'"} +{"answer": "What are the names and descriptions of the products that are of 'Cutlery' type and have daily hire cost lower than 20?\nAdditional table information: table: products_for_hire", "question": "SELECT product_name, product_description FROM products_for_hire WHERE product_type_code = 'Cutlery' AND daily_hire_cost < 20"} +{"answer": "How many phones are there?\nAdditional table information: table: phone_market", "question": "SELECT COUNT(*) FROM phone"} +{"answer": "List the names of phones in ascending order of price.\nAdditional table information: table: phone_market", "question": "SELECT Name FROM phone ORDER BY Price ASC NULLS FIRST"} +{"answer": "What are the memories and carriers of phones?\nAdditional table information: table: phone_market", "question": "SELECT Memory_in_G, Carrier FROM phone"} +{"answer": "List the distinct carriers of phones with memories bigger than 32.\nAdditional table information: table: phone_market", "question": "SELECT DISTINCT Carrier FROM phone WHERE Memory_in_G > 32"} +{"answer": "Show the names of phones with carrier either 'Sprint' or 'TMobile'.\nAdditional table information: table: phone_market", "question": "SELECT Name FROM phone WHERE Carrier = 'Sprint' OR Carrier = 'TMobile'"} +{"answer": "What is the carrier of the most expensive phone?\nAdditional table information: table: phone_market", "question": "SELECT Carrier FROM phone ORDER BY Price DESC LIMIT 1"} +{"answer": "Show different carriers of phones together with the number of phones with each carrier.\nAdditional table information: table: phone_market", "question": "SELECT Carrier, COUNT(*) FROM phone GROUP BY Carrier"} +{"answer": "Show the most frequently used carrier of the phones.\nAdditional table information: table: phone_market", "question": "SELECT Carrier FROM phone GROUP BY Carrier ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the carriers that have both phones with memory smaller than 32 and phones with memory bigger than 64.\nAdditional table information: table: phone_market", "question": "SELECT Carrier FROM phone WHERE Memory_in_G < 32 INTERSECT SELECT Carrier FROM phone WHERE Memory_in_G > 64"} +{"answer": "Show the names of phones and the districts of markets they are on.\nAdditional table information: table: phone_market", "question": "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"} +{"answer": "Show the names of phones and the districts of markets they are on, in ascending order of the ranking of the market.\nAdditional table information: table: phone_market", "question": "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 NULLS FIRST"} +{"answer": "Show the names of phones that are on market with number of shops greater than 50.\nAdditional table information: table: phone_market", "question": "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"} +{"answer": "For each phone, show its names and total number of stocks.\nAdditional table information: table: phone_market", "question": "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"} +{"answer": "Show the names of phones that have total number of stocks bigger than 2000, in descending order of the total number of stocks.\nAdditional table information: table: phone_market", "question": "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"} +{"answer": "List the names of phones that are not on any market.\nAdditional table information: table: phone_market", "question": "SELECT Name FROM phone WHERE NOT Phone_id IN (SELECT Phone_ID FROM phone_market)"} +{"answer": "How many gas companies are there?\nAdditional table information: table: gas_company", "question": "SELECT COUNT(*) FROM company"} +{"answer": "What is the total number of companies?\nAdditional table information: table: gas_company", "question": "SELECT COUNT(*) FROM company"} +{"answer": "List the company name and rank for all companies in the decreasing order of their sales.\nAdditional table information: table: gas_company", "question": "SELECT company, rank FROM company ORDER BY Sales_billion DESC"} +{"answer": "What is the name and rank of every company ordered by descending number of sales?\nAdditional table information: table: gas_company", "question": "SELECT company, rank FROM company ORDER BY Sales_billion DESC"} +{"answer": "Show the company name and the main industry for all companies whose headquarters are not from USA.\nAdditional table information: table: gas_company", "question": "SELECT company, main_industry FROM company WHERE headquarters <> 'USA'"} +{"answer": "What are the companies and main industries of all companies that are not headquartered in the United States?\nAdditional table information: table: gas_company", "question": "SELECT company, main_industry FROM company WHERE headquarters <> 'USA'"} +{"answer": "Show all company names and headquarters in the descending order of market value.\nAdditional table information: table: gas_company", "question": "SELECT company, headquarters FROM company ORDER BY market_value DESC"} +{"answer": "What are the names and headquarters of all companies ordered by descending market value?\nAdditional table information: table: gas_company", "question": "SELECT company, headquarters FROM company ORDER BY market_value DESC"} +{"answer": "Show minimum, maximum, and average market value for all companies.\nAdditional table information: table: gas_company", "question": "SELECT MIN(market_value), MAX(market_value), AVG(market_value) FROM company"} +{"answer": "What is the minimum, maximum, and average market value for every company?\nAdditional table information: table: gas_company", "question": "SELECT MIN(market_value), MAX(market_value), AVG(market_value) FROM company"} +{"answer": "Show all main industry for all companies.\nAdditional table information: table: gas_company", "question": "SELECT DISTINCT main_industry FROM company"} +{"answer": "What are the different main industries for all companies?\nAdditional table information: table: gas_company", "question": "SELECT DISTINCT main_industry FROM company"} +{"answer": "List all headquarters and the number of companies in each headquarter.\nAdditional table information: table: gas_company", "question": "SELECT headquarters, COUNT(*) FROM company GROUP BY headquarters"} +{"answer": "For each headquarter, what are the headquarter and how many companies are centered there?\nAdditional table information: table: gas_company", "question": "SELECT headquarters, COUNT(*) FROM company GROUP BY headquarters"} +{"answer": "Show all main industry and total market value in each industry.\nAdditional table information: table: gas_company", "question": "SELECT main_industry, SUM(market_value) FROM company GROUP BY main_industry"} +{"answer": "What are the main indstries and total market value for each industry?\nAdditional table information: table: gas_company", "question": "SELECT main_industry, SUM(market_value) FROM company GROUP BY main_industry"} +{"answer": "List the main industry with highest total market value and its number of companies.\nAdditional table information: table: gas_company", "question": "SELECT main_industry, COUNT(*) FROM company GROUP BY main_industry ORDER BY SUM(market_value) DESC LIMIT 1"} +{"answer": "For each main industry, what is the total number of companies for the industry with the highest total market value?\nAdditional table information: table: gas_company", "question": "SELECT main_industry, COUNT(*) FROM company GROUP BY main_industry ORDER BY SUM(market_value) DESC LIMIT 1"} +{"answer": "Show headquarters with at least two companies in the banking industry.\nAdditional table information: table: gas_company", "question": "SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING COUNT(*) >= 2"} +{"answer": "What are the headquarters with at least two companies in the banking industry?\nAdditional table information: table: gas_company", "question": "SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING COUNT(*) >= 2"} +{"answer": "Show gas station id, location, and manager_name for all gas stations ordered by open year.\nAdditional table information: table: gas_company", "question": "SELECT station_id, LOCATION, manager_name FROM gas_station ORDER BY open_year NULLS FIRST"} +{"answer": "What are the gas station ids, locations, and manager names for the gas stations ordered by opening year?\nAdditional table information: table: gas_company", "question": "SELECT station_id, LOCATION, manager_name FROM gas_station ORDER BY open_year NULLS FIRST"} +{"answer": "How many gas station are opened between 2000 and 2005?\nAdditional table information: table: gas_company", "question": "SELECT COUNT(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005"} +{"answer": "What is the total number of gas stations that opened between 2000 and 2005?\nAdditional table information: table: gas_company", "question": "SELECT COUNT(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005"} +{"answer": "Show all locations and the number of gas stations in each location ordered by the count.\nAdditional table information: table: gas_company", "question": "SELECT LOCATION, COUNT(*) FROM gas_station GROUP BY LOCATION ORDER BY COUNT(*) NULLS FIRST"} +{"answer": "For each location, how many gas stations are there in order?\nAdditional table information: table: gas_company", "question": "SELECT LOCATION, COUNT(*) FROM gas_station GROUP BY LOCATION ORDER BY COUNT(*) NULLS FIRST"} +{"answer": "Show all headquarters with both a company in banking industry and a company in Oil and gas.\nAdditional table information: table: gas_company", "question": "SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'"} +{"answer": "What are the headquarters that have both a company in the banking and 'oil and gas' industries?\nAdditional table information: table: gas_company", "question": "SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'"} +{"answer": "Show all headquarters without a company in banking industry.\nAdditional table information: table: gas_company", "question": "SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'"} +{"answer": "What are the headquarters without companies that are in the banking industry?\nAdditional table information: table: gas_company", "question": "SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'"} +{"answer": "Show the company name with the number of gas station.\nAdditional table information: table: gas_company", "question": "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"} +{"answer": "For each company id, what are the companies and how many gas stations does each one operate?\nAdditional table information: table: gas_company", "question": "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"} +{"answer": "Show company name and main industry without a gas station.\nAdditional table information: table: gas_company", "question": "SELECT company, main_industry FROM company WHERE NOT company_id IN (SELECT company_id FROM station_company)"} +{"answer": "What are the main industries of the companies without gas stations and what are the companies?\nAdditional table information: table: gas_company", "question": "SELECT company, main_industry FROM company WHERE NOT company_id IN (SELECT company_id FROM station_company)"} +{"answer": "Show the manager name for gas stations belonging to the ExxonMobil company.\nAdditional table information: table: gas_company", "question": "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'"} +{"answer": "What are the names of the managers for gas stations that are operated by the ExxonMobil company?\nAdditional table information: table: gas_company", "question": "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'"} +{"answer": "Show all locations where a gas station for company with market value greater than 100 is located.\nAdditional table information: table: gas_company", "question": "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"} +{"answer": "What are the locations that have gas stations owned by a company with a market value greater than 100?\nAdditional table information: table: gas_company", "question": "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"} +{"answer": "Show the manager name with most number of gas stations opened after 2000.\nAdditional table information: table: gas_company", "question": "SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the name of the manager with the most gas stations that opened after 2000?\nAdditional table information: table: gas_company", "question": "SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "order all gas station locations by the opening year.\nAdditional table information: table: gas_company", "question": "SELECT LOCATION FROM gas_station ORDER BY open_year NULLS FIRST"} +{"answer": "What are the locations of all the gas stations ordered by opening year?\nAdditional table information: table: gas_company", "question": "SELECT LOCATION FROM gas_station ORDER BY open_year NULLS FIRST"} +{"answer": "find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion.\nAdditional table information: table: gas_company", "question": "SELECT rank, company, market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion NULLS FIRST, profits_billion NULLS FIRST"} +{"answer": "What is the rank, company, and market value of every comapny in the banking industry ordered by sales and profits?\nAdditional table information: table: gas_company", "question": "SELECT rank, company, market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion NULLS FIRST, profits_billion NULLS FIRST"} +{"answer": "find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts.\nAdditional table information: table: gas_company", "question": "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"} +{"answer": "What are the locations and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets?\nAdditional table information: table: gas_company", "question": "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"} +{"answer": "How many regions do we have?\nAdditional table information: table: party_people", "question": "SELECT COUNT(*) FROM region"} +{"answer": "Count the number of regions.\nAdditional table information: table: party_people", "question": "SELECT COUNT(*) FROM region"} +{"answer": "Show all distinct region names ordered by their labels.\nAdditional table information: table: party_people", "question": "SELECT DISTINCT region_name FROM region ORDER BY Label NULLS FIRST"} +{"answer": "What are the different region names, ordered by labels?\nAdditional table information: table: party_people", "question": "SELECT DISTINCT region_name FROM region ORDER BY Label NULLS FIRST"} +{"answer": "How many parties do we have?\nAdditional table information: table: party_people", "question": "SELECT COUNT(DISTINCT party_name) FROM party"} +{"answer": "Count the number of different parties.\nAdditional table information: table: party_people", "question": "SELECT COUNT(DISTINCT party_name) FROM party"} +{"answer": "Show the ministers and the time they took and left office, listed by the time they left office.\nAdditional table information: table: party_people", "question": "SELECT minister, took_office, left_office FROM party ORDER BY left_office NULLS FIRST"} +{"answer": "Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office?\nAdditional table information: table: party_people", "question": "SELECT minister, took_office, left_office FROM party ORDER BY left_office NULLS FIRST"} +{"answer": "Show the minister who took office after 1961 or before 1959.\nAdditional table information: table: party_people", "question": "SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959"} +{"answer": "Who are the ministers who took office after 1961 or before 1959?\nAdditional table information: table: party_people", "question": "SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959"} +{"answer": "Show all ministers who do not belong to Progress Party.\nAdditional table information: table: party_people", "question": "SELECT minister FROM party WHERE party_name <> 'Progress Party'"} +{"answer": "Which ministers are not a part of the Progress Party?\nAdditional table information: table: party_people", "question": "SELECT minister FROM party WHERE party_name <> 'Progress Party'"} +{"answer": "Show all ministers and parties they belong to in descending order of the time they took office.\nAdditional table information: table: party_people", "question": "SELECT minister, party_name FROM party ORDER BY took_office DESC"} +{"answer": "Who are the ministers and what parties do they belong to, listed descending by the times they took office?\nAdditional table information: table: party_people", "question": "SELECT minister, party_name FROM party ORDER BY took_office DESC"} +{"answer": "Return the minister who left office at the latest time.\nAdditional table information: table: party_people", "question": "SELECT minister FROM party ORDER BY left_office DESC LIMIT 1"} +{"answer": "Which minister left office the latest?\nAdditional table information: table: party_people", "question": "SELECT minister FROM party ORDER BY left_office DESC LIMIT 1"} +{"answer": "List member names and their party names.\nAdditional table information: table: party_people", "question": "SELECT T1.member_name, T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id"} +{"answer": "What are the names of members and their corresponding parties?\nAdditional table information: table: party_people", "question": "SELECT T1.member_name, T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id"} +{"answer": "Show all party names and the number of members in each party.\nAdditional table information: table: party_people", "question": "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"} +{"answer": "How many members are in each party?\nAdditional table information: table: party_people", "question": "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"} +{"answer": "What is the name of party with most number of members?\nAdditional table information: table: party_people", "question": "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"} +{"answer": "Return the name of the party with the most members.\nAdditional table information: table: party_people", "question": "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"} +{"answer": "Show all party names and their region names.\nAdditional table information: table: party_people", "question": "SELECT T1.party_name, T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id"} +{"answer": "What are the names of parties and their respective regions?\nAdditional table information: table: party_people", "question": "SELECT T1.party_name, T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id"} +{"answer": "Show names of parties that does not have any members.\nAdditional table information: table: party_people", "question": "SELECT party_name FROM party WHERE NOT party_id IN (SELECT party_id FROM Member)"} +{"answer": "What are the names of parties that have no members?\nAdditional table information: table: party_people", "question": "SELECT party_name FROM party WHERE NOT party_id IN (SELECT party_id FROM Member)"} +{"answer": "Show the member names which are in both the party with id 3 and the party with id 1.\nAdditional table information: table: party_people", "question": "SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1"} +{"answer": "Which member names are shared among members in the party with the id 3 and the party with the id 1?\nAdditional table information: table: party_people", "question": "SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1"} +{"answer": "Show member names that are not in the Progress Party.\nAdditional table information: table: party_people", "question": "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'"} +{"answer": "Which member names corresponding to members who are not in the Progress Party?\nAdditional table information: table: party_people", "question": "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'"} +{"answer": "How many party events do we have?\nAdditional table information: table: party_people", "question": "SELECT COUNT(*) FROM party_events"} +{"answer": "Count the number of party events.\nAdditional table information: table: party_people", "question": "SELECT COUNT(*) FROM party_events"} +{"answer": "Show party names and the number of events for each party.\nAdditional table information: table: party_people", "question": "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"} +{"answer": "How many events are there for each party?\nAdditional table information: table: party_people", "question": "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"} +{"answer": "Show all member names who are not in charge of any event.\nAdditional table information: table: party_people", "question": "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"} +{"answer": "What are the names of members who are not in charge of any events?\nAdditional table information: table: party_people", "question": "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"} +{"answer": "What are the names of parties with at least 2 events?\nAdditional table information: table: party_people", "question": "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"} +{"answer": "Return the names of parties that have two or more events.\nAdditional table information: table: party_people", "question": "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"} +{"answer": "What is the name of member in charge of greatest number of events?\nAdditional table information: table: party_people", "question": "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"} +{"answer": "Return the name of the member who is in charge of the most events.\nAdditional table information: table: party_people", "question": "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"} +{"answer": "find the event names that have more than 2 records.\nAdditional table information: table: party_people", "question": "SELECT event_name FROM party_events GROUP BY event_name HAVING COUNT(*) > 2"} +{"answer": "Which event names were used more than twice for party events?\nAdditional table information: table: party_people", "question": "SELECT event_name FROM party_events GROUP BY event_name HAVING COUNT(*) > 2"} +{"answer": "How many Annual Meeting events happened in the United Kingdom region?\nAdditional table information: table: party_people", "question": "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'"} +{"answer": "Count the number of Annual Meeting events that took place in the region of the United Kingdom.\nAdditional table information: table: party_people", "question": "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'"} +{"answer": "How many pilots are there?\nAdditional table information: table: pilot_record", "question": "SELECT COUNT(*) FROM pilot"} +{"answer": "List the names of pilots in ascending order of rank.\nAdditional table information: table: pilot_record", "question": "SELECT Pilot_name FROM pilot ORDER BY Rank ASC NULLS FIRST"} +{"answer": "What are the positions and teams of pilots?\nAdditional table information: table: pilot_record", "question": "SELECT POSITION, Team FROM pilot"} +{"answer": "List the distinct positions of pilots older than 30.\nAdditional table information: table: pilot_record", "question": "SELECT DISTINCT POSITION FROM pilot WHERE Age > 30"} +{"answer": "Show the names of pilots from team 'Bradley' or 'Fordham'.\nAdditional table information: table: pilot_record", "question": "SELECT Pilot_name FROM pilot WHERE Team = 'Bradley' OR Team = 'Fordham'"} +{"answer": "What is the joined year of the pilot of the highest rank?\nAdditional table information: table: pilot_record", "question": "SELECT Join_Year FROM pilot ORDER BY Rank ASC NULLS FIRST LIMIT 1"} +{"answer": "What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality.\nAdditional table information: table: pilot_record", "question": "SELECT Nationality, COUNT(*) FROM pilot GROUP BY Nationality"} +{"answer": "Show the most common nationality of pilots.\nAdditional table information: table: pilot_record", "question": "SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000.\nAdditional table information: table: pilot_record", "question": "SELECT POSITION FROM pilot WHERE Join_Year < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year > 2005"} +{"answer": "Show the names of pilots and models of aircrafts they have flied with.\nAdditional table information: table: pilot_record", "question": "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"} +{"answer": "Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot.\nAdditional table information: table: pilot_record", "question": "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 NULLS FIRST"} +{"answer": "Show the fleet series of the aircrafts flied by pilots younger than 34\nAdditional table information: table: pilot_record", "question": "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"} +{"answer": "Show the names of pilots and the number of records they have.\nAdditional table information: table: pilot_record", "question": "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"} +{"answer": "Show names of pilots that have more than one record.\nAdditional table information: table: pilot_record", "question": "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"} +{"answer": "List the names of pilots that do not have any record.\nAdditional table information: table: pilot_record", "question": "SELECT Pilot_name FROM pilot WHERE NOT Pilot_ID IN (SELECT Pilot_ID FROM pilot_record)"} +{"answer": "What document status codes do we have?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT document_status_code FROM Ref_Document_Status"} +{"answer": "What is the description of document status code 'working'?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT document_status_description FROM Ref_Document_Status WHERE document_status_code = 'working'"} +{"answer": "What document type codes do we have?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT document_type_code FROM Ref_Document_Types"} +{"answer": "What is the description of document type 'Paper'?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = 'Paper'"} +{"answer": "What are the shipping agent names?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT shipping_agent_name FROM Ref_Shipping_Agents"} +{"answer": "What is the shipping agent code of shipping agent UPS?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = 'UPS'"} +{"answer": "What are all role codes?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT role_code FROM ROLES"} +{"answer": "What is the description of role code ED?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT role_description FROM ROLES WHERE role_code = 'ED'"} +{"answer": "How many employees do we have?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT COUNT(*) FROM Employees"} +{"answer": "What is the role of the employee named Koby?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = 'Koby'"} +{"answer": "List all document ids and receipt dates of documents.\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT document_id, receipt_date FROM Documents"} +{"answer": "How many employees does each role have? List role description, id and number of employees.\nAdditional table information: table: cre_Doc_Control_Systems", "question": "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"} +{"answer": "List roles that have more than one employee. List the role description and number of employees.\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT Roles.role_description, COUNT(Employees.employee_id) FROM ROLES JOIN Employees ON Employees.role_code = Roles.role_code GROUP BY Employees.role_code HAVING COUNT(Employees.employee_id) > 1"} +{"answer": "What is the document status description of the document with id 1?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "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"} +{"answer": "How many documents have the status code done?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT COUNT(*) FROM Documents WHERE document_status_code = 'done'"} +{"answer": "List the document type code for the document with the id 2.\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT document_type_code FROM Documents WHERE document_id = 2"} +{"answer": "List the document ids for any documents with the status code done and the type code paper.\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT document_id FROM Documents WHERE document_status_code = 'done' AND document_type_code = 'Paper'"} +{"answer": "What is the name of the shipping agent of the document with id 2?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "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"} +{"answer": "How many documents were shipped by USPS?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "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'"} +{"answer": "Which shipping agent shipped the most documents? List the shipping agent name and the number of documents.\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT Ref_Shipping_Agents.shipping_agent_name, COUNT(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(Documents.document_id) DESC LIMIT 1"} +{"answer": "What is the receipt date of the document with id 3?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT receipt_date FROM Documents WHERE document_id = 3"} +{"answer": "What address was the document with id 4 mailed to?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT Addresses.address_details FROM Addresses JOIN Documents_Mailed ON Documents_Mailed.mailed_to_address_id = Addresses.address_id WHERE document_id = 4"} +{"answer": "What is the mail date of the document with id 7?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7"} +{"answer": "List the document ids of documents with the status done and type Paper, which not shipped by the shipping agent named USPS.\nAdditional table information: table: cre_Doc_Control_Systems", "question": "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'"} +{"answer": "List document id of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS.\nAdditional table information: table: cre_Doc_Control_Systems", "question": "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'"} +{"answer": "What is draft detail of the document with id 7?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT draft_details FROM Document_Drafts WHERE document_id = 7"} +{"answer": "How many draft copies does the document with id 2 have?\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT COUNT(*) FROM Draft_Copies WHERE document_id = 2"} +{"answer": "Which document has the most draft copies? List its document id and number of draft copies.\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT document_id, COUNT(copy_number) FROM Draft_Copies GROUP BY document_id ORDER BY COUNT(copy_number) DESC LIMIT 1"} +{"answer": "Which documents have more than 1 draft copies? List document id and number of draft copies.\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT document_id, COUNT(*) FROM Draft_Copies GROUP BY document_id HAVING COUNT(*) > 1"} +{"answer": "List all employees in the circulation history of the document with id 1. List the employee's name.\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id WHERE Circulation_History.document_id = 1"} +{"answer": "List the employees who have not showed up in any circulation history of documents. List the employee's name.\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT employee_name FROM Employees EXCEPT SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id"} +{"answer": "Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies.\nAdditional table information: table: cre_Doc_Control_Systems", "question": "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"} +{"answer": "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.\nAdditional table information: table: cre_Doc_Control_Systems", "question": "SELECT document_id, COUNT(DISTINCT employee_id) FROM Circulation_History GROUP BY document_id"} +{"answer": "List all department names ordered by their starting date.\nAdditional table information: table: company_1", "question": "SELECT dname FROM department ORDER BY mgr_start_date NULLS FIRST"} +{"answer": "find all dependent names who have a spouse relation with some employee.\nAdditional table information: table: company_1", "question": "SELECT Dependent_name FROM dependent WHERE relationship = 'Spouse'"} +{"answer": "how many female dependents are there?\nAdditional table information: table: company_1", "question": "SELECT COUNT(*) FROM dependent WHERE sex = 'F'"} +{"answer": "Find the names of departments that are located in Houston.\nAdditional table information: table: company_1", "question": "SELECT t1.dname FROM department AS t1 JOIN dept_locations AS t2 ON t1.dnumber = t2.dnumber WHERE t2.dlocation = 'Houston'"} +{"answer": "Return the first names and last names of employees who earn more than 30000 in salary.\nAdditional table information: table: company_1", "question": "SELECT fname, lname FROM employee WHERE salary > 30000"} +{"answer": "Find the number of employees of each gender whose salary is lower than 50000.\nAdditional table information: table: company_1", "question": "SELECT COUNT(*), sex FROM employee WHERE salary < 50000 GROUP BY sex"} +{"answer": "list the first and last names, and the addresses of all employees in the ascending order of their birth date.\nAdditional table information: table: company_1", "question": "SELECT fname, lname, address FROM employee ORDER BY Bdate NULLS FIRST"} +{"answer": "what are the event details of the services that have the type code 'Marriage'?\nAdditional table information: table: local_govt_in_alabama", "question": "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'"} +{"answer": "What are the ids and details of events that have more than one participants?\nAdditional table information: table: local_govt_in_alabama", "question": "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"} +{"answer": "How many events have each participants attended? List the participant id, type and the number.\nAdditional table information: table: local_govt_in_alabama", "question": "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"} +{"answer": "What are all the the participant ids, type code and details?\nAdditional table information: table: local_govt_in_alabama", "question": "SELECT Participant_ID, Participant_Type_Code, Participant_Details FROM Participants"} +{"answer": "How many participants belong to the type 'Organizer'?\nAdditional table information: table: local_govt_in_alabama", "question": "SELECT COUNT(*) FROM participants WHERE participant_type_code = 'Organizer'"} +{"answer": "List the type of the services in alphabetical order.\nAdditional table information: table: local_govt_in_alabama", "question": "SELECT service_type_code FROM services ORDER BY service_type_code NULLS FIRST"} +{"answer": "List the service id and details for the events.\nAdditional table information: table: local_govt_in_alabama", "question": "SELECT service_id, event_details FROM EVENTS"} +{"answer": "How many events had participants whose details had the substring 'Dr.'\nAdditional table information: table: local_govt_in_alabama", "question": "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.%'"} +{"answer": "What is the most common participant type?\nAdditional table information: table: local_govt_in_alabama", "question": "SELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which service id and type has the least number of participants?\nAdditional table information: table: local_govt_in_alabama", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the id of the event with the most participants?\nAdditional table information: table: local_govt_in_alabama", "question": "SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which events id does not have any participant with detail 'Kenyatta Kuhn'?\nAdditional table information: table: local_govt_in_alabama", "question": "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'"} +{"answer": "Which services type had both successful and failure event details?\nAdditional table information: table: local_govt_in_alabama", "question": "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'"} +{"answer": "How many events did not have any participants?\nAdditional table information: table: local_govt_in_alabama", "question": "SELECT COUNT(*) FROM EVENTS WHERE NOT event_id IN (SELECT event_id FROM Participants_in_Events)"} +{"answer": "What are all the distinct participant ids who attended any events?\nAdditional table information: table: local_govt_in_alabama", "question": "SELECT COUNT(DISTINCT participant_id) FROM participants_in_Events"} +{"answer": "What is the name of the race held most recently?\nAdditional table information: table: formula_1", "question": "SELECT name FROM races ORDER BY date DESC LIMIT 1"} +{"answer": "What is the name of the race that occurred most recently?\nAdditional table information: table: formula_1", "question": "SELECT name FROM races ORDER BY date DESC LIMIT 1"} +{"answer": "What is the name and date of the most recent race?\nAdditional table information: table: formula_1", "question": "SELECT name, date FROM races ORDER BY date DESC LIMIT 1"} +{"answer": "What is the name and date of the race that occurred most recently?\nAdditional table information: table: formula_1", "question": "SELECT name, date FROM races ORDER BY date DESC LIMIT 1"} +{"answer": "Find the names of all races held in 2017.\nAdditional table information: table: formula_1", "question": "SELECT name FROM races WHERE YEAR = 2017"} +{"answer": "What are the names of all the races that occurred in the year 2017?\nAdditional table information: table: formula_1", "question": "SELECT name FROM races WHERE YEAR = 2017"} +{"answer": "Find the distinct names of all races held between 2014 and 2017?\nAdditional table information: table: formula_1", "question": "SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017"} +{"answer": "What are the unique names of all race held between 2014 and 2017?\nAdditional table information: table: formula_1", "question": "SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017"} +{"answer": "List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds?\nAdditional table information: table: formula_1", "question": "SELECT DISTINCT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000"} +{"answer": "What are the forenames and surnames of all unique drivers who had a lap time of less than 93000 milliseconds?\nAdditional table information: table: formula_1", "question": "SELECT DISTINCT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000"} +{"answer": "Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds?\nAdditional table information: table: formula_1", "question": "SELECT DISTINCT T1.driverid, T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000"} +{"answer": "What are the different driver ids and nationalities of all drivers who had a laptime of more than 100000 milliseconds?\nAdditional table information: table: formula_1", "question": "SELECT DISTINCT T1.driverid, T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000"} +{"answer": "What are the forename and surname of the driver who has the smallest laptime?\nAdditional table information: table: formula_1", "question": "SELECT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds NULLS FIRST LIMIT 1"} +{"answer": "What is the forename and surname of the driver with the shortest laptime?\nAdditional table information: table: formula_1", "question": "SELECT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds NULLS FIRST LIMIT 1"} +{"answer": "What is the id and family name of the driver who has the longest laptime?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "What is the id and last name of the driver with the longest laptime?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "What is the id, forname and surname of the driver who had the first position in terms of laptime at least twice?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "What is the id, first name, and last name of the driver who was in the first position for laptime at least twice?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "How many drivers participated in the race Australian Grand Prix held in 2009?\nAdditional table information: table: formula_1", "question": "SELECT COUNT(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = 'Australian Grand Prix' AND YEAR = 2009"} +{"answer": "How many drivers were in the Australian Grand Prix held in 2009?\nAdditional table information: table: formula_1", "question": "SELECT COUNT(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = 'Australian Grand Prix' AND YEAR = 2009"} +{"answer": "How many drivers did not participate in the races held in 2009?\nAdditional table information: table: formula_1", "question": "SELECT COUNT(DISTINCT driverId) FROM results WHERE NOT raceId IN (SELECT raceId FROM races WHERE YEAR <> 2009)"} +{"answer": "How many drivers did not race in 2009?\nAdditional table information: table: formula_1", "question": "SELECT COUNT(DISTINCT driverId) FROM results WHERE NOT raceId IN (SELECT raceId FROM races WHERE YEAR <> 2009)"} +{"answer": "Give me a list of names and years of races that had any driver whose forename is Lewis?\nAdditional table information: table: formula_1", "question": "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'"} +{"answer": "What are the names and years of all races that had a driver with the last name Lewis?\nAdditional table information: table: formula_1", "question": "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'"} +{"answer": "Find the forename and surname of drivers whose nationality is German?\nAdditional table information: table: formula_1", "question": "SELECT forename, surname FROM drivers WHERE nationality = 'German'"} +{"answer": "What is the first and last name of all the German drivers?\nAdditional table information: table: formula_1", "question": "SELECT forename, surname FROM drivers WHERE nationality = 'German'"} +{"answer": "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?\nAdditional table information: table: formula_1", "question": "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'"} +{"answer": "What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix?\nAdditional table information: table: formula_1", "question": "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'"} +{"answer": "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?\nAdditional table information: table: formula_1", "question": "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'"} +{"answer": "What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix?\nAdditional table information: table: formula_1", "question": "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'"} +{"answer": "Find all the forenames of distinct drivers who was in position 1 as standing and won?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "What are all the different first names of the drivers who are in position as standing and won?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "What are the numbers of constructors for different nationalities?\nAdditional table information: table: formula_1", "question": "SELECT COUNT(*), nationality FROM constructors GROUP BY nationality"} +{"answer": "For each nationality, how many different constructors are there?\nAdditional table information: table: formula_1", "question": "SELECT COUNT(*), nationality FROM constructors GROUP BY nationality"} +{"answer": "What are the numbers of races for each constructor id?\nAdditional table information: table: formula_1", "question": "SELECT COUNT(*), constructorid FROM constructorStandings GROUP BY constructorid"} +{"answer": "For each constructor id, how many races are there?\nAdditional table information: table: formula_1", "question": "SELECT COUNT(*), constructorid FROM constructorStandings GROUP BY constructorid"} +{"answer": "What are the names of races that were held after 2017 and the circuits were in the country of Spain?\nAdditional table information: table: formula_1", "question": "SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2017"} +{"answer": "What are the names of the races held after 2017 in Spain?\nAdditional table information: table: formula_1", "question": "SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2017"} +{"answer": "What are the unique names of races that held after 2000 and the circuits were in Spain?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "What are the names of all races held after 2000 in Spain?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "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.\nAdditional table information: table: formula_1", "question": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration < (SELECT MAX(duration) FROM pitstops WHERE raceid = 841)"} +{"answer": "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?\nAdditional table information: table: formula_1", "question": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration < (SELECT MAX(duration) FROM pitstops WHERE raceid = 841)"} +{"answer": "Find the distinct driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841?\nAdditional table information: table: formula_1", "question": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration > (SELECT MIN(duration) FROM pitstops WHERE raceid = 841)"} +{"answer": "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?\nAdditional table information: table: formula_1", "question": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration > (SELECT MIN(duration) FROM pitstops WHERE raceid = 841)"} +{"answer": "List the forenames of all distinct drivers in alphabetical order?\nAdditional table information: table: formula_1", "question": "SELECT DISTINCT forename FROM drivers ORDER BY forename ASC NULLS FIRST"} +{"answer": "What are the first names of all the different drivers in alphabetical order?\nAdditional table information: table: formula_1", "question": "SELECT DISTINCT forename FROM drivers ORDER BY forename ASC NULLS FIRST"} +{"answer": "List the names of all distinct races in reversed lexicographic order?\nAdditional table information: table: formula_1", "question": "SELECT DISTINCT name FROM races ORDER BY name DESC"} +{"answer": "What are the different names of all the races in reverse alphabetical order?\nAdditional table information: table: formula_1", "question": "SELECT DISTINCT name FROM races ORDER BY name DESC"} +{"answer": "What are the names of races held between 2009 and 2011?\nAdditional table information: table: formula_1", "question": "SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011"} +{"answer": "What are the names of all races held between 2009 and 2011?\nAdditional table information: table: formula_1", "question": "SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011"} +{"answer": "What are the names of races held after 12:00:00 or before 09:00:00?\nAdditional table information: table: formula_1", "question": "SELECT name FROM races WHERE TIME > '12:00:00' OR TIME < '09:00:00'"} +{"answer": "What are the names of all races that occurred after 12:00:00 or before 09:00:00?\nAdditional table information: table: formula_1", "question": "SELECT name FROM races WHERE TIME > '12:00:00' OR TIME < '09:00:00'"} +{"answer": "What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "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?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "What is the id and last name of the driver who participated in the most races after 2010?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "What is the id and last name of the driver who participated in the most races after 2010?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "What are the names of circuits that belong to UK or Malaysia?\nAdditional table information: table: formula_1", "question": "SELECT name FROM circuits WHERE country = 'UK' OR country = 'Malaysia'"} +{"answer": "What are the names of all the circuits that are in the UK or Malaysia?\nAdditional table information: table: formula_1", "question": "SELECT name FROM circuits WHERE country = 'UK' OR country = 'Malaysia'"} +{"answer": "Find the id and location of circuits that belong to France or Belgium?\nAdditional table information: table: formula_1", "question": "SELECT circuitid, LOCATION FROM circuits WHERE country = 'France' OR country = 'Belgium'"} +{"answer": "What are the ids and locations of all circuits in France or Belgium?\nAdditional table information: table: formula_1", "question": "SELECT circuitid, LOCATION FROM circuits WHERE country = 'France' OR country = 'Belgium'"} +{"answer": "Find the names of Japanese constructors that have once earned more than 5 points?\nAdditional table information: table: formula_1", "question": "SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = 'Japanese' AND T2.points > 5"} +{"answer": "What are the names of all the Japanese constructors that have earned more than 5 points?\nAdditional table information: table: formula_1", "question": "SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = 'Japanese' AND T2.points > 5"} +{"answer": "What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?\nAdditional table information: table: formula_1", "question": "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'"} +{"answer": "What is the average fastest lap speed for the Monaco Grand Prix in 2008?\nAdditional table information: table: formula_1", "question": "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'"} +{"answer": "What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?\nAdditional table information: table: formula_1", "question": "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'"} +{"answer": "What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?\nAdditional table information: table: formula_1", "question": "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'"} +{"answer": "What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?\nAdditional table information: table: formula_1", "question": "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 NULLS FIRST"} +{"answer": "For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year?\nAdditional table information: table: formula_1", "question": "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 NULLS FIRST"} +{"answer": "What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?\nAdditional table information: table: formula_1", "question": "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 NULLS FIRST"} +{"answer": "What is the average fastest lap speed for races held after 2004, for each race, ordered by year?\nAdditional table information: table: formula_1", "question": "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 NULLS FIRST"} +{"answer": "Find the id, forename and number of races of all drivers who have at least participated in two races?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "What is the id, forename, and number of races for all drivers that have participated in at least 2 races?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "Find the driver id and number of races of all drivers who have at most participated in 30 races?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "For each id of a driver who participated in at most 30 races, how many races did they participate in?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "Find the id and surname of the driver who participated the most number of races?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "What are the ids and last names of all drivers who participated in the most races?\nAdditional table information: table: formula_1", "question": "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"} +{"answer": "How many technicians are there?\nAdditional table information: table: machine_repair", "question": "SELECT COUNT(*) FROM technician"} +{"answer": "What is the number of technicians?\nAdditional table information: table: machine_repair", "question": "SELECT COUNT(*) FROM technician"} +{"answer": "List the names of technicians in ascending order of age.\nAdditional table information: table: machine_repair", "question": "SELECT Name FROM technician ORDER BY Age ASC NULLS FIRST"} +{"answer": "What are the names of the technicians by ascending order of age?\nAdditional table information: table: machine_repair", "question": "SELECT Name FROM technician ORDER BY Age ASC NULLS FIRST"} +{"answer": "What are the team and starting year of technicians?\nAdditional table information: table: machine_repair", "question": "SELECT Team, Starting_Year FROM technician"} +{"answer": "What is the team and starting year for each technician?\nAdditional table information: table: machine_repair", "question": "SELECT Team, Starting_Year FROM technician"} +{"answer": "List the name of technicians whose team is not 'NYY'.\nAdditional table information: table: machine_repair", "question": "SELECT Name FROM technician WHERE Team <> 'NYY'"} +{"answer": "What is the name of the technician whose team is not 'NYY'?\nAdditional table information: table: machine_repair", "question": "SELECT Name FROM technician WHERE Team <> 'NYY'"} +{"answer": "Show the name of technicians aged either 36 or 37\nAdditional table information: table: machine_repair", "question": "SELECT Name FROM technician WHERE Age = 36 OR Age = 37"} +{"answer": "What are the names of the technicians aged either 36 or 37?\nAdditional table information: table: machine_repair", "question": "SELECT Name FROM technician WHERE Age = 36 OR Age = 37"} +{"answer": "What is the starting year of the oldest technicians?\nAdditional table information: table: machine_repair", "question": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1"} +{"answer": "What is the starting year for the oldest technician?\nAdditional table information: table: machine_repair", "question": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1"} +{"answer": "Show different teams of technicians and the number of technicians in each team.\nAdditional table information: table: machine_repair", "question": "SELECT Team, COUNT(*) FROM technician GROUP BY Team"} +{"answer": "For each team, how many technicians are there?\nAdditional table information: table: machine_repair", "question": "SELECT Team, COUNT(*) FROM technician GROUP BY Team"} +{"answer": "Please show the team that has the most number of technicians.\nAdditional table information: table: machine_repair", "question": "SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the teams with the most technicians?\nAdditional table information: table: machine_repair", "question": "SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the team that have at least two technicians.\nAdditional table information: table: machine_repair", "question": "SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2"} +{"answer": "What is the team with at least 2 technicians?\nAdditional table information: table: machine_repair", "question": "SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2"} +{"answer": "Show names of technicians and series of machines they are assigned to repair.\nAdditional table information: table: machine_repair", "question": "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"} +{"answer": "What are the names of technicians and the machine series that they repair?\nAdditional table information: table: machine_repair", "question": "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"} +{"answer": "Show names of technicians in ascending order of quality rank of the machine they are assigned.\nAdditional table information: table: machine_repair", "question": "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 NULLS FIRST"} +{"answer": "What are the names of the technicians by ascending order of quality rank for the machine they are assigned?\nAdditional table information: table: machine_repair", "question": "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 NULLS FIRST"} +{"answer": "Show names of technicians who are assigned to repair machines with value point more than 70.\nAdditional table information: table: machine_repair", "question": "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"} +{"answer": "What are the names of the technicians that are assigned to repair machines with more point values than 70?\nAdditional table information: table: machine_repair", "question": "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"} +{"answer": "Show names of technicians and the number of machines they are assigned to repair.\nAdditional table information: table: machine_repair", "question": "SELECT T2.Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name"} +{"answer": "What are the names of the technicians and how many machines are they assigned to repair?\nAdditional table information: table: machine_repair", "question": "SELECT T2.Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name"} +{"answer": "List the names of technicians who have not been assigned to repair machines.\nAdditional table information: table: machine_repair", "question": "SELECT Name FROM technician WHERE NOT technician_id IN (SELECT technician_id FROM repair_assignment)"} +{"answer": "What are the names of the technicians that have not been assigned to repair machines?\nAdditional table information: table: machine_repair", "question": "SELECT Name FROM technician WHERE NOT technician_id IN (SELECT technician_id FROM repair_assignment)"} +{"answer": "Show the starting years shared by technicians from team 'CLE' and 'CWS'.\nAdditional table information: table: machine_repair", "question": "SELECT Starting_Year FROM technician WHERE Team = 'CLE' INTERSECT SELECT Starting_Year FROM technician WHERE Team = 'CWS'"} +{"answer": "What are the starting years shared by the technicians from the team 'CLE' or 'CWS'?\nAdditional table information: table: machine_repair", "question": "SELECT Starting_Year FROM technician WHERE Team = 'CLE' INTERSECT SELECT Starting_Year FROM technician WHERE Team = 'CWS'"} +{"answer": "How many entrepreneurs are there?\nAdditional table information: table: entrepreneur", "question": "SELECT COUNT(*) FROM entrepreneur"} +{"answer": "Count the number of entrepreneurs.\nAdditional table information: table: entrepreneur", "question": "SELECT COUNT(*) FROM entrepreneur"} +{"answer": "List the companies of entrepreneurs in descending order of money requested.\nAdditional table information: table: entrepreneur", "question": "SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC"} +{"answer": "What are the companies of entrepreneurs, ordered descending by amount of money requested?\nAdditional table information: table: entrepreneur", "question": "SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC"} +{"answer": "List the companies and the investors of entrepreneurs.\nAdditional table information: table: entrepreneur", "question": "SELECT Company, Investor FROM entrepreneur"} +{"answer": "What are the companies and investors that correspond to each entrepreneur?\nAdditional table information: table: entrepreneur", "question": "SELECT Company, Investor FROM entrepreneur"} +{"answer": "What is the average money requested by all entrepreneurs?\nAdditional table information: table: entrepreneur", "question": "SELECT AVG(Money_Requested) FROM entrepreneur"} +{"answer": "Return the average money requested across all entrepreneurs.\nAdditional table information: table: entrepreneur", "question": "SELECT AVG(Money_Requested) FROM entrepreneur"} +{"answer": "What are the names of people in ascending order of weight?\nAdditional table information: table: entrepreneur", "question": "SELECT Name FROM People ORDER BY Weight ASC NULLS FIRST"} +{"answer": "Return the names of people, ordered by weight ascending.\nAdditional table information: table: entrepreneur", "question": "SELECT Name FROM People ORDER BY Weight ASC NULLS FIRST"} +{"answer": "What are the names of entrepreneurs?\nAdditional table information: table: entrepreneur", "question": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID"} +{"answer": "Return the names of entrepreneurs.\nAdditional table information: table: entrepreneur", "question": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID"} +{"answer": "What are the names of entrepreneurs whose investor is not 'Rachel Elnaugh'?\nAdditional table information: table: entrepreneur", "question": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor <> 'Rachel Elnaugh'"} +{"answer": "Return the names of entrepreneurs do no not have the investor Rachel Elnaugh.\nAdditional table information: table: entrepreneur", "question": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor <> 'Rachel Elnaugh'"} +{"answer": "What is the weight of the shortest person?\nAdditional table information: table: entrepreneur", "question": "SELECT Weight FROM people ORDER BY Height ASC NULLS FIRST LIMIT 1"} +{"answer": "Return the weight of the shortest person.\nAdditional table information: table: entrepreneur", "question": "SELECT Weight FROM people ORDER BY Height ASC NULLS FIRST LIMIT 1"} +{"answer": "What is the name of the entrepreneur with the greatest weight?\nAdditional table information: table: entrepreneur", "question": "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"} +{"answer": "Return the name of the heaviest entrepreneur.\nAdditional table information: table: entrepreneur", "question": "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"} +{"answer": "What is the total money requested by entrepreneurs with height more than 1.85?\nAdditional table information: table: entrepreneur", "question": "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"} +{"answer": "Give the total money requested by entrepreneurs who are taller than 1.85.\nAdditional table information: table: entrepreneur", "question": "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"} +{"answer": "What are the dates of birth of entrepreneurs with investor 'Simon Woodroffe' or 'Peter Jones'?\nAdditional table information: table: entrepreneur", "question": "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'"} +{"answer": "Return the dates of birth for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones.\nAdditional table information: table: entrepreneur", "question": "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'"} +{"answer": "What are the weights of entrepreneurs in descending order of money requested?\nAdditional table information: table: entrepreneur", "question": "SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC"} +{"answer": "Return the weights of entrepreneurs, ordered descending by amount of money requested.\nAdditional table information: table: entrepreneur", "question": "SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC"} +{"answer": "What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?\nAdditional table information: table: entrepreneur", "question": "SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor"} +{"answer": "How many entrepreneurs correspond to each investor?\nAdditional table information: table: entrepreneur", "question": "SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor"} +{"answer": "What is the investor that has invested in the most number of entrepreneurs?\nAdditional table information: table: entrepreneur", "question": "SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Return the investor who have invested in the greatest number of entrepreneurs.\nAdditional table information: table: entrepreneur", "question": "SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the investors that have invested in at least two entrepreneurs?\nAdditional table information: table: entrepreneur", "question": "SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2"} +{"answer": "Return the investors who have invested in two or more entrepreneurs.\nAdditional table information: table: entrepreneur", "question": "SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2"} +{"answer": "List the names of entrepreneurs and their companies in descending order of money requested?\nAdditional table information: table: entrepreneur", "question": "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 NULLS FIRST"} +{"answer": "What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested?\nAdditional table information: table: entrepreneur", "question": "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 NULLS FIRST"} +{"answer": "List the names of people that are not entrepreneurs.\nAdditional table information: table: entrepreneur", "question": "SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM entrepreneur)"} +{"answer": "What are the names of people who are not entrepreneurs?\nAdditional table information: table: entrepreneur", "question": "SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM entrepreneur)"} +{"answer": "Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000.\nAdditional table information: table: entrepreneur", "question": "SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000"} +{"answer": "What are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000?\nAdditional table information: table: entrepreneur", "question": "SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000"} +{"answer": "How many distinct companies are there?\nAdditional table information: table: entrepreneur", "question": "SELECT COUNT(DISTINCT Company) FROM entrepreneur"} +{"answer": "Count the number of different companies.\nAdditional table information: table: entrepreneur", "question": "SELECT COUNT(DISTINCT Company) FROM entrepreneur"} +{"answer": "Show the company of the tallest entrepreneur.\nAdditional table information: table: entrepreneur", "question": "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"} +{"answer": "Which company was started by the entrepreneur with the greatest height?\nAdditional table information: table: entrepreneur", "question": "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"} +{"answer": "How many perpetrators are there?\nAdditional table information: table: perpetrator", "question": "SELECT COUNT(*) FROM perpetrator"} +{"answer": "List the date of perpetrators in descending order of the number of people killed.\nAdditional table information: table: perpetrator", "question": "SELECT Date FROM perpetrator ORDER BY Killed DESC"} +{"answer": "List the number of people injured by perpetrators in ascending order.\nAdditional table information: table: perpetrator", "question": "SELECT Injured FROM perpetrator ORDER BY Injured ASC NULLS FIRST"} +{"answer": "What is the average number of people injured by all perpetrators?\nAdditional table information: table: perpetrator", "question": "SELECT AVG(Injured) FROM perpetrator"} +{"answer": "What is the location of the perpetrator with the largest kills.\nAdditional table information: table: perpetrator", "question": "SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1"} +{"answer": "What are the names of people in ascending order of height?\nAdditional table information: table: perpetrator", "question": "SELECT Name FROM People ORDER BY Height ASC NULLS FIRST"} +{"answer": "What are the names of perpetrators?\nAdditional table information: table: perpetrator", "question": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID"} +{"answer": "What are the names of perpetrators whose country is not 'China'?\nAdditional table information: table: perpetrator", "question": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country <> 'China'"} +{"answer": "What is the name of the perpetrator with the biggest weight.\nAdditional table information: table: perpetrator", "question": "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"} +{"answer": "What is the total kills of the perpetrators with height more than 1.84.\nAdditional table information: table: perpetrator", "question": "SELECT SUM(T2.Killed) FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 1.84"} +{"answer": "What are the names of perpetrators in country 'China' or 'Japan'?\nAdditional table information: table: perpetrator", "question": "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'"} +{"answer": "What are the heights of perpetrators in descending order of the number of people they injured?\nAdditional table information: table: perpetrator", "question": "SELECT T1.Height FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Injured DESC"} +{"answer": "What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.\nAdditional table information: table: perpetrator", "question": "SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country"} +{"answer": "What is the country that has the most perpetrators?\nAdditional table information: table: perpetrator", "question": "SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the countries that have at least two perpetrators?\nAdditional table information: table: perpetrator", "question": "SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country HAVING COUNT(*) >= 2"} +{"answer": "List the names of perpetrators in descending order of the year.\nAdditional table information: table: perpetrator", "question": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Year DESC"} +{"answer": "List the names of people that are not perpetrators.\nAdditional table information: table: perpetrator", "question": "SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM perpetrator)"} +{"answer": "Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.\nAdditional table information: table: perpetrator", "question": "SELECT Country FROM perpetrator WHERE Injured > 50 INTERSECT SELECT Country FROM perpetrator WHERE Injured < 20"} +{"answer": "How many distinct locations of perpetrators are there?\nAdditional table information: table: perpetrator", "question": "SELECT COUNT(DISTINCT LOCATION) FROM perpetrator"} +{"answer": "Show the date of the tallest perpetrator.\nAdditional table information: table: perpetrator", "question": "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"} +{"answer": "In which year did the most recent crime happen?\nAdditional table information: table: perpetrator", "question": "SELECT MAX(YEAR) FROM perpetrator"} +{"answer": "Report the name of all campuses in Los Angeles county.\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE county = 'Los Angeles'"} +{"answer": "What campuses are located in the county of Los Angeles?\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE county = 'Los Angeles'"} +{"answer": "What are the names of all campuses located at Chico?\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE LOCATION = 'Chico'"} +{"answer": "What campuses are located in Chico?\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE LOCATION = 'Chico'"} +{"answer": "Find all the campuses opened in 1958.\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE YEAR = 1958"} +{"answer": "What are the campuses that opened in 1958?\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE YEAR = 1958"} +{"answer": "Find the name of the campuses opened before 1800.\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE YEAR < 1800"} +{"answer": "What campuses opened before 1800?\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE YEAR < 1800"} +{"answer": "Which campus was opened between 1935 and 1939?\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939"} +{"answer": "What campuses opened between 1935 and 1939?\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939"} +{"answer": "Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco.\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE LOCATION = 'Northridge' AND county = 'Los Angeles' UNION SELECT campus FROM campuses WHERE LOCATION = 'San Francisco' AND county = 'San Francisco'"} +{"answer": "What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco?\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE LOCATION = 'Northridge' AND county = 'Los Angeles' UNION SELECT campus FROM campuses WHERE LOCATION = 'San Francisco' AND county = 'San Francisco'"} +{"answer": "What is the campus fee of 'San Jose State University' in year 1996?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "What is the campus fee for San Jose State University in 1996?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "What is the campus fee of 'San Francisco State University' in year 1996?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "What is the campus fee for San Francisco State University in 1996?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "Find the count of universities whose campus fee is greater than the average campus fee.\nAdditional table information: table: csu_1", "question": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees)"} +{"answer": "How many universities have a campus fee higher than average?\nAdditional table information: table: csu_1", "question": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees)"} +{"answer": "Find the count of universities whose campus fee is greater than the average campus fee.\nAdditional table information: table: csu_1", "question": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees)"} +{"answer": "How many universities have a campus fee greater than the average?\nAdditional table information: table: csu_1", "question": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees)"} +{"answer": "Which university is in Los Angeles county and opened after 1950?\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE county = 'Los Angeles' AND YEAR > 1950"} +{"answer": "What campuses are located in Los Angeles county and opened after 1950?\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE county = 'Los Angeles' AND YEAR > 1950"} +{"answer": "Which year has the most degrees conferred?\nAdditional table information: table: csu_1", "question": "SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY SUM(degrees) DESC LIMIT 1"} +{"answer": "In what year was the most degrees conferred?\nAdditional table information: table: csu_1", "question": "SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY SUM(degrees) DESC LIMIT 1"} +{"answer": "Which campus has the most degrees conferred in all times?\nAdditional table information: table: csu_1", "question": "SELECT campus FROM degrees GROUP BY campus ORDER BY SUM(degrees) DESC LIMIT 1"} +{"answer": "What campus has the most degrees conferrred over its entire existence?\nAdditional table information: table: csu_1", "question": "SELECT campus FROM degrees GROUP BY campus ORDER BY SUM(degrees) DESC LIMIT 1"} +{"answer": "Which campus has the most faculties in year 2003?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "What campus has the most faculties in 2003?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "Find the average fee on a CSU campus in 1996\nAdditional table information: table: csu_1", "question": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 1996"} +{"answer": "What is the average fee for a CSU campus in the year of 1996?\nAdditional table information: table: csu_1", "question": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 1996"} +{"answer": "What is the average fee on a CSU campus in 2005?\nAdditional table information: table: csu_1", "question": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 2005"} +{"answer": "What is the average fee for a CSU campus in the year of 2005?\nAdditional table information: table: csu_1", "question": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 2005"} +{"answer": "report the total number of degrees granted between 1998 and 2002.\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "how many degrees were conferred between 1998 and 2002?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "For each Orange county campus, report the number of degrees granted after 2000.\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "What is the total number of degrees granted after 2000 for each Orange county campus?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "Find the names of the campus which has more faculties in 2002 than every campus in Orange county.\nAdditional table information: table: csu_1", "question": "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')"} +{"answer": "What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county?\nAdditional table information: table: csu_1", "question": "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')"} +{"answer": "What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "What campus started in year 1956, has more than 200 full time students, and more than 400 students enrolled?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "How many campuses are there in Los Angeles county?\nAdditional table information: table: csu_1", "question": "SELECT COUNT(*) FROM campuses WHERE county = 'Los Angeles'"} +{"answer": "How many campuses exist are in the county of LA?\nAdditional table information: table: csu_1", "question": "SELECT COUNT(*) FROM campuses WHERE county = 'Los Angeles'"} +{"answer": "List the campuses in Los Angeles county.\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE county = 'Los Angeles'"} +{"answer": "What campuses are in Los Angeles county?\nAdditional table information: table: csu_1", "question": "SELECT campus FROM campuses WHERE county = 'Los Angeles'"} +{"answer": "How many degrees were conferred in 'San Jose State University' in 2000?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "How many degrees were conferred at San Jose State University in 2000?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "What are the degrees conferred in 'San Francisco State University' in 2001.\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "What degrees were conferred in San Francisco State University in the year 2001?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "How many faculty is there in total in the year of 2002?\nAdditional table information: table: csu_1", "question": "SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002"} +{"answer": "How many faculty, in total, are there in the year 2002?\nAdditional table information: table: csu_1", "question": "SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002"} +{"answer": "What is the number of faculty lines in campus 'Long Beach State University' in 2002?\nAdditional table information: table: csu_1", "question": "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'"} +{"answer": "What is the number of faculty at Long Beach State University in 2002?\nAdditional table information: table: csu_1", "question": "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'"} +{"answer": "How many faculty lines are there in 'San Francisco State University' in year 2004?\nAdditional table information: table: csu_1", "question": "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'"} +{"answer": "How many faculty lines are there at San Francisco State University in 2004?\nAdditional table information: table: csu_1", "question": "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'"} +{"answer": "List the campus that have between 600 and 1000 faculty lines in year 2004.\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "What are the campuses that had between 600 and 1000 faculty members in 2004?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "How many faculty lines are there in the university that conferred the most number of degrees in year 2002?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "How many faculty members did the university that conferred the most degrees in 2002 have?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "How many faculty lines are there in the university that conferred the least number of degrees in year 2001?\nAdditional table information: table: csu_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "How many faculty members are at the university that gave the least number of degrees in 2001?\nAdditional table information: table: csu_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "How many undergraduates are there in 'San Jose State University' in year 2004?\nAdditional table information: table: csu_1", "question": "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'"} +{"answer": "How many undergraduates are there at San Jose State\nAdditional table information: table: csu_1", "question": "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'"} +{"answer": "What is the number of graduates in 'San Francisco State University' in year 2004?\nAdditional table information: table: csu_1", "question": "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'"} +{"answer": "How many people graduated from San Francisco State University in 2004?\nAdditional table information: table: csu_1", "question": "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'"} +{"answer": "What is the campus fee of 'San Francisco State University' in year 2000?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "In the year 2000, what is the campus fee for San Francisco State University?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "Find the campus fee of 'San Jose State University' in year 2000.\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "What is the campus fee in the year 2000 for San Jose State University?\nAdditional table information: table: csu_1", "question": "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"} +{"answer": "How many CSU campuses are there?\nAdditional table information: table: csu_1", "question": "SELECT COUNT(*) FROM campuses"} +{"answer": "What is the total number of campuses?\nAdditional table information: table: csu_1", "question": "SELECT COUNT(*) FROM campuses"} +{"answer": "How many candidates are there?\nAdditional table information: table: candidate_poll", "question": "SELECT COUNT(*) FROM candidate"} +{"answer": "Count the number of candidates.\nAdditional table information: table: candidate_poll", "question": "SELECT COUNT(*) FROM candidate"} +{"answer": "Which poll resource provided the most number of candidate information?\nAdditional table information: table: candidate_poll", "question": "SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Return the poll resource associated with the most candidates.\nAdditional table information: table: candidate_poll", "question": "SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "what are the top 3 highest support rates?\nAdditional table information: table: candidate_poll", "question": "SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3"} +{"answer": "Return the top 3 greatest support rates.\nAdditional table information: table: candidate_poll", "question": "SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3"} +{"answer": "Find the id of the candidate who got the lowest oppose rate.\nAdditional table information: table: candidate_poll", "question": "SELECT Candidate_ID FROM candidate ORDER BY oppose_rate NULLS FIRST LIMIT 1"} +{"answer": "What is the id of the candidate with the lowest oppose rate?\nAdditional table information: table: candidate_poll", "question": "SELECT Candidate_ID FROM candidate ORDER BY oppose_rate NULLS FIRST LIMIT 1"} +{"answer": "Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.\nAdditional table information: table: candidate_poll", "question": "SELECT Support_rate, Consider_rate, Oppose_rate FROM candidate ORDER BY unsure_rate NULLS FIRST"} +{"answer": "What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate?\nAdditional table information: table: candidate_poll", "question": "SELECT Support_rate, Consider_rate, Oppose_rate FROM candidate ORDER BY unsure_rate NULLS FIRST"} +{"answer": "which poll source does the highest oppose rate come from?\nAdditional table information: table: candidate_poll", "question": "SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1"} +{"answer": "Return the poll source corresponding to the candidate who has the oppose rate.\nAdditional table information: table: candidate_poll", "question": "SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1"} +{"answer": "List all people names in the order of their date of birth from old to young.\nAdditional table information: table: candidate_poll", "question": "SELECT name FROM people ORDER BY date_of_birth NULLS FIRST"} +{"answer": "What are the names of all people, ordered by their date of birth?\nAdditional table information: table: candidate_poll", "question": "SELECT name FROM people ORDER BY date_of_birth NULLS FIRST"} +{"answer": "Find the average height and weight for all males (sex is M).\nAdditional table information: table: candidate_poll", "question": "SELECT AVG(height), AVG(weight) FROM people WHERE sex = 'M'"} +{"answer": "What are the average height and weight across males (sex is M)?\nAdditional table information: table: candidate_poll", "question": "SELECT AVG(height), AVG(weight) FROM people WHERE sex = 'M'"} +{"answer": "find the names of people who are taller than 200 or lower than 190.\nAdditional table information: table: candidate_poll", "question": "SELECT name FROM people WHERE height > 200 OR height < 190"} +{"answer": "What are the names of people who have a height greater than 200 or less than 190?\nAdditional table information: table: candidate_poll", "question": "SELECT name FROM people WHERE height > 200 OR height < 190"} +{"answer": "Find the average and minimum weight for each gender.\nAdditional table information: table: candidate_poll", "question": "SELECT AVG(weight), MIN(weight), sex FROM people GROUP BY sex"} +{"answer": "What are the average and minimum weights for people of each sex?\nAdditional table information: table: candidate_poll", "question": "SELECT AVG(weight), MIN(weight), sex FROM people GROUP BY sex"} +{"answer": "Find the name and gender of the candidate who got the highest support rate.\nAdditional table information: table: candidate_poll", "question": "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"} +{"answer": "What is the name and sex of the candidate with the highest support rate?\nAdditional table information: table: candidate_poll", "question": "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"} +{"answer": "Find the name of the candidates whose oppose percentage is the lowest for each sex.\nAdditional table information: table: candidate_poll", "question": "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"} +{"answer": "For each sex, what is the name and sex of the candidate with the oppose rate for their sex?\nAdditional table information: table: candidate_poll", "question": "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"} +{"answer": "which gender got the highest average uncertain ratio.\nAdditional table information: table: candidate_poll", "question": "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"} +{"answer": "What is the sex of the candidate who had the highest unsure rate?\nAdditional table information: table: candidate_poll", "question": "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"} +{"answer": "what are the names of people who did not participate in the candidate election.\nAdditional table information: table: candidate_poll", "question": "SELECT name FROM people WHERE NOT people_id IN (SELECT people_id FROM candidate)"} +{"answer": "Give the names of people who did not participate in the candidate election.\nAdditional table information: table: candidate_poll", "question": "SELECT name FROM people WHERE NOT people_id IN (SELECT people_id FROM candidate)"} +{"answer": "Find the names of the candidates whose support percentage is lower than their oppose rate.\nAdditional table information: table: candidate_poll", "question": "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"} +{"answer": "What are the names of candidates who have a lower support rate than oppose rate?\nAdditional table information: table: candidate_poll", "question": "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"} +{"answer": "how many people are there whose weight is higher than 85 for each gender?\nAdditional table information: table: candidate_poll", "question": "SELECT COUNT(*), sex FROM people WHERE weight > 85 GROUP BY sex"} +{"answer": "Count the number of people of each sex who have a weight higher than 85.\nAdditional table information: table: candidate_poll", "question": "SELECT COUNT(*), sex FROM people WHERE weight > 85 GROUP BY sex"} +{"answer": "find the highest support percentage, lowest consider rate and oppose rate of all candidates.\nAdditional table information: table: candidate_poll", "question": "SELECT MAX(support_rate), MIN(consider_rate), MIN(oppose_rate) FROM candidate"} +{"answer": "Return the maximum support rate, minimum consider rate, and minimum oppose rate across all candidates?\nAdditional table information: table: candidate_poll", "question": "SELECT MAX(support_rate), MIN(consider_rate), MIN(oppose_rate) FROM candidate"} +{"answer": "list all female (sex is F) candidate names in the alphabetical order.\nAdditional table information: table: candidate_poll", "question": "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 NULLS FIRST"} +{"answer": "What are the names of all female candidates in alphabetical order (sex is F)?\nAdditional table information: table: candidate_poll", "question": "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 NULLS FIRST"} +{"answer": "find the name of people whose height is lower than the average.\nAdditional table information: table: candidate_poll", "question": "SELECT name FROM people WHERE height < (SELECT AVG(height) FROM people)"} +{"answer": "What are the names of people who are shorter than average?\nAdditional table information: table: candidate_poll", "question": "SELECT name FROM people WHERE height < (SELECT AVG(height) FROM people)"} +{"answer": "List all info about all people.\nAdditional table information: table: candidate_poll", "question": "SELECT * FROM people"} +{"answer": "What is all the information about all people?\nAdditional table information: table: candidate_poll", "question": "SELECT * FROM people"} +{"answer": "Find the titles of all movies directed by steven spielberg.\nAdditional table information: table: movie_1", "question": "SELECT title FROM Movie WHERE director = 'Steven Spielberg'"} +{"answer": "What are the names of all movies directed by Steven Spielberg?\nAdditional table information: table: movie_1", "question": "SELECT title FROM Movie WHERE director = 'Steven Spielberg'"} +{"answer": "What is the name of the movie produced after 2000 and directed by James Cameron?\nAdditional table information: table: movie_1", "question": "SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000"} +{"answer": "What are the titles of all movies that James Cameron directed after 2000?\nAdditional table information: table: movie_1", "question": "SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000"} +{"answer": "How many movies were made before 2000?\nAdditional table information: table: movie_1", "question": "SELECT COUNT(*) FROM Movie WHERE YEAR < 2000"} +{"answer": "How many movies were made before 2000?\nAdditional table information: table: movie_1", "question": "SELECT COUNT(*) FROM Movie WHERE YEAR < 2000"} +{"answer": "Who is the director of movie Avatar?\nAdditional table information: table: movie_1", "question": "SELECT director FROM Movie WHERE title = 'Avatar'"} +{"answer": "Who directed Avatar?\nAdditional table information: table: movie_1", "question": "SELECT director FROM Movie WHERE title = 'Avatar'"} +{"answer": "How many reviewers listed?\nAdditional table information: table: movie_1", "question": "SELECT COUNT(*) FROM Reviewer"} +{"answer": "How many reviewers are there?\nAdditional table information: table: movie_1", "question": "SELECT COUNT(*) FROM Reviewer"} +{"answer": "What is the id of the reviewer whose name has substring \u201cMike\u201d?\nAdditional table information: table: movie_1", "question": "SELECT rID FROM Reviewer WHERE name LIKE '%Mike%'"} +{"answer": "What is the id of the reviewer whose name includes the word 'Mike'?\nAdditional table information: table: movie_1", "question": "SELECT rID FROM Reviewer WHERE name LIKE '%Mike%'"} +{"answer": "What is the reviewer id of Daniel Lewis?\nAdditional table information: table: movie_1", "question": "SELECT rID FROM Reviewer WHERE name = 'Daniel Lewis'"} +{"answer": "What is the id of the reviewer named Daniel Lewis?\nAdditional table information: table: movie_1", "question": "SELECT rID FROM Reviewer WHERE name = 'Daniel Lewis'"} +{"answer": "What is the total number of ratings that has more than 3 stars?\nAdditional table information: table: movie_1", "question": "SELECT COUNT(*) FROM Rating WHERE stars > 3"} +{"answer": "How many movie ratings have more than 3 stars?\nAdditional table information: table: movie_1", "question": "SELECT COUNT(*) FROM Rating WHERE stars > 3"} +{"answer": "What is the lowest and highest rating star?\nAdditional table information: table: movie_1", "question": "SELECT MAX(stars), MIN(stars) FROM Rating"} +{"answer": "What is the maximum and mininum number of stars a rating can receive?\nAdditional table information: table: movie_1", "question": "SELECT MAX(stars), MIN(stars) FROM Rating"} +{"answer": "Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.\nAdditional table information: table: movie_1", "question": "SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year NULLS FIRST"} +{"answer": "In what years did a movie receive a 4 or 5 star rating, and list the years from oldest to most recently?\nAdditional table information: table: movie_1", "question": "SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year NULLS FIRST"} +{"answer": "What are the names of directors who directed movies with 5 star rating? Also return the title of these movies.\nAdditional table information: table: movie_1", "question": "SELECT T1.director, T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5"} +{"answer": "What are the names of the directors who created a movie with a 5 star rating, and what was the name of those movies?\nAdditional table information: table: movie_1", "question": "SELECT T1.director, T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5"} +{"answer": "What is the average rating star for each reviewer?\nAdditional table information: table: movie_1", "question": "SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name"} +{"answer": "What is the average number of stars that each reviewer awards for a movie?\nAdditional table information: table: movie_1", "question": "SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name"} +{"answer": "Find the titles of all movies that have no ratings.\nAdditional table information: table: movie_1", "question": "SELECT title FROM Movie WHERE NOT mID IN (SELECT mID FROM Rating)"} +{"answer": "What are the titles of all movies that have not been rated?\nAdditional table information: table: movie_1", "question": "SELECT title FROM Movie WHERE NOT mID IN (SELECT mID FROM Rating)"} +{"answer": "Find the names of all reviewers who have ratings with a NULL value for the date.\nAdditional table information: table: movie_1", "question": "SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = 'null'"} +{"answer": "What are the different names of all reviewers whose ratings do not have a date field?\nAdditional table information: table: movie_1", "question": "SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = 'null'"} +{"answer": "What is the average rating stars and title for the oldest movie?\nAdditional table information: table: movie_1", "question": "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)"} +{"answer": "For the oldest movie listed, what is its average rating and title?\nAdditional table information: table: movie_1", "question": "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)"} +{"answer": "What is the name of the most recent movie?\nAdditional table information: table: movie_1", "question": "SELECT title FROM Movie WHERE YEAR = (SELECT MAX(YEAR) FROM Movie)"} +{"answer": "What is the title of the newest movie?\nAdditional table information: table: movie_1", "question": "SELECT title FROM Movie WHERE YEAR = (SELECT MAX(YEAR) FROM Movie)"} +{"answer": "What is the maximum stars and year for the most recent movie?\nAdditional table information: table: movie_1", "question": "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)"} +{"answer": "What is highest rating for the most recent movie and when was it released?\nAdditional table information: table: movie_1", "question": "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)"} +{"answer": "What is the names of movies whose created year is after all movies directed by Steven Spielberg?\nAdditional table information: table: movie_1", "question": "SELECT title FROM Movie WHERE YEAR > (SELECT MAX(YEAR) FROM Movie WHERE director = 'Steven Spielberg')"} +{"answer": "What are the names of all movies that were created after the most recent Steven Spielberg film?\nAdditional table information: table: movie_1", "question": "SELECT title FROM Movie WHERE YEAR > (SELECT MAX(YEAR) FROM Movie WHERE director = 'Steven Spielberg')"} +{"answer": "What are the titles and directors of the movies whose star is greater than the average stars of the movies directed by James Cameron?\nAdditional table information: table: movie_1", "question": "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')"} +{"answer": "What are the titles and directors of all movies that have a rating higher than the average James Cameron film rating?\nAdditional table information: table: movie_1", "question": "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')"} +{"answer": "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.\nAdditional table information: table: movie_1", "question": "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 NULLS FIRST, T2.title NULLS FIRST, T1.stars NULLS FIRST"} +{"answer": "What is the reviewer name, film title, movie rating, and rating date for every movie ordered by reviewer name, movie title, then finally rating?\nAdditional table information: table: movie_1", "question": "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 NULLS FIRST, T2.title NULLS FIRST, T1.stars NULLS FIRST"} +{"answer": "Find the names of all reviewers who have contributed three or more ratings.\nAdditional table information: table: movie_1", "question": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3"} +{"answer": "What are the names of all reviewers that have rated 3 or more movies?\nAdditional table information: table: movie_1", "question": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3"} +{"answer": "Find the names of all reviewers who rated Gone with the Wind.\nAdditional table information: table: movie_1", "question": "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'"} +{"answer": "What are the names of all the different reviewers who rates Gone with the Wind?\nAdditional table information: table: movie_1", "question": "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'"} +{"answer": "Find the names of all directors whose movies are rated by Sarah Martinez.\nAdditional table information: table: movie_1", "question": "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'"} +{"answer": "What are the names of all directors whose movies have been reviewed by Sarah Martinez?\nAdditional table information: table: movie_1", "question": "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'"} +{"answer": "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.\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "What are the different reviewer names, movie titles, and stars for every rating where the reviewer had the same name as the director?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "Return all reviewer names and movie names together in a single list.\nAdditional table information: table: movie_1", "question": "SELECT name FROM Reviewer UNION SELECT title FROM Movie"} +{"answer": "What are the names of all the reviewers and movie names?\nAdditional table information: table: movie_1", "question": "SELECT name FROM Reviewer UNION SELECT title FROM Movie"} +{"answer": "Find the titles of all movies not reviewed by Chris Jackson.\nAdditional table information: table: movie_1", "question": "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'"} +{"answer": "What are the titles of all movies that were not reviewed by Chris Jackson?\nAdditional table information: table: movie_1", "question": "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'"} +{"answer": "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.\nAdditional table information: table: movie_1", "question": "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 NULLS FIRST, T1.title NULLS FIRST"} +{"answer": "For all directors who have directed more than one movie, what movies have they directed and what are their names?\nAdditional table information: table: movie_1", "question": "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 NULLS FIRST, T1.title NULLS FIRST"} +{"answer": "For directors who had more than one movie, return the titles and produced years of all movies directed by them.\nAdditional table information: table: movie_1", "question": "SELECT T1.title, T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title"} +{"answer": "For each director who directed more than one movie, what are the titles and dates of release for all those movies?\nAdditional table information: table: movie_1", "question": "SELECT T1.title, T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title"} +{"answer": "What are the names of the directors who made exactly one movie?\nAdditional table information: table: movie_1", "question": "SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1"} +{"answer": "What are the names of all directors who made one movie?\nAdditional table information: table: movie_1", "question": "SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1"} +{"answer": "What are the names of the directors who made exactly one movie excluding director NULL?\nAdditional table information: table: movie_1", "question": "SELECT director FROM Movie WHERE director <> 'null' GROUP BY director HAVING COUNT(*) = 1"} +{"answer": "What are the names of all directors who have made one movie except for the director named NULL?\nAdditional table information: table: movie_1", "question": "SELECT director FROM Movie WHERE director <> 'null' GROUP BY director HAVING COUNT(*) = 1"} +{"answer": "How many movie reviews does each director get?\nAdditional table information: table: movie_1", "question": "SELECT COUNT(*), T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director"} +{"answer": "For each director, how many reviews have they received?\nAdditional table information: table: movie_1", "question": "SELECT COUNT(*), T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director"} +{"answer": "Find the movies with the highest average rating. Return the movie titles and average rating.\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "What are the movie titles with the highest average rating and what are those ratings?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "What are the movie titles and average rating of the movies with the lowest average rating?\nAdditional table information: table: movie_1", "question": "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) NULLS FIRST LIMIT 1"} +{"answer": "What are the titles and average ratings for all movies that have the lowest average rating?\nAdditional table information: table: movie_1", "question": "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) NULLS FIRST LIMIT 1"} +{"answer": "What are the names and years of the movies that has the top 3 highest rating star?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "What are the names and years released for the movies with the top 3 highest ratings?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "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.\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "For each director, what are the titles and ratings for all the movies they reviewed?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "Find the title and star rating of the movie that got the least rating star for each reviewer.\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "For each reviewer id, what is the title and rating for the movie with the smallest rating?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "Find the title and score of the movie with the lowest rating among all movies directed by each director.\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "For each director, what is the title and score of their most poorly rated movie?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "What is the name of the movie that is rated by most of times?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "What is the name of the movie that has been reviewed the most?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "What are the titles of all movies that have rating star is between 3 and 5?\nAdditional table information: table: movie_1", "question": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5"} +{"answer": "What are the titles of all movies that have between 3 and 5 stars?\nAdditional table information: table: movie_1", "question": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5"} +{"answer": "Find the names of reviewers who had given higher than 3 star ratings.\nAdditional table information: table: movie_1", "question": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3"} +{"answer": "What are the names of the reviewers who have rated a movie more than 3 stars before?\nAdditional table information: table: movie_1", "question": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3"} +{"answer": "Find the average rating star for each movie that are not reviewed by Brittany Harris.\nAdditional table information: table: movie_1", "question": "SELECT mID, AVG(stars) FROM Rating WHERE NOT mID 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"} +{"answer": "What is the average rating for each movie that has never been reviewed by Brittany Harris?\nAdditional table information: table: movie_1", "question": "SELECT mID, AVG(stars) FROM Rating WHERE NOT mID 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"} +{"answer": "What are the ids of the movies that are not reviewed by Brittany Harris.\nAdditional table information: table: movie_1", "question": "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'"} +{"answer": "What are the ids of all moviest hat have not been reviewed by Britanny Harris?\nAdditional table information: table: movie_1", "question": "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'"} +{"answer": "Find the average rating star for each movie that received at least 2 ratings.\nAdditional table information: table: movie_1", "question": "SELECT mID, AVG(stars) FROM Rating GROUP BY mID HAVING COUNT(*) >= 2"} +{"answer": "For each movie that received more than 3 reviews, what is the average rating?\nAdditional table information: table: movie_1", "question": "SELECT mID, AVG(stars) FROM Rating GROUP BY mID HAVING COUNT(*) >= 2"} +{"answer": "find the ids of reviewers who did not give 4 star.\nAdditional table information: table: movie_1", "question": "SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4"} +{"answer": "What are the ids of all reviewers who did not give 4 stars?\nAdditional table information: table: movie_1", "question": "SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4"} +{"answer": "Find the ids of reviewers who didn't only give 4 star.\nAdditional table information: table: movie_1", "question": "SELECT rID FROM Rating WHERE stars <> 4"} +{"answer": "What are the ids of all reviewers who have not given 4 stars at least once?\nAdditional table information: table: movie_1", "question": "SELECT rID FROM Rating WHERE stars <> 4"} +{"answer": "What are names of the movies that are either made after 2000 or reviewed by Brittany Harris?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "What are the names of all movies that were made after 2000 or reviewed by Brittany Harris?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "What are names of the movies that are either made before 1980 or directed by James Cameron?\nAdditional table information: table: movie_1", "question": "SELECT title FROM Movie WHERE director = 'James Cameron' OR YEAR < 1980"} +{"answer": "What are the names of all movies made before 1980 or had James Cameron as the director?\nAdditional table information: table: movie_1", "question": "SELECT title FROM Movie WHERE director = 'James Cameron' OR YEAR < 1980"} +{"answer": "What are the names of reviewers who had rated 3 star and 4 star?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "What are the names of all reviewers that have given 3 or 4 stars for reviews?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "What are the names of movies that get 3 star and 4 star?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "What are the names of all movies that received 3 or 4 stars?\nAdditional table information: table: movie_1", "question": "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"} +{"answer": "How many counties are there?\nAdditional table information: table: county_public_safety", "question": "SELECT COUNT(*) FROM county_public_safety"} +{"answer": "Count the number of countries.\nAdditional table information: table: county_public_safety", "question": "SELECT COUNT(*) FROM county_public_safety"} +{"answer": "List the names of counties in descending order of population.\nAdditional table information: table: county_public_safety", "question": "SELECT Name FROM county_public_safety ORDER BY Population DESC"} +{"answer": "What are the names of the counties of public safety, ordered by population descending?\nAdditional table information: table: county_public_safety", "question": "SELECT Name FROM county_public_safety ORDER BY Population DESC"} +{"answer": "List the distinct police forces of counties whose location is not on east side.\nAdditional table information: table: county_public_safety", "question": "SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> 'East'"} +{"answer": "What are the different police forces of counties that are not located in the East?\nAdditional table information: table: county_public_safety", "question": "SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> 'East'"} +{"answer": "What are the minimum and maximum crime rate of counties?\nAdditional table information: table: county_public_safety", "question": "SELECT MIN(Crime_rate), MAX(Crime_rate) FROM county_public_safety"} +{"answer": "Return the minimum and maximum crime rates across all counties.\nAdditional table information: table: county_public_safety", "question": "SELECT MIN(Crime_rate), MAX(Crime_rate) FROM county_public_safety"} +{"answer": "Show the crime rates of counties in ascending order of number of police officers.\nAdditional table information: table: county_public_safety", "question": "SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC NULLS FIRST"} +{"answer": "What are the crime rates of counties sorted by number of offices ascending?\nAdditional table information: table: county_public_safety", "question": "SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC NULLS FIRST"} +{"answer": "What are the names of cities in ascending alphabetical order?\nAdditional table information: table: county_public_safety", "question": "SELECT Name FROM city ORDER BY Name ASC NULLS FIRST"} +{"answer": "Return the names of cities, ordered alphabetically.\nAdditional table information: table: county_public_safety", "question": "SELECT Name FROM city ORDER BY Name ASC NULLS FIRST"} +{"answer": "What are the percentage of hispanics in cities with the black percentage higher than 10?\nAdditional table information: table: county_public_safety", "question": "SELECT Hispanic FROM city WHERE Black > 10"} +{"answer": "Return the hispanic percentage for cities in which the black percentage is greater than 10.\nAdditional table information: table: county_public_safety", "question": "SELECT Hispanic FROM city WHERE Black > 10"} +{"answer": "List the name of the county with the largest population.\nAdditional table information: table: county_public_safety", "question": "SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1"} +{"answer": "What is the name of the county with the greatest population?\nAdditional table information: table: county_public_safety", "question": "SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1"} +{"answer": "List the names of the city with the top 5 white percentages.\nAdditional table information: table: county_public_safety", "question": "SELECT Name FROM city ORDER BY White DESC LIMIT 5"} +{"answer": "What are the names of the five cities with the greatest proportion of white people?\nAdditional table information: table: county_public_safety", "question": "SELECT Name FROM city ORDER BY White DESC LIMIT 5"} +{"answer": "Show names of cities and names of counties they are in.\nAdditional table information: table: county_public_safety", "question": "SELECT T1.Name, T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID"} +{"answer": "What are the names of cities, as well as the names of the counties they correspond to?\nAdditional table information: table: county_public_safety", "question": "SELECT T1.Name, T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID"} +{"answer": "Show white percentages of cities and the crime rates of counties they are in.\nAdditional table information: table: county_public_safety", "question": "SELECT T1.White, T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID"} +{"answer": "What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to?\nAdditional table information: table: county_public_safety", "question": "SELECT T1.White, T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID"} +{"answer": "Show the name of cities in the county that has the largest number of police officers.\nAdditional table information: table: county_public_safety", "question": "SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)"} +{"answer": "What are the names of cities that are in the county with the most police officers?\nAdditional table information: table: county_public_safety", "question": "SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)"} +{"answer": "Show the number of cities in counties that have a population more than 20000.\nAdditional table information: table: county_public_safety", "question": "SELECT COUNT(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000)"} +{"answer": "How many cities are in counties that have populations of over 20000?\nAdditional table information: table: county_public_safety", "question": "SELECT COUNT(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000)"} +{"answer": "Show the crime rate of counties with a city having white percentage more than 90.\nAdditional table information: table: county_public_safety", "question": "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"} +{"answer": "What are the crime rates of counties that contain cities that have white percentages of over 90?\nAdditional table information: table: county_public_safety", "question": "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"} +{"answer": "Please show the police forces and the number of counties with each police force.\nAdditional table information: table: county_public_safety", "question": "SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force"} +{"answer": "How many counties correspond to each police force?\nAdditional table information: table: county_public_safety", "question": "SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force"} +{"answer": "What is the location shared by most counties?\nAdditional table information: table: county_public_safety", "question": "SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which location has the most corresponding counties?\nAdditional table information: table: county_public_safety", "question": "SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the names of counties that do not have any cities.\nAdditional table information: table: county_public_safety", "question": "SELECT Name FROM county_public_safety WHERE NOT County_ID IN (SELECT County_ID FROM city)"} +{"answer": "What are the names of counties that do not contain any cities?\nAdditional table information: table: county_public_safety", "question": "SELECT Name FROM county_public_safety WHERE NOT County_ID IN (SELECT County_ID FROM city)"} +{"answer": "Show the police force shared by counties with location on the east and west.\nAdditional table information: table: county_public_safety", "question": "SELECT Police_force FROM county_public_safety WHERE LOCATION = 'East' INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = 'West'"} +{"answer": "Which police forces operate in both counties that are located in the East and in the West?\nAdditional table information: table: county_public_safety", "question": "SELECT Police_force FROM county_public_safety WHERE LOCATION = 'East' INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = 'West'"} +{"answer": "Show the names of cities in counties that have a crime rate less than 100.\nAdditional table information: table: county_public_safety", "question": "SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100)"} +{"answer": "What are the names of cities that are in counties that have a crime rate below 100?\nAdditional table information: table: county_public_safety", "question": "SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100)"} +{"answer": "Show the case burden of counties in descending order of population.\nAdditional table information: table: county_public_safety", "question": "SELECT Case_burden FROM county_public_safety ORDER BY Population DESC"} +{"answer": "What are the case burdens of counties, ordered descending by population?\nAdditional table information: table: county_public_safety", "question": "SELECT Case_burden FROM county_public_safety ORDER BY Population DESC"} +{"answer": "Find the names of all modern rooms with a base price below $160 and two beds.\nAdditional table information: table: inn_1", "question": "SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern'"} +{"answer": "What are the names of modern rooms that have a base price lower than $160 and two beds.\nAdditional table information: table: inn_1", "question": "SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern'"} +{"answer": "Find all the rooms that have a price higher than 160 and can accommodate more than 2 people. Report room names and ids.\nAdditional table information: table: inn_1", "question": "SELECT roomName, RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2"} +{"answer": "What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people.\nAdditional table information: table: inn_1", "question": "SELECT roomName, RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2"} +{"answer": "Find the most popular room in the hotel. The most popular room is the room that had seen the largest number of reservations.\nAdditional table information: table: inn_1", "question": "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"} +{"answer": "Which room has the largest number of reservations?\nAdditional table information: table: inn_1", "question": "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"} +{"answer": "How many kids stay in the rooms reserved by ROY SWEAZY?\nAdditional table information: table: inn_1", "question": "SELECT kids FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY'"} +{"answer": "Find the number of kids staying in the rooms reserved by a person called ROY SWEAZ.\nAdditional table information: table: inn_1", "question": "SELECT kids FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY'"} +{"answer": "How many times does ROY SWEAZY has reserved a room.\nAdditional table information: table: inn_1", "question": "SELECT COUNT(*) FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY'"} +{"answer": "Find the number of times ROY SWEAZY has reserved a room.\nAdditional table information: table: inn_1", "question": "SELECT COUNT(*) FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY'"} +{"answer": "Which room has the highest rate? List the room's full name, rate, check in and check out date.\nAdditional table information: table: inn_1", "question": "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"} +{"answer": "Return the name, rate, check in and check out date for the room with the highest rate.\nAdditional table information: table: inn_1", "question": "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"} +{"answer": "How many adults stay in the room CONRAD SELBIG checked in on Oct 23, 2010?\nAdditional table information: table: inn_1", "question": "SELECT Adults FROM Reservations WHERE CheckIn = '2010-10-23' AND FirstName = 'CONRAD' AND LastName = 'SELBIG'"} +{"answer": "Find the number of adults for the room reserved and checked in by CONRAD SELBIG on Oct 23, 2010.\nAdditional table information: table: inn_1", "question": "SELECT Adults FROM Reservations WHERE CheckIn = '2010-10-23' AND FirstName = 'CONRAD' AND LastName = 'SELBIG'"} +{"answer": "How many kids stay in the room DAMIEN TRACHSEL checked in on Sep 21, 2010?\nAdditional table information: table: inn_1", "question": "SELECT Kids FROM Reservations WHERE CheckIn = '2010-09-21' AND FirstName = 'DAMIEN' AND LastName = 'TRACHSEL'"} +{"answer": "Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on Sep 21, 2010.\nAdditional table information: table: inn_1", "question": "SELECT Kids FROM Reservations WHERE CheckIn = '2010-09-21' AND FirstName = 'DAMIEN' AND LastName = 'TRACHSEL'"} +{"answer": "How many king beds are there?\nAdditional table information: table: inn_1", "question": "SELECT SUM(beds) FROM Rooms WHERE bedtype = 'King'"} +{"answer": "Find the total number of king beds available.\nAdditional table information: table: inn_1", "question": "SELECT SUM(beds) FROM Rooms WHERE bedtype = 'King'"} +{"answer": "List the names and decor of rooms that have a king bed. Sort the list by their price.\nAdditional table information: table: inn_1", "question": "SELECT roomName, decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice NULLS FIRST"} +{"answer": "What are the names and decor of rooms with a king bed? Sort them by their price\nAdditional table information: table: inn_1", "question": "SELECT roomName, decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice NULLS FIRST"} +{"answer": "Which room has cheapest base price? List the room's name and the base price.\nAdditional table information: table: inn_1", "question": "SELECT roomName, basePrice FROM Rooms ORDER BY basePrice ASC NULLS FIRST LIMIT 1"} +{"answer": "What are the room name and base price of the room with the lowest base price?\nAdditional table information: table: inn_1", "question": "SELECT roomName, basePrice FROM Rooms ORDER BY basePrice ASC NULLS FIRST LIMIT 1"} +{"answer": "What is the decor of room Recluse and defiance?\nAdditional table information: table: inn_1", "question": "SELECT decor FROM Rooms WHERE roomName = 'Recluse and defiance'"} +{"answer": "Return the decor of the room named 'Recluse and defiance'.\nAdditional table information: table: inn_1", "question": "SELECT decor FROM Rooms WHERE roomName = 'Recluse and defiance'"} +{"answer": "What is the average base price of different bed type? List bed type and average base price.\nAdditional table information: table: inn_1", "question": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType"} +{"answer": "For each bed type, find the average base price of different bed type.\nAdditional table information: table: inn_1", "question": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType"} +{"answer": "What is the total number of people who could stay in the modern rooms in this inn?\nAdditional table information: table: inn_1", "question": "SELECT SUM(maxOccupancy) FROM Rooms WHERE decor = 'modern'"} +{"answer": "How many people in total can stay in the modern rooms of this inn?\nAdditional table information: table: inn_1", "question": "SELECT SUM(maxOccupancy) FROM Rooms WHERE decor = 'modern'"} +{"answer": "What kind of decor has the least number of reservations?\nAdditional table information: table: inn_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the least popular kind of decor?\nAdditional table information: table: inn_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "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.\nAdditional table information: table: inn_1", "question": "SELECT COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids"} +{"answer": "How many times the number of adults and kids staying in a room reached the maximum capacity of the room?\nAdditional table information: table: inn_1", "question": "SELECT COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids"} +{"answer": "Find the first and last names of people who payed more than the rooms' base prices.\nAdditional table information: table: inn_1", "question": "SELECT T1.firstname, T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0"} +{"answer": "What are the first and last names of people who payed more than the rooms' base prices?\nAdditional table information: table: inn_1", "question": "SELECT T1.firstname, T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0"} +{"answer": "How many rooms are there?\nAdditional table information: table: inn_1", "question": "SELECT COUNT(*) FROM Rooms"} +{"answer": "What is the total number of rooms available in this inn?\nAdditional table information: table: inn_1", "question": "SELECT COUNT(*) FROM Rooms"} +{"answer": "Find the number of rooms with a king bed.\nAdditional table information: table: inn_1", "question": "SELECT COUNT(*) FROM Rooms WHERE bedType = 'King'"} +{"answer": "How many rooms have a king bed?\nAdditional table information: table: inn_1", "question": "SELECT COUNT(*) FROM Rooms WHERE bedType = 'King'"} +{"answer": "Find the number of rooms for each bed type.\nAdditional table information: table: inn_1", "question": "SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType"} +{"answer": "What are the number of rooms for each bed type?\nAdditional table information: table: inn_1", "question": "SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType"} +{"answer": "Find the name of the room with the maximum occupancy.\nAdditional table information: table: inn_1", "question": "SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1"} +{"answer": "What is the name of the room that can accommodate the most people?\nAdditional table information: table: inn_1", "question": "SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1"} +{"answer": "Find the id and name of the most expensive base price room.\nAdditional table information: table: inn_1", "question": "SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1"} +{"answer": "Which room has the highest base price?\nAdditional table information: table: inn_1", "question": "SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1"} +{"answer": "List the type of bed and name of all traditional rooms.\nAdditional table information: table: inn_1", "question": "SELECT roomName, bedType FROM Rooms WHERE decor = 'traditional'"} +{"answer": "What are the bed type and name of all the rooms with traditional decor?\nAdditional table information: table: inn_1", "question": "SELECT roomName, bedType FROM Rooms WHERE decor = 'traditional'"} +{"answer": "Find the number of rooms with king bed for each decor type.\nAdditional table information: table: inn_1", "question": "SELECT decor, COUNT(*) FROM Rooms WHERE bedType = 'King' GROUP BY decor"} +{"answer": "How many rooms have king beds? Report the number for each decor type.\nAdditional table information: table: inn_1", "question": "SELECT decor, COUNT(*) FROM Rooms WHERE bedType = 'King' GROUP BY decor"} +{"answer": "Find the average and minimum price of the rooms in different decor.\nAdditional table information: table: inn_1", "question": "SELECT decor, AVG(basePrice), MIN(basePrice) FROM Rooms GROUP BY decor"} +{"answer": "What is the average minimum and price of the rooms for each different decor.\nAdditional table information: table: inn_1", "question": "SELECT decor, AVG(basePrice), MIN(basePrice) FROM Rooms GROUP BY decor"} +{"answer": "List the name of all rooms sorted by their prices.\nAdditional table information: table: inn_1", "question": "SELECT roomName FROM Rooms ORDER BY basePrice NULLS FIRST"} +{"answer": "Sort all the rooms according to the price. Just report the room names.\nAdditional table information: table: inn_1", "question": "SELECT roomName FROM Rooms ORDER BY basePrice NULLS FIRST"} +{"answer": "Find the number of rooms with price higher than 120 for different decor.\nAdditional table information: table: inn_1", "question": "SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor"} +{"answer": "How many rooms cost more than 120, for each different decor?\nAdditional table information: table: inn_1", "question": "SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor"} +{"answer": "For each bed type, find the average room price.\nAdditional table information: table: inn_1", "question": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType"} +{"answer": "What is the average base price of rooms, for each bed type?\nAdditional table information: table: inn_1", "question": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType"} +{"answer": "List the name of rooms with king or queen bed.\nAdditional table information: table: inn_1", "question": "SELECT roomName FROM Rooms WHERE bedType = 'King' OR bedType = 'Queen'"} +{"answer": "What are the names of rooms that have either king or queen bed?\nAdditional table information: table: inn_1", "question": "SELECT roomName FROM Rooms WHERE bedType = 'King' OR bedType = 'Queen'"} +{"answer": "How many different types of beds are there?\nAdditional table information: table: inn_1", "question": "SELECT COUNT(DISTINCT bedType) FROM Rooms"} +{"answer": "Find the number of distinct bed types available in this inn.\nAdditional table information: table: inn_1", "question": "SELECT COUNT(DISTINCT bedType) FROM Rooms"} +{"answer": "Find the name and id of the top 3 expensive rooms.\nAdditional table information: table: inn_1", "question": "SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3"} +{"answer": "What are the name and id of the three highest priced rooms?\nAdditional table information: table: inn_1", "question": "SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3"} +{"answer": "Find the name of rooms whose price is higher than the average price.\nAdditional table information: table: inn_1", "question": "SELECT roomName FROM Rooms WHERE basePrice > (SELECT AVG(basePrice) FROM Rooms)"} +{"answer": "What are the name of rooms that cost more than the average.\nAdditional table information: table: inn_1", "question": "SELECT roomName FROM Rooms WHERE basePrice > (SELECT AVG(basePrice) FROM Rooms)"} +{"answer": "Find the number of rooms that do not have any reservation.\nAdditional table information: table: inn_1", "question": "SELECT COUNT(*) FROM rooms WHERE NOT roomid IN (SELECT DISTINCT room FROM reservations)"} +{"answer": "How many rooms have not had any reservation yet?\nAdditional table information: table: inn_1", "question": "SELECT COUNT(*) FROM rooms WHERE NOT roomid IN (SELECT DISTINCT room FROM reservations)"} +{"answer": "Return the name and number of reservations made for each of the rooms.\nAdditional table information: table: inn_1", "question": "SELECT T2.roomName, COUNT(*), T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room"} +{"answer": "For each room, find its name and the number of times reservations were made for it.\nAdditional table information: table: inn_1", "question": "SELECT T2.roomName, COUNT(*), T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room"} +{"answer": "Find the names of rooms that have been reserved for more than 60 times.\nAdditional table information: table: inn_1", "question": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING COUNT(*) > 60"} +{"answer": "What are the names of rooms whose reservation frequency exceeds 60 times?\nAdditional table information: table: inn_1", "question": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING COUNT(*) > 60"} +{"answer": "Find the name of rooms whose base price is between 120 and 150.\nAdditional table information: table: inn_1", "question": "SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150"} +{"answer": "Which rooms cost between 120 and 150? Give me the room names.\nAdditional table information: table: inn_1", "question": "SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150"} +{"answer": "Find the name of rooms booked by some customers whose first name contains ROY.\nAdditional table information: table: inn_1", "question": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'"} +{"answer": "What are the name of rooms booked by customers whose first name has 'ROY' in part?\nAdditional table information: table: inn_1", "question": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'"} +{"answer": "what are the details of the cmi masters that have the cross reference code 'Tax'?\nAdditional table information: table: local_govt_mdm", "question": "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'"} +{"answer": "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.\nAdditional table information: table: local_govt_mdm", "question": "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"} +{"answer": "How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n\nAdditional table information: table: local_govt_mdm", "question": "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"} +{"answer": "What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id.\nAdditional table information: table: local_govt_mdm", "question": "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 NULLS FIRST"} +{"answer": "Wat is the tax source system code and master customer id of the taxes related to each parking fine id?\nAdditional table information: table: local_govt_mdm", "question": "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"} +{"answer": "What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'?\nAdditional table information: table: local_govt_mdm", "question": "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'"} +{"answer": "What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'?\nAdditional table information: table: local_govt_mdm", "question": "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'"} +{"answer": "How many different source system code for the cmi cross references are there?\nAdditional table information: table: local_govt_mdm", "question": "SELECT COUNT(DISTINCT source_system_code) FROM CMI_cross_references"} +{"answer": "List all information about customer master index, and sort them by details in descending order.\nAdditional table information: table: local_govt_mdm", "question": "SELECT * FROM customer_master_index ORDER BY cmi_details DESC"} +{"answer": "List the council tax ids and their related cmi cross references of all the parking fines.\nAdditional table information: table: local_govt_mdm", "question": "SELECT council_tax_id, cmi_cross_ref_id FROM parking_fines"} +{"answer": "How many council taxes are collected for renting arrears ?\nAdditional table information: table: local_govt_mdm", "question": "SELECT COUNT(*) FROM rent_arrears"} +{"answer": "What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'?\nAdditional table information: table: local_govt_mdm", "question": "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'"} +{"answer": "Which cmi cross reference id is not related to any parking taxes?\nAdditional table information: table: local_govt_mdm", "question": "SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines"} +{"answer": "Which distinct source system code includes the substring 'en'?\nAdditional table information: table: local_govt_mdm", "question": "SELECT DISTINCT source_system_code FROM cmi_cross_references WHERE source_system_code LIKE '%en%'"} +{"answer": "How many parties are there?\nAdditional table information: table: party_host", "question": "SELECT COUNT(*) FROM party"} +{"answer": "Count the number of parties.\nAdditional table information: table: party_host", "question": "SELECT COUNT(*) FROM party"} +{"answer": "List the themes of parties in ascending order of number of hosts.\nAdditional table information: table: party_host", "question": "SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC NULLS FIRST"} +{"answer": "What are the themes of parties ordered by the number of hosts in ascending manner?\nAdditional table information: table: party_host", "question": "SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC NULLS FIRST"} +{"answer": "What are the themes and locations of parties?\nAdditional table information: table: party_host", "question": "SELECT Party_Theme, LOCATION FROM party"} +{"answer": "Give me the theme and location of each party.\nAdditional table information: table: party_host", "question": "SELECT Party_Theme, LOCATION FROM party"} +{"answer": "Show the first year and last year of parties with theme 'Spring' or 'Teqnology'.\nAdditional table information: table: party_host", "question": "SELECT First_year, Last_year FROM party WHERE Party_Theme = 'Spring' OR Party_Theme = 'Teqnology'"} +{"answer": "What are the first year and last year of the parties whose theme is 'Spring' or 'Teqnology'?\nAdditional table information: table: party_host", "question": "SELECT First_year, Last_year FROM party WHERE Party_Theme = 'Spring' OR Party_Theme = 'Teqnology'"} +{"answer": "What is the average number of hosts for parties?\nAdditional table information: table: party_host", "question": "SELECT AVG(Number_of_hosts) FROM party"} +{"answer": "Compute the average number of hosts for parties.\nAdditional table information: table: party_host", "question": "SELECT AVG(Number_of_hosts) FROM party"} +{"answer": "What is the location of the party with the most hosts?\nAdditional table information: table: party_host", "question": "SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1"} +{"answer": "Which party had the most hosts? Give me the party location.\nAdditional table information: table: party_host", "question": "SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1"} +{"answer": "Show different nationalities along with the number of hosts of each nationality.\nAdditional table information: table: party_host", "question": "SELECT Nationality, COUNT(*) FROM HOST GROUP BY Nationality"} +{"answer": "How many hosts does each nationality have? List the nationality and the count.\nAdditional table information: table: party_host", "question": "SELECT Nationality, COUNT(*) FROM HOST GROUP BY Nationality"} +{"answer": "Show the most common nationality of hosts.\nAdditional table information: table: party_host", "question": "SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which nationality has the most hosts?\nAdditional table information: table: party_host", "question": "SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the nations that have both hosts older than 45 and hosts younger than 35.\nAdditional table information: table: party_host", "question": "SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35"} +{"answer": "Which nations have both hosts of age above 45 and hosts of age below 35?\nAdditional table information: table: party_host", "question": "SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35"} +{"answer": "Show the themes of parties and the names of the party hosts.\nAdditional table information: table: party_host", "question": "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"} +{"answer": "For each party, return its theme and the name of its host.\nAdditional table information: table: party_host", "question": "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"} +{"answer": "Show the locations of parties and the names of the party hosts in ascending order of the age of the host.\nAdditional table information: table: party_host", "question": "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 NULLS FIRST"} +{"answer": "For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host.\nAdditional table information: table: party_host", "question": "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 NULLS FIRST"} +{"answer": "Show the locations of parties with hosts older than 50.\nAdditional table information: table: party_host", "question": "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"} +{"answer": "Which parties have hosts of age above 50? Give me the party locations.\nAdditional table information: table: party_host", "question": "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"} +{"answer": "Show the host names for parties with number of hosts greater than 20.\nAdditional table information: table: party_host", "question": "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"} +{"answer": "Which parties have more than 20 hosts? Give me the host names for these parties.\nAdditional table information: table: party_host", "question": "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"} +{"answer": "Show the name and the nationality of the oldest host.\nAdditional table information: table: party_host", "question": "SELECT Name, Nationality FROM HOST ORDER BY Age DESC LIMIT 1"} +{"answer": "What are the name and the nationality of the host of the highest age?\nAdditional table information: table: party_host", "question": "SELECT Name, Nationality FROM HOST ORDER BY Age DESC LIMIT 1"} +{"answer": "List the names of hosts who did not serve as a host of any party in our record.\nAdditional table information: table: party_host", "question": "SELECT Name FROM HOST WHERE NOT Host_ID IN (SELECT Host_ID FROM party_host)"} +{"answer": "What are the names of hosts who did not host any party in our record?\nAdditional table information: table: party_host", "question": "SELECT Name FROM HOST WHERE NOT Host_ID IN (SELECT Host_ID FROM party_host)"} +{"answer": "How many regions do we have?\nAdditional table information: table: storm_record", "question": "SELECT COUNT(*) FROM region"} +{"answer": "Count the number of regions.\nAdditional table information: table: storm_record", "question": "SELECT COUNT(*) FROM region"} +{"answer": "Show all region code and region name sorted by the codes.\nAdditional table information: table: storm_record", "question": "SELECT region_code, region_name FROM region ORDER BY region_code NULLS FIRST"} +{"answer": "What are the codes and names for all regions, sorted by codes?\nAdditional table information: table: storm_record", "question": "SELECT region_code, region_name FROM region ORDER BY region_code NULLS FIRST"} +{"answer": "List all region names in alphabetical order.\nAdditional table information: table: storm_record", "question": "SELECT region_name FROM region ORDER BY region_name NULLS FIRST"} +{"answer": "What are the names of the regions in alphabetical order?\nAdditional table information: table: storm_record", "question": "SELECT region_name FROM region ORDER BY region_name NULLS FIRST"} +{"answer": "Show names for all regions except for Denmark.\nAdditional table information: table: storm_record", "question": "SELECT region_name FROM region WHERE region_name <> 'Denmark'"} +{"answer": "Return the names of all regions other than Denmark.\nAdditional table information: table: storm_record", "question": "SELECT region_name FROM region WHERE region_name <> 'Denmark'"} +{"answer": "How many storms had death records?\nAdditional table information: table: storm_record", "question": "SELECT COUNT(*) FROM storm WHERE Number_Deaths > 0"} +{"answer": "Count the number of storms in which at least 1 person died.\nAdditional table information: table: storm_record", "question": "SELECT COUNT(*) FROM storm WHERE Number_Deaths > 0"} +{"answer": "List name, dates active, and number of deaths for all storms with at least 1 death.\nAdditional table information: table: storm_record", "question": "SELECT name, dates_active, number_deaths FROM storm WHERE number_deaths >= 1"} +{"answer": "What are the names, dates active, and number of deaths for storms that had 1 or more death?\nAdditional table information: table: storm_record", "question": "SELECT name, dates_active, number_deaths FROM storm WHERE number_deaths >= 1"} +{"answer": "Show the average and maximum damage for all storms with max speed higher than 1000.\nAdditional table information: table: storm_record", "question": "SELECT AVG(damage_millions_USD), MAX(damage_millions_USD) FROM storm WHERE max_speed > 1000"} +{"answer": "What is the average and maximum damage in millions for storms that had a max speed over 1000?\nAdditional table information: table: storm_record", "question": "SELECT AVG(damage_millions_USD), MAX(damage_millions_USD) FROM storm WHERE max_speed > 1000"} +{"answer": "What is the total number of deaths and damage for all storms with a max speed greater than the average?\nAdditional table information: table: storm_record", "question": "SELECT SUM(number_deaths), SUM(damage_millions_USD) FROM storm WHERE max_speed > (SELECT AVG(max_speed) FROM storm)"} +{"answer": "Return the total number of deaths and total damange in millions for storms that had a max speed greater than the average.\nAdditional table information: table: storm_record", "question": "SELECT SUM(number_deaths), SUM(damage_millions_USD) FROM storm WHERE max_speed > (SELECT AVG(max_speed) FROM storm)"} +{"answer": "List name and damage for all storms in a descending order of max speed.\nAdditional table information: table: storm_record", "question": "SELECT name, damage_millions_USD FROM storm ORDER BY max_speed DESC"} +{"answer": "What are the names and damage in millions for storms, ordered by their max speeds descending?\nAdditional table information: table: storm_record", "question": "SELECT name, damage_millions_USD FROM storm ORDER BY max_speed DESC"} +{"answer": "How many regions are affected?\nAdditional table information: table: storm_record", "question": "SELECT COUNT(DISTINCT region_id) FROM affected_region"} +{"answer": "Count the number of different affected regions.\nAdditional table information: table: storm_record", "question": "SELECT COUNT(DISTINCT region_id) FROM affected_region"} +{"answer": "Show the name for regions not affected.\nAdditional table information: table: storm_record", "question": "SELECT region_name FROM region WHERE NOT region_id IN (SELECT region_id FROM affected_region)"} +{"answer": "What are the names of regions that were not affected?\nAdditional table information: table: storm_record", "question": "SELECT region_name FROM region WHERE NOT region_id IN (SELECT region_id FROM affected_region)"} +{"answer": "Show the name for regions and the number of storms for each region.\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "How many storms occured in each region?\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "List the name for storms and the number of affected regions for each storm.\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "How many regions were affected by each storm?\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "What is the storm name and max speed which affected the greatest number of regions?\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "Return the name and max speed of the storm that affected the most regions.\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "Show the name of storms which don't have affected region in record.\nAdditional table information: table: storm_record", "question": "SELECT name FROM storm WHERE NOT storm_id IN (SELECT storm_id FROM affected_region)"} +{"answer": "What are the names of storms that did not affect any regions?\nAdditional table information: table: storm_record", "question": "SELECT name FROM storm WHERE NOT storm_id IN (SELECT storm_id FROM affected_region)"} +{"answer": "Show storm name with at least two regions and 10 cities affected.\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "What are the names of storms that both affected two or more regions and affected a total of 10 or more cities?\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "Show all storm names except for those with at least two affected regions.\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "What are the names of storms that did not affect two or more regions?\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "What are the region names affected by the storm with a number of deaths of least 10?\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "Return the names of the regions affected by storms that had a death count of at least 10.\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "Show all storm names affecting region 'Denmark'.\nAdditional table information: table: storm_record", "question": "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'"} +{"answer": "What are the names of the storms that affected Denmark?\nAdditional table information: table: storm_record", "question": "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'"} +{"answer": "Show the region name with at least two storms.\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "What are the names of regions with two or more storms?\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "Find the names of the regions which were affected by the storm that killed the greatest number of people.\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "What are the names of regions that were affected by the storm in which the most people died?\nAdditional table information: table: storm_record", "question": "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"} +{"answer": "Find the name of the storm that affected both Afghanistan and Albania regions.\nAdditional table information: table: storm_record", "question": "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'"} +{"answer": "What are the names of the storms that affected both the regions of Afghanistan and Albania?\nAdditional table information: table: storm_record", "question": "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'"} +{"answer": "How many counties are there in total?\nAdditional table information: table: election", "question": "SELECT COUNT(*) FROM county"} +{"answer": "Count the total number of counties.\nAdditional table information: table: election", "question": "SELECT COUNT(*) FROM county"} +{"answer": "Show the county name and population of all counties.\nAdditional table information: table: election", "question": "SELECT County_name, Population FROM county"} +{"answer": "What are the name and population of each county?\nAdditional table information: table: election", "question": "SELECT County_name, Population FROM county"} +{"answer": "Show the average population of all counties.\nAdditional table information: table: election", "question": "SELECT AVG(Population) FROM county"} +{"answer": "On average how large is the population of the counties?\nAdditional table information: table: election", "question": "SELECT AVG(Population) FROM county"} +{"answer": "Return the maximum and minimum population among all counties.\nAdditional table information: table: election", "question": "SELECT MAX(Population), MIN(Population) FROM county"} +{"answer": "What are the maximum and minimum population of the counties?\nAdditional table information: table: election", "question": "SELECT MAX(Population), MIN(Population) FROM county"} +{"answer": "Show all the distinct districts for elections.\nAdditional table information: table: election", "question": "SELECT DISTINCT District FROM election"} +{"answer": "What are the distinct districts for elections?\nAdditional table information: table: election", "question": "SELECT DISTINCT District FROM election"} +{"answer": "Show the zip code of the county with name 'Howard'.\nAdditional table information: table: election", "question": "SELECT Zip_code FROM county WHERE County_name = 'Howard'"} +{"answer": "What is the zip code the county named 'Howard' is located in?\nAdditional table information: table: election", "question": "SELECT Zip_code FROM county WHERE County_name = 'Howard'"} +{"answer": "Show the delegate from district 1 in election.\nAdditional table information: table: election", "question": "SELECT Delegate FROM election WHERE District = 1"} +{"answer": "Who is the delegate of district 1 in the elections?\nAdditional table information: table: election", "question": "SELECT Delegate FROM election WHERE District = 1"} +{"answer": "Show the delegate and committee information of elections.\nAdditional table information: table: election", "question": "SELECT Delegate, Committee FROM election"} +{"answer": "What are the delegate and committee information for each election record?\nAdditional table information: table: election", "question": "SELECT Delegate, Committee FROM election"} +{"answer": "How many distinct governors are there?\nAdditional table information: table: election", "question": "SELECT COUNT(DISTINCT Governor) FROM party"} +{"answer": "Count the number of distinct governors.\nAdditional table information: table: election", "question": "SELECT COUNT(DISTINCT Governor) FROM party"} +{"answer": "Show the lieutenant governor and comptroller from the democratic party.\nAdditional table information: table: election", "question": "SELECT Lieutenant_Governor, Comptroller FROM party WHERE Party = 'Democratic'"} +{"answer": "Who are the lieutenant governor and comptroller from the democratic party?\nAdditional table information: table: election", "question": "SELECT Lieutenant_Governor, Comptroller FROM party WHERE Party = 'Democratic'"} +{"answer": "In which distinct years was the governor 'Eliot Spitzer'?\nAdditional table information: table: election", "question": "SELECT DISTINCT YEAR FROM party WHERE Governor = 'Eliot Spitzer'"} +{"answer": "Find the distinct years when the governor was named 'Eliot Spitzer'.\nAdditional table information: table: election", "question": "SELECT DISTINCT YEAR FROM party WHERE Governor = 'Eliot Spitzer'"} +{"answer": "Show all the information about election.\nAdditional table information: table: election", "question": "SELECT * FROM election"} +{"answer": "Return all the information for each election record.\nAdditional table information: table: election", "question": "SELECT * FROM election"} +{"answer": "Show the delegates and the names of county they belong to.\nAdditional table information: table: election", "question": "SELECT T2.Delegate, T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District"} +{"answer": "What are the delegate and name of the county they belong to, for each county?\nAdditional table information: table: election", "question": "SELECT T2.Delegate, T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District"} +{"answer": "Which delegates are from counties with population smaller than 100000?\nAdditional table information: table: election", "question": "SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000"} +{"answer": "Find the delegates who are from counties with population below 100000.\nAdditional table information: table: election", "question": "SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000"} +{"answer": "How many distinct delegates are from counties with population larger than 50000?\nAdditional table information: table: election", "question": "SELECT COUNT(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000"} +{"answer": "Count the number of distinct delegates who are from counties with population above 50000.\nAdditional table information: table: election", "question": "SELECT COUNT(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000"} +{"answer": "What are the names of the county that the delegates on 'Appropriations' committee belong to?\nAdditional table information: table: election", "question": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = 'Appropriations'"} +{"answer": "Which county do the delegates on 'Appropriations' committee belong to? Give me the county names.\nAdditional table information: table: election", "question": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = 'Appropriations'"} +{"answer": "Show the delegates and the names of the party they belong to.\nAdditional table information: table: election", "question": "SELECT T1.Delegate, T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID"} +{"answer": "For each delegate, find the names of the party they are part of.\nAdditional table information: table: election", "question": "SELECT T1.Delegate, T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID"} +{"answer": "Who were the governors of the parties associated with delegates from district 1?\nAdditional table information: table: election", "question": "SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1"} +{"answer": "Find the parties associated with the delegates from district 1. Who served as governors of the parties?\nAdditional table information: table: election", "question": "SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1"} +{"answer": "Who were the comptrollers of the parties associated with the delegates from district 1 or district 2?\nAdditional table information: table: election", "question": "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"} +{"answer": "Find the parties associated with the delegates from district 1 or 2. Who served as comptrollers of the parties?\nAdditional table information: table: election", "question": "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"} +{"answer": "Return all the committees that have delegates from Democratic party.\nAdditional table information: table: election", "question": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic'"} +{"answer": "Which committees have delegates from the Democratic party?\nAdditional table information: table: election", "question": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic'"} +{"answer": "Show the name of each county along with the corresponding number of delegates from that county.\nAdditional table information: table: election", "question": "SELECT T1.County_name, COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id"} +{"answer": "For each county, find the name of the county and the number of delegates from that county.\nAdditional table information: table: election", "question": "SELECT T1.County_name, COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id"} +{"answer": "Show the name of each party and the corresponding number of delegates from that party.\nAdditional table information: table: election", "question": "SELECT T2.Party, COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party"} +{"answer": "For each party, return the name of the party and the number of delegates from that party.\nAdditional table information: table: election", "question": "SELECT T2.Party, COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party"} +{"answer": "Return the names of all counties sorted by population in ascending order.\nAdditional table information: table: election", "question": "SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST"} +{"answer": "Sort the names of all counties in ascending order of population.\nAdditional table information: table: election", "question": "SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST"} +{"answer": "Return the names of all counties sorted by county name in descending alphabetical order.\nAdditional table information: table: election", "question": "SELECT County_name FROM county ORDER BY County_name DESC"} +{"answer": "Sort the names of all counties in descending alphabetical order.\nAdditional table information: table: election", "question": "SELECT County_name FROM county ORDER BY County_name DESC"} +{"answer": "Show the name of the county with the biggest population.\nAdditional table information: table: election", "question": "SELECT County_name FROM county ORDER BY Population DESC LIMIT 1"} +{"answer": "Which county has the largest population? Give me the name of the county.\nAdditional table information: table: election", "question": "SELECT County_name FROM county ORDER BY Population DESC LIMIT 1"} +{"answer": "Show the 3 counties with the smallest population.\nAdditional table information: table: election", "question": "SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST LIMIT 3"} +{"answer": "What are the 3 counties that have the smallest population? Give me the county names.\nAdditional table information: table: election", "question": "SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST LIMIT 3"} +{"answer": "Show the names of counties that have at least two delegates.\nAdditional table information: table: election", "question": "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"} +{"answer": "Which counties have two or more delegates? Give me the county names.\nAdditional table information: table: election", "question": "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"} +{"answer": "Show the name of the party that has at least two records.\nAdditional table information: table: election", "question": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2"} +{"answer": "Which party has two or more records?\nAdditional table information: table: election", "question": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2"} +{"answer": "Show the name of the party that has the most delegates.\nAdditional table information: table: election", "question": "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"} +{"answer": "Which party has the largest number of delegates?\nAdditional table information: table: election", "question": "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"} +{"answer": "Show the people that have been governor the most times.\nAdditional table information: table: election", "question": "SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which people severed as governor most frequently?\nAdditional table information: table: election", "question": "SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the people that have been comptroller the most times and the corresponding number of times.\nAdditional table information: table: election", "question": "SELECT Comptroller, COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which people severed as comptroller most frequently? Give me the name of the person and the frequency count.\nAdditional table information: table: election", "question": "SELECT Comptroller, COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the names of parties that do not have delegates in election?\nAdditional table information: table: election", "question": "SELECT Party FROM party WHERE NOT Party_ID IN (SELECT Party FROM election)"} +{"answer": "Which parties did not have any delegates in elections?\nAdditional table information: table: election", "question": "SELECT Party FROM party WHERE NOT Party_ID IN (SELECT Party FROM election)"} +{"answer": "What are the names of parties that have both delegates on 'Appropriations' committee and\nAdditional table information: table: election", "question": "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'"} +{"answer": "Which parties have delegates in both the 'Appropriations' committee and the 'Economic Matters' committee?\nAdditional table information: table: election", "question": "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'"} +{"answer": "Which committees have delegates from both democratic party and liberal party?\nAdditional table information: table: election", "question": "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'"} +{"answer": "Find the committees that have delegates both from from the democratic party and the liberal party.\nAdditional table information: table: election", "question": "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'"} +{"answer": "How many journalists are there?\nAdditional table information: table: news_report", "question": "SELECT COUNT(*) FROM journalist"} +{"answer": "List the names of journalists in ascending order of years working.\nAdditional table information: table: news_report", "question": "SELECT Name FROM journalist ORDER BY Years_working ASC NULLS FIRST"} +{"answer": "What are the nationalities and ages of journalists?\nAdditional table information: table: news_report", "question": "SELECT Nationality, Age FROM journalist"} +{"answer": "Show the names of journalists from 'England' or 'Wales'.\nAdditional table information: table: news_report", "question": "SELECT Name FROM journalist WHERE Nationality = 'England' OR Nationality = 'Wales'"} +{"answer": "What is the average number of years spent working as a journalist?\nAdditional table information: table: news_report", "question": "SELECT AVG(Years_working) FROM journalist"} +{"answer": "What is the nationality of the journalist with the largest number of years working?\nAdditional table information: table: news_report", "question": "SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1"} +{"answer": "Show the different nationalities and the number of journalists of each nationality.\nAdditional table information: table: news_report", "question": "SELECT Nationality, COUNT(*) FROM journalist GROUP BY Nationality"} +{"answer": "Show the most common nationality for journalists.\nAdditional table information: table: news_report", "question": "SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.\nAdditional table information: table: news_report", "question": "SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3"} +{"answer": "Show the dates, places, and names of events in descending order of the attendance.\nAdditional table information: table: news_report", "question": "SELECT Date, Name, venue FROM event ORDER BY Event_Attendance DESC"} +{"answer": "Show the names of journalists and the dates of the events they reported.\nAdditional table information: table: news_report", "question": "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"} +{"answer": "Show the names of journalists and the names of the events they reported in ascending order\nAdditional table information: table: news_report", "question": "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 NULLS FIRST"} +{"answer": "Show the names of journalists and the number of events they reported.\nAdditional table information: table: news_report", "question": "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"} +{"answer": "Show the names of journalists that have reported more than one event.\nAdditional table information: table: news_report", "question": "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"} +{"answer": "List the names of journalists who have not reported any event.\nAdditional table information: table: news_report", "question": "SELECT Name FROM journalist WHERE NOT journalist_ID IN (SELECT journalist_ID FROM news_report)"} +{"answer": "what are the average and maximum attendances of all events?\nAdditional table information: table: news_report", "question": "SELECT AVG(Event_Attendance), MAX(Event_Attendance) FROM event"} +{"answer": "Find the average age and experience working length of journalists working on different role type.\nAdditional table information: table: news_report", "question": "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"} +{"answer": "List the event venues and names that have the top 2 most number of people attended.\nAdditional table information: table: news_report", "question": "SELECT venue, name FROM event ORDER BY Event_Attendance DESC LIMIT 2"} +{"answer": "Show me all the restaurants.\nAdditional table information: table: restaurant_1", "question": "SELECT ResName FROM Restaurant"} +{"answer": "What is the address of the restaurant Subway?\nAdditional table information: table: restaurant_1", "question": "SELECT Address FROM Restaurant WHERE ResName = 'Subway'"} +{"answer": "What is the rating of the restaurant Subway?\nAdditional table information: table: restaurant_1", "question": "SELECT Rating FROM Restaurant WHERE ResName = 'Subway'"} +{"answer": "List all restaurant types.\nAdditional table information: table: restaurant_1", "question": "SELECT ResTypeName FROM Restaurant_Type"} +{"answer": "What is the description of the restaurant type Sandwich?\nAdditional table information: table: restaurant_1", "question": "SELECT ResTypeDescription FROM Restaurant_Type WHERE ResTypeName = 'Sandwich'"} +{"answer": "Which restaurants have highest rating? List the restaurant name and its rating.\nAdditional table information: table: restaurant_1", "question": "SELECT ResName, Rating FROM Restaurant ORDER BY Rating DESC LIMIT 1"} +{"answer": "What is the age of student Linda Smith?\nAdditional table information: table: restaurant_1", "question": "SELECT Age FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith'"} +{"answer": "What is the gender of the student Linda Smith?\nAdditional table information: table: restaurant_1", "question": "SELECT Sex FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith'"} +{"answer": "List all students' first names and last names who majored in 600.\nAdditional table information: table: restaurant_1", "question": "SELECT Fname, Lname FROM Student WHERE Major = 600"} +{"answer": "Which city does student Linda Smith live in?\nAdditional table information: table: restaurant_1", "question": "SELECT city_code FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith'"} +{"answer": "Advisor 1121 has how many students?\nAdditional table information: table: restaurant_1", "question": "SELECT COUNT(*) FROM Student WHERE Advisor = 1121"} +{"answer": "Which Advisor has most of students? List advisor and the number of students.\nAdditional table information: table: restaurant_1", "question": "SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor ORDER BY COUNT(Advisor) DESC LIMIT 1"} +{"answer": "Which major has least number of students? List the major and the number of students.\nAdditional table information: table: restaurant_1", "question": "SELECT Major, COUNT(*) FROM Student GROUP BY Major ORDER BY COUNT(Major) ASC NULLS FIRST LIMIT 1"} +{"answer": "Which major has between 2 and 30 number of students? List major and the number of students.\nAdditional table information: table: restaurant_1", "question": "SELECT Major, COUNT(*) FROM Student GROUP BY Major HAVING COUNT(Major) BETWEEN 2 AND 30"} +{"answer": "Which student's age is older than 18 and is majoring in 600? List each student's first and last name.\nAdditional table information: table: restaurant_1", "question": "SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major = 600"} +{"answer": "List all female students age is older than 18 who is not majoring in 600. List students' first name and last name.\nAdditional table information: table: restaurant_1", "question": "SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major <> 600 AND Sex = 'F'"} +{"answer": "How many restaurant is the Sandwich type restaurant?\nAdditional table information: table: restaurant_1", "question": "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'"} +{"answer": "How long does student Linda Smith spend on the restaurant in total?\nAdditional table information: table: restaurant_1", "question": "SELECT SUM(Spent) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID WHERE Student.Fname = 'Linda' AND Student.Lname = 'Smith'"} +{"answer": "How many times has the student Linda Smith visited Subway?\nAdditional table information: table: restaurant_1", "question": "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'"} +{"answer": "When did Linda Smith visit Subway?\nAdditional table information: table: restaurant_1", "question": "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'"} +{"answer": "At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.\nAdditional table information: table: restaurant_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Which student visited restaurant most often? List student's first name and last name.\nAdditional table information: table: restaurant_1", "question": "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"} +{"answer": "Find the ids of orders whose status is 'Success'.\nAdditional table information: table: customer_deliveries", "question": "SELECT actual_order_id FROM actual_orders WHERE order_status_code = 'Success'"} +{"answer": "Find the name and price of the product that has been ordered the greatest number of times.\nAdditional table information: table: customer_deliveries", "question": "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"} +{"answer": "Find the number of customers in total.\nAdditional table information: table: customer_deliveries", "question": "SELECT COUNT(*) FROM customers"} +{"answer": "How many different payment methods are there?\nAdditional table information: table: customer_deliveries", "question": "SELECT COUNT(DISTINCT payment_method) FROM customers"} +{"answer": "Show the details of all trucks in the order of their license number.\nAdditional table information: table: customer_deliveries", "question": "SELECT truck_details FROM trucks ORDER BY truck_licence_number NULLS FIRST"} +{"answer": "Find the name of the most expensive product.\nAdditional table information: table: customer_deliveries", "question": "SELECT product_name FROM products ORDER BY product_price DESC LIMIT 1"} +{"answer": "Find the names of customers who are not living in the state of California.\nAdditional table information: table: customer_deliveries", "question": "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'"} +{"answer": "List the names and emails of customers who payed by Visa card.\nAdditional table information: table: customer_deliveries", "question": "SELECT customer_email, customer_name FROM customers WHERE payment_method = 'Visa'"} +{"answer": "Find the names and phone numbers of customers living in California state.\nAdditional table information: table: customer_deliveries", "question": "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'"} +{"answer": "Find the states which do not have any employee in their record.\nAdditional table information: table: customer_deliveries", "question": "SELECT state_province_county FROM addresses WHERE NOT address_id IN (SELECT employee_address_id FROM Employees)"} +{"answer": "List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers.\nAdditional table information: table: customer_deliveries", "question": "SELECT customer_name, customer_phone, customer_email FROM Customers ORDER BY date_became_customer NULLS FIRST"} +{"answer": "Find the name of the first 5 customers.\nAdditional table information: table: customer_deliveries", "question": "SELECT customer_name FROM Customers ORDER BY date_became_customer NULLS FIRST LIMIT 5"} +{"answer": "Find the payment method that is used most frequently.\nAdditional table information: table: customer_deliveries", "question": "SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the names of all routes in alphabetic order.\nAdditional table information: table: customer_deliveries", "question": "SELECT route_name FROM Delivery_Routes ORDER BY route_name NULLS FIRST"} +{"answer": "Find the name of route that has the highest number of deliveries.\nAdditional table information: table: customer_deliveries", "question": "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"} +{"answer": "List the state names and the number of customers living in each state.\nAdditional table information: table: customer_deliveries", "question": "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"} +{"answer": "How many authors are there?\nAdditional table information: table: icfp_1", "question": "SELECT COUNT(*) FROM authors"} +{"answer": "Count the number of authors.\nAdditional table information: table: icfp_1", "question": "SELECT COUNT(*) FROM authors"} +{"answer": "How many institutions are there?\nAdditional table information: table: icfp_1", "question": "SELECT COUNT(*) FROM inst"} +{"answer": "Count the number of institutions.\nAdditional table information: table: icfp_1", "question": "SELECT COUNT(*) FROM inst"} +{"answer": "How many papers are published in total?\nAdditional table information: table: icfp_1", "question": "SELECT COUNT(*) FROM papers"} +{"answer": "Count the number of total papers.\nAdditional table information: table: icfp_1", "question": "SELECT COUNT(*) FROM papers"} +{"answer": "What are the titles of papers published by 'Jeremy Gibbons'?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Find the titles of all the papers written by 'Jeremy Gibbons'\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Find all the papers published by 'Aaron Turon'.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Find the titles of all the papers written by 'Aaron Turon'.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "How many papers have 'Atsushi Ohori' published?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "How many papers are 'Atsushi Ohori' the author of?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "What is the name of the institution that 'Matthias Blume' belongs to?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Which institution is the author 'Matthias Blume' belong to? Give me the name of the institution.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Which institution does 'Katsuhiro Ueno' belong to?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "What is the name of the institution the author 'Katsuhiro Ueno' belongs to?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Who belong to the institution 'University of Oxford'? Show the first names and last names.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Find the first names and last names of the authors whose institution affiliation is 'University of Oxford'.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Which authors belong to the institution 'Google'? Show the first names and last names.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Find the first names and last names of the authors whose institution affiliation is 'Google'.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "What are the last names of the author of the paper titled 'Binders Unbound'?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Who is the author of the paper titled 'Binders Unbound'? Give me the last name.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Find the first and last name of the author(s) who wrote the paper 'Nameless, Painless'.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "What are the first and last name of the author who published the paper titled 'Nameless, Painless'?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "What are the papers published under the institution 'Indiana University'?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "List the titles of the papers whose authors are from the institution 'Indiana University'.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Find all the papers published by the institution 'Google'.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Which papers were written by authors from the institution 'Google'?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "How many papers are published by the institution 'Tokohu University'?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Find the number of papers published by authors from the institution 'Tokohu University'.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Find the number of papers published by the institution 'University of Pennsylvania'.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "How many papers are written by authors from the institution 'University of Pennsylvania'?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Find the papers which have 'Olin Shivers' as an author.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Which papers did the author 'Olin Shivers' write? Give me the paper titles.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Which papers have 'Stephanie Weirich' as an author?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Find the titles of the papers the author 'Stephanie Weirich' wrote.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Which paper is published in an institution in 'USA' and have 'Turon' as its second author?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Find papers whose second author has last name 'Turon' and is affiliated with an institution in the country 'USA'.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "Find the titles of papers whose first author is affiliated with an institution in the country 'Japan' and has last name 'Ohori'?\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "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.\nAdditional table information: table: icfp_1", "question": "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'"} +{"answer": "What is the last name of the author that has published the most papers?\nAdditional table information: table: icfp_1", "question": "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"} +{"answer": "Which author has written the most papers? Find his or her last name.\nAdditional table information: table: icfp_1", "question": "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"} +{"answer": "Retrieve the country that has published the most papers.\nAdditional table information: table: icfp_1", "question": "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"} +{"answer": "Find the country that the most papers are affiliated with.\nAdditional table information: table: icfp_1", "question": "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"} +{"answer": "Find the name of the organization that has published the largest number of papers.\nAdditional table information: table: icfp_1", "question": "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"} +{"answer": "Which institution has the most papers? Find the name of the institution.\nAdditional table information: table: icfp_1", "question": "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"} +{"answer": "Find the titles of the papers that contain the word 'ML'.\nAdditional table information: table: icfp_1", "question": "SELECT title FROM papers WHERE title LIKE '%ML%'"} +{"answer": "Which papers have the substring 'ML' in their titles? Return the titles of the papers.\nAdditional table information: table: icfp_1", "question": "SELECT title FROM papers WHERE title LIKE '%ML%'"} +{"answer": "Which paper's title contains the word 'Database'?\nAdditional table information: table: icfp_1", "question": "SELECT title FROM papers WHERE title LIKE '%Database%'"} +{"answer": "Which papers have the substring 'Database' in their titles? Show the titles of the papers.\nAdditional table information: table: icfp_1", "question": "SELECT title FROM papers WHERE title LIKE '%Database%'"} +{"answer": "Find the first names of all the authors who have written a paper with title containing the word 'Functional'.\nAdditional table information: table: icfp_1", "question": "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%'"} +{"answer": "Who has written a paper that has the word 'Functional' in its title? Return the first names of the authors.\nAdditional table information: table: icfp_1", "question": "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%'"} +{"answer": "Find the last names of all the authors that have written a paper with title containing the word 'Monadic'.\nAdditional table information: table: icfp_1", "question": "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%'"} +{"answer": "Which authors have written a paper with title containing the word 'Monadic'? Return their last names.\nAdditional table information: table: icfp_1", "question": "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%'"} +{"answer": "Retrieve the title of the paper that has the largest number of authors.\nAdditional table information: table: icfp_1", "question": "SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship)"} +{"answer": "Which paper has the most authors? Give me the paper title.\nAdditional table information: table: icfp_1", "question": "SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship)"} +{"answer": "What is the first name of the author with last name 'Ueno'?\nAdditional table information: table: icfp_1", "question": "SELECT fname FROM authors WHERE lname = 'Ueno'"} +{"answer": "Which authors have last name 'Ueno'? List their first names.\nAdditional table information: table: icfp_1", "question": "SELECT fname FROM authors WHERE lname = 'Ueno'"} +{"answer": "Find the last name of the author with first name 'Amal'.\nAdditional table information: table: icfp_1", "question": "SELECT lname FROM authors WHERE fname = 'Amal'"} +{"answer": "Which authors have first name 'Amal'? List their last names.\nAdditional table information: table: icfp_1", "question": "SELECT lname FROM authors WHERE fname = 'Amal'"} +{"answer": "Find the first names of all the authors ordered in alphabetical order.\nAdditional table information: table: icfp_1", "question": "SELECT fname FROM authors ORDER BY fname NULLS FIRST"} +{"answer": "Sort the first names of all the authors in alphabetical order.\nAdditional table information: table: icfp_1", "question": "SELECT fname FROM authors ORDER BY fname NULLS FIRST"} +{"answer": "Retrieve all the last names of authors in alphabetical order.\nAdditional table information: table: icfp_1", "question": "SELECT lname FROM authors ORDER BY lname NULLS FIRST"} +{"answer": "Give me a list of all the last names of authors sorted in alphabetical order\nAdditional table information: table: icfp_1", "question": "SELECT lname FROM authors ORDER BY lname NULLS FIRST"} +{"answer": "Retrieve all the first and last names of authors in the alphabetical order of last names.\nAdditional table information: table: icfp_1", "question": "SELECT fname, lname FROM authors ORDER BY lname NULLS FIRST"} +{"answer": "Sort the list of all the first and last names of authors in alphabetical order of the last names.\nAdditional table information: table: icfp_1", "question": "SELECT fname, lname FROM authors ORDER BY lname NULLS FIRST"} +{"answer": "How many different last names do the actors and actresses have?\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(DISTINCT last_name) FROM actor"} +{"answer": "Count the number of different last names actors have.\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(DISTINCT last_name) FROM actor"} +{"answer": "What is the most popular first name of the actors?\nAdditional table information: table: sakila_1", "question": "SELECT first_name FROM actor GROUP BY first_name ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Return the most common first name among all actors.\nAdditional table information: table: sakila_1", "question": "SELECT first_name FROM actor GROUP BY first_name ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the most popular full name of the actors?\nAdditional table information: table: sakila_1", "question": "SELECT first_name, last_name FROM actor GROUP BY first_name, last_name ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Return the most common full name among all actors.\nAdditional table information: table: sakila_1", "question": "SELECT first_name, last_name FROM actor GROUP BY first_name, last_name ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which districts have at least two addresses?\nAdditional table information: table: sakila_1", "question": "SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2"} +{"answer": "Give the districts which have two or more addresses.\nAdditional table information: table: sakila_1", "question": "SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2"} +{"answer": "What is the phone number and postal code of the address 1031 Daugavpils Parkway?\nAdditional table information: table: sakila_1", "question": "SELECT phone, postal_code FROM address WHERE address = '1031 Daugavpils Parkway'"} +{"answer": "Give the phone and postal code corresponding to the address '1031 Daugavpils Parkway'.\nAdditional table information: table: sakila_1", "question": "SELECT phone, postal_code FROM address WHERE address = '1031 Daugavpils Parkway'"} +{"answer": "Which city has the most addresses? List the city name, number of addresses, and city id.\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "What are the city name, id, and number of addresses corresponding to the city with the most addressed?\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "How many addresses are in the district of California?\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(*) FROM address WHERE district = 'California'"} +{"answer": "Count the number of addressed in the California district.\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(*) FROM address WHERE district = 'California'"} +{"answer": "Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id.\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3?\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "How many cities are in Australia?\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'"} +{"answer": "Count the number of cities in Australia.\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'"} +{"answer": "Which countries have at least 3 cities?\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "What are the countries that contain 3 or more cities?\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "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.\nAdditional table information: table: sakila_1", "question": "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'"} +{"answer": "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?\nAdditional table information: table: sakila_1", "question": "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'"} +{"answer": "How many customers have an active value of 1?\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(*) FROM customer WHERE active = '1'"} +{"answer": "Count the number of customers who are active.\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(*) FROM customer WHERE active = '1'"} +{"answer": "Which film has the highest rental rate? And what is the rate?\nAdditional table information: table: sakila_1", "question": "SELECT title, rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1"} +{"answer": "What are the title and rental rate of the film with the highest rental rate?\nAdditional table information: table: sakila_1", "question": "SELECT title, rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1"} +{"answer": "Which film has the most number of actors or actresses? List the film name, film id and description.\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "What are the title, id, and description of the movie with the greatest number of actors?\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "Which film actor (actress) starred the most films? List his or her first name, last name and actor id.\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "Return the full name and id of the actor or actress who starred in the greatest number of films.\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "What are the full names of actors who had roles in more than 30 films?\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "Which store owns most items?\nAdditional table information: table: sakila_1", "question": "SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the id of the store that has the most items in inventory?\nAdditional table information: table: sakila_1", "question": "SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the total amount of all payments?\nAdditional table information: table: sakila_1", "question": "SELECT SUM(amount) FROM payment"} +{"answer": "Return the sum of all payment amounts.\nAdditional table information: table: sakila_1", "question": "SELECT SUM(amount) FROM payment"} +{"answer": "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.\nAdditional table information: table: sakila_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the full name and id of the customer who has the lowest total amount of payment?\nAdditional table information: table: sakila_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the genre name of the film HUNGER ROOF?\nAdditional table information: table: sakila_1", "question": "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'"} +{"answer": "Return the name of the category to which the film 'HUNGER ROOF' belongs.\nAdditional table information: table: sakila_1", "question": "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'"} +{"answer": "How many films are there in each category? List the genre name, genre id and the count.\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "What are the names and ids of the different categories, and how many films are in each?\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "Which film has the most copies in the inventory? List both title and id.\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "What is the title and id of the film that has the greatest number of copies in inventory?\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "What is the film title and inventory id of the item in the inventory which was rented most frequently?\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "Return the title and inventory id of the film that is rented most often.\nAdditional table information: table: sakila_1", "question": "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"} +{"answer": "How many languages are in these films?\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(DISTINCT language_id) FROM film"} +{"answer": "Count the number of different languages in these films.\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(DISTINCT language_id) FROM film"} +{"answer": "What are all the movies rated as R? List the titles.\nAdditional table information: table: sakila_1", "question": "SELECT title FROM film WHERE rating = 'R'"} +{"answer": "Return the titles of any movies with an R rating.\nAdditional table information: table: sakila_1", "question": "SELECT title FROM film WHERE rating = 'R'"} +{"answer": "Where is store 1 located?\nAdditional table information: table: sakila_1", "question": "SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1"} +{"answer": "Return the address of store 1.\nAdditional table information: table: sakila_1", "question": "SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1"} +{"answer": "Which staff handled least number of payments? List the full name and the id.\nAdditional table information: table: sakila_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Give the full name and staff id of the staff who has handled the fewest payments.\nAdditional table information: table: sakila_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Which language does the film AIRPORT POLLOCK use? List the language name.\nAdditional table information: table: sakila_1", "question": "SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'"} +{"answer": "What is the name of the language that the film 'AIRPORT POLLOCK' is in?\nAdditional table information: table: sakila_1", "question": "SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'"} +{"answer": "How many stores are there?\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(*) FROM store"} +{"answer": "Count the number of stores.\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(*) FROM store"} +{"answer": "How many kinds of different ratings are listed?\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(DISTINCT rating) FROM film"} +{"answer": "Count the number of different film ratings.\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(DISTINCT rating) FROM film"} +{"answer": "Which movies have 'Deleted Scenes' as a substring in the special feature?\nAdditional table information: table: sakila_1", "question": "SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'"} +{"answer": "Return the titles of films that include 'Deleted Scenes' in their special feature section.\nAdditional table information: table: sakila_1", "question": "SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'"} +{"answer": "How many items in inventory does store 1 have?\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(*) FROM inventory WHERE store_id = 1"} +{"answer": "Count the number of items store 1 has in stock.\nAdditional table information: table: sakila_1", "question": "SELECT COUNT(*) FROM inventory WHERE store_id = 1"} +{"answer": "When did the first payment happen?\nAdditional table information: table: sakila_1", "question": "SELECT payment_date FROM payment ORDER BY payment_date ASC NULLS FIRST LIMIT 1"} +{"answer": "What was the date of the earliest payment?\nAdditional table information: table: sakila_1", "question": "SELECT payment_date FROM payment ORDER BY payment_date ASC NULLS FIRST LIMIT 1"} +{"answer": "Where does the customer with the first name Linda live? And what is her email?\nAdditional table information: table: sakila_1", "question": "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'"} +{"answer": "Return the address and email of the customer with the first name Linda.\nAdditional table information: table: sakila_1", "question": "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'"} +{"answer": "Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.\nAdditional table information: table: sakila_1", "question": "SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200"} +{"answer": "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?\nAdditional table information: table: sakila_1", "question": "SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200"} +{"answer": "What is the first name and the last name of the customer who made the earliest rental?\nAdditional table information: table: sakila_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Return the full name of the customer who made the first rental.\nAdditional table information: table: sakila_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "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?\nAdditional table information: table: sakila_1", "question": "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'"} +{"answer": "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.\nAdditional table information: table: sakila_1", "question": "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'"} +{"answer": "Which store has most the customers?\nAdditional table information: table: sakila_1", "question": "SELECT store_id FROM customer GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Return the id of the store with the most customers.\nAdditional table information: table: sakila_1", "question": "SELECT store_id FROM customer GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the largest payment amount?\nAdditional table information: table: sakila_1", "question": "SELECT amount FROM payment ORDER BY amount DESC LIMIT 1"} +{"answer": "Return the amount of the largest payment.\nAdditional table information: table: sakila_1", "question": "SELECT amount FROM payment ORDER BY amount DESC LIMIT 1"} +{"answer": "Where does the staff member with the first name Elsa live?\nAdditional table information: table: sakila_1", "question": "SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa'"} +{"answer": "Give the address of the staff member who has the first name Elsa.\nAdditional table information: table: sakila_1", "question": "SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa'"} +{"answer": "What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?\nAdditional table information: table: sakila_1", "question": "SELECT first_name FROM customer WHERE NOT customer_id IN (SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01')"} +{"answer": "Return the first names of customers who did not rented a film after the date '2005-08-23 02:06:01'.\nAdditional table information: table: sakila_1", "question": "SELECT first_name FROM customer WHERE NOT customer_id IN (SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01')"} +{"answer": "How many bank branches are there?\nAdditional table information: table: loan_1", "question": "SELECT COUNT(*) FROM bank"} +{"answer": "Count the number of bank branches.\nAdditional table information: table: loan_1", "question": "SELECT COUNT(*) FROM bank"} +{"answer": "How many customers are there?\nAdditional table information: table: loan_1", "question": "SELECT SUM(no_of_customers) FROM bank"} +{"answer": "What is the total number of customers across banks?\nAdditional table information: table: loan_1", "question": "SELECT SUM(no_of_customers) FROM bank"} +{"answer": "Find the number of customers in the banks at New York City.\nAdditional table information: table: loan_1", "question": "SELECT SUM(no_of_customers) FROM bank WHERE city = 'New York City'"} +{"answer": "What is the total number of customers who use banks in New York City?\nAdditional table information: table: loan_1", "question": "SELECT SUM(no_of_customers) FROM bank WHERE city = 'New York City'"} +{"answer": "Find the average number of customers in all banks of Utah state.\nAdditional table information: table: loan_1", "question": "SELECT AVG(no_of_customers) FROM bank WHERE state = 'Utah'"} +{"answer": "What is the average number of customers across banks in the state of Utah?\nAdditional table information: table: loan_1", "question": "SELECT AVG(no_of_customers) FROM bank WHERE state = 'Utah'"} +{"answer": "Find the average number of customers cross all banks.\nAdditional table information: table: loan_1", "question": "SELECT AVG(no_of_customers) FROM bank"} +{"answer": "What is the average number of bank customers?\nAdditional table information: table: loan_1", "question": "SELECT AVG(no_of_customers) FROM bank"} +{"answer": "Find the city and state of the bank branch named morningside.\nAdditional table information: table: loan_1", "question": "SELECT city, state FROM bank WHERE bname = 'morningside'"} +{"answer": "What city and state is the bank with the name morningside in?\nAdditional table information: table: loan_1", "question": "SELECT city, state FROM bank WHERE bname = 'morningside'"} +{"answer": "Find the branch names of banks in the New York state.\nAdditional table information: table: loan_1", "question": "SELECT bname FROM bank WHERE state = 'New York'"} +{"answer": "What are the names of banks in the state of New York?\nAdditional table information: table: loan_1", "question": "SELECT bname FROM bank WHERE state = 'New York'"} +{"answer": "List the name of all customers sorted by their account balance in ascending order.\nAdditional table information: table: loan_1", "question": "SELECT cust_name FROM customer ORDER BY acc_bal NULLS FIRST"} +{"answer": "What are the names of all customers, ordered by account balance?\nAdditional table information: table: loan_1", "question": "SELECT cust_name FROM customer ORDER BY acc_bal NULLS FIRST"} +{"answer": "List the name of all different customers who have some loan sorted by their total loan amount.\nAdditional table information: table: loan_1", "question": "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) NULLS FIRST"} +{"answer": "What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken?\nAdditional table information: table: loan_1", "question": "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) NULLS FIRST"} +{"answer": "Find the state, account type, and credit score of the customer whose number of loan is 0.\nAdditional table information: table: loan_1", "question": "SELECT state, acc_type, credit_score FROM customer WHERE no_of_loans = 0"} +{"answer": "What are the states, account types, and credit scores for customers who have 0 loans?\nAdditional table information: table: loan_1", "question": "SELECT state, acc_type, credit_score FROM customer WHERE no_of_loans = 0"} +{"answer": "Find the number of different cities which banks are located at.\nAdditional table information: table: loan_1", "question": "SELECT COUNT(DISTINCT city) FROM bank"} +{"answer": "In how many different cities are banks located?\nAdditional table information: table: loan_1", "question": "SELECT COUNT(DISTINCT city) FROM bank"} +{"answer": "Find the number of different states which banks are located at.\nAdditional table information: table: loan_1", "question": "SELECT COUNT(DISTINCT state) FROM bank"} +{"answer": "In how many different states are banks located?\nAdditional table information: table: loan_1", "question": "SELECT COUNT(DISTINCT state) FROM bank"} +{"answer": "How many distinct types of accounts are there?\nAdditional table information: table: loan_1", "question": "SELECT COUNT(DISTINCT acc_type) FROM customer"} +{"answer": "Count the number of different account types.\nAdditional table information: table: loan_1", "question": "SELECT COUNT(DISTINCT acc_type) FROM customer"} +{"answer": "Find the name and account balance of the customer whose name includes the letter \u2018a\u2019.\nAdditional table information: table: loan_1", "question": "SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%'"} +{"answer": "What are the names and account balances of customers with the letter a in their names?\nAdditional table information: table: loan_1", "question": "SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%'"} +{"answer": "Find the total account balance of each customer from Utah or Texas.\nAdditional table information: table: loan_1", "question": "SELECT SUM(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas'"} +{"answer": "What are the total account balances for each customer from Utah or Texas?\nAdditional table information: table: loan_1", "question": "SELECT SUM(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas'"} +{"answer": "Find the name of customers who have both saving and checking account types.\nAdditional table information: table: loan_1", "question": "SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking'"} +{"answer": "What are the names of customers who have both savings and checking accounts?\nAdditional table information: table: loan_1", "question": "SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking'"} +{"answer": "Find the name of customers who do not have an saving account.\nAdditional table information: table: loan_1", "question": "SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving'"} +{"answer": "What are the names of customers who do not have saving accounts?\nAdditional table information: table: loan_1", "question": "SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving'"} +{"answer": "Find the name of customers who do not have a loan with a type of Mortgages.\nAdditional table information: table: loan_1", "question": "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'"} +{"answer": "What are the names of customers who have not taken a Mortage loan?\nAdditional table information: table: loan_1", "question": "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'"} +{"answer": "Find the name of customers who have loans of both Mortgages and Auto.\nAdditional table information: table: loan_1", "question": "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'"} +{"answer": "What are the names of customers who have taken both Mortgage and Auto loans?\nAdditional table information: table: loan_1", "question": "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'"} +{"answer": "Find the name of customers whose credit score is below the average credit scores of all customers.\nAdditional table information: table: loan_1", "question": "SELECT cust_name FROM customer WHERE credit_score < (SELECT AVG(credit_score) FROM customer)"} +{"answer": "What are the names of customers with credit score less than the average credit score across customers?\nAdditional table information: table: loan_1", "question": "SELECT cust_name FROM customer WHERE credit_score < (SELECT AVG(credit_score) FROM customer)"} +{"answer": "Find the branch name of the bank that has the most number of customers.\nAdditional table information: table: loan_1", "question": "SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1"} +{"answer": "What is the name of the bank branch with the greatest number of customers?\nAdditional table information: table: loan_1", "question": "SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1"} +{"answer": "Find the name of customer who has the lowest credit score.\nAdditional table information: table: loan_1", "question": "SELECT cust_name FROM customer ORDER BY credit_score NULLS FIRST LIMIT 1"} +{"answer": "What is the name of the customer with the worst credit score?\nAdditional table information: table: loan_1", "question": "SELECT cust_name FROM customer ORDER BY credit_score NULLS FIRST LIMIT 1"} +{"answer": "Find the name, account type, and account balance of the customer who has the highest credit score.\nAdditional table information: table: loan_1", "question": "SELECT cust_name, acc_type, acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1"} +{"answer": "What is the name, account type, and account balance corresponding to the customer with the highest credit score?\nAdditional table information: table: loan_1", "question": "SELECT cust_name, acc_type, acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1"} +{"answer": "Find the name of customer who has the highest amount of loans.\nAdditional table information: table: loan_1", "question": "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"} +{"answer": "What is the name of the customer who has greatest total loan amount?\nAdditional table information: table: loan_1", "question": "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"} +{"answer": "Find the state which has the most number of customers.\nAdditional table information: table: loan_1", "question": "SELECT state FROM bank GROUP BY state ORDER BY SUM(no_of_customers) DESC LIMIT 1"} +{"answer": "Which state has the greatest total number of bank customers?\nAdditional table information: table: loan_1", "question": "SELECT state FROM bank GROUP BY state ORDER BY SUM(no_of_customers) DESC LIMIT 1"} +{"answer": "For each account type, find the average account balance of customers with credit score lower than 50.\nAdditional table information: table: loan_1", "question": "SELECT AVG(acc_bal), acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type"} +{"answer": "What is the average account balance of customers with credit score below 50 for the different account types?\nAdditional table information: table: loan_1", "question": "SELECT AVG(acc_bal), acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type"} +{"answer": "For each state, find the total account balance of customers whose credit score is above 100.\nAdditional table information: table: loan_1", "question": "SELECT SUM(acc_bal), state FROM customer WHERE credit_score > 100 GROUP BY state"} +{"answer": "What is the total account balance for customers with a credit score of above 100 for the different states?\nAdditional table information: table: loan_1", "question": "SELECT SUM(acc_bal), state FROM customer WHERE credit_score > 100 GROUP BY state"} +{"answer": "Find the total amount of loans offered by each bank branch.\nAdditional table information: table: loan_1", "question": "SELECT SUM(amount), T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname"} +{"answer": "What are the names of the different bank branches, and what are their total loan amounts?\nAdditional table information: table: loan_1", "question": "SELECT SUM(amount), T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname"} +{"answer": "Find the name of customers who have more than one loan.\nAdditional table information: table: loan_1", "question": "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"} +{"answer": "What are the names of customers who have taken out more than one loan?\nAdditional table information: table: loan_1", "question": "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"} +{"answer": "Find the name and account balance of the customers who have loans with a total amount of more than 5000.\nAdditional table information: table: loan_1", "question": "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"} +{"answer": "What are the names and account balances for customers who have taken a total amount of more than 5000 in loans?\nAdditional table information: table: loan_1", "question": "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"} +{"answer": "Find the name of bank branch that provided the greatest total amount of loans.\nAdditional table information: table: loan_1", "question": "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"} +{"answer": "What is the name of the bank branch that has lent the greatest amount?\nAdditional table information: table: loan_1", "question": "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"} +{"answer": "Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100.\nAdditional table information: table: loan_1", "question": "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"} +{"answer": "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?\nAdditional table information: table: loan_1", "question": "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"} +{"answer": "Find the name of bank branches that provided some loans.\nAdditional table information: table: loan_1", "question": "SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id"} +{"answer": "What are the names of the different banks that have provided loans?\nAdditional table information: table: loan_1", "question": "SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id"} +{"answer": "Find the name and credit score of the customers who have some loans.\nAdditional table information: table: loan_1", "question": "SELECT DISTINCT T1.cust_name, T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id"} +{"answer": "What are the different names and credit scores of customers who have taken a loan?\nAdditional table information: table: loan_1", "question": "SELECT DISTINCT T1.cust_name, T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id"} +{"answer": "Find the the name of the customers who have a loan with amount more than 3000.\nAdditional table information: table: loan_1", "question": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000"} +{"answer": "What are the names of customers who have a loan of more than 3000 in amount?\nAdditional table information: table: loan_1", "question": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000"} +{"answer": "Find the city and name of bank branches that provide business loans.\nAdditional table information: table: loan_1", "question": "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'"} +{"answer": "What are the names and cities of bank branches that offer loans for business?\nAdditional table information: table: loan_1", "question": "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'"} +{"answer": "Find the names of bank branches that have provided a loan to any customer whose credit score is below 100.\nAdditional table information: table: loan_1", "question": "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"} +{"answer": "What are the names of banks that have loaned money to customers with credit scores below 100?\nAdditional table information: table: loan_1", "question": "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"} +{"answer": "Find the total amount of loans provided by bank branches in the state of New York.\nAdditional table information: table: loan_1", "question": "SELECT SUM(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York'"} +{"answer": "What is the total amount of money loaned by banks in New York state?\nAdditional table information: table: loan_1", "question": "SELECT SUM(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York'"} +{"answer": "Find the average credit score of the customers who have some loan.\nAdditional table information: table: loan_1", "question": "SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)"} +{"answer": "What is the average credit score for customers who have taken a loan?\nAdditional table information: table: loan_1", "question": "SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)"} +{"answer": "Find the average credit score of the customers who do not have any loan.\nAdditional table information: table: loan_1", "question": "SELECT AVG(credit_score) FROM customer WHERE NOT cust_id IN (SELECT cust_id FROM loan)"} +{"answer": "What is the average credit score for customers who have never taken a loan?\nAdditional table information: table: loan_1", "question": "SELECT AVG(credit_score) FROM customer WHERE NOT cust_id IN (SELECT cust_id FROM loan)"} +{"answer": "How many assessment notes are there in total?\nAdditional table information: table: behavior_monitoring", "question": "SELECT COUNT(*) FROM ASSESSMENT_NOTES"} +{"answer": "What are the dates of the assessment notes?\nAdditional table information: table: behavior_monitoring", "question": "SELECT date_of_notes FROM Assessment_Notes"} +{"answer": "How many addresses have zip code 197?\nAdditional table information: table: behavior_monitoring", "question": "SELECT COUNT(*) FROM ADDRESSES WHERE zip_postcode = '197'"} +{"answer": "How many distinct incident type codes are there?\nAdditional table information: table: behavior_monitoring", "question": "SELECT COUNT(DISTINCT incident_type_code) FROM Behavior_Incident"} +{"answer": "Return all distinct detention type codes.\nAdditional table information: table: behavior_monitoring", "question": "SELECT DISTINCT detention_type_code FROM Detention"} +{"answer": "What are the start and end dates for incidents with incident type code 'NOISE'?\nAdditional table information: table: behavior_monitoring", "question": "SELECT date_incident_start, date_incident_end FROM Behavior_Incident WHERE incident_type_code = 'NOISE'"} +{"answer": "Return all detention summaries.\nAdditional table information: table: behavior_monitoring", "question": "SELECT detention_summary FROM Detention"} +{"answer": "Return the cell phone number and email address for all students.\nAdditional table information: table: behavior_monitoring", "question": "SELECT cell_mobile_number, email_address FROM STUDENTS"} +{"answer": "What is the email of the student with first name 'Emma' and last name 'Rohan'?\nAdditional table information: table: behavior_monitoring", "question": "SELECT email_address FROM Students WHERE first_name = 'Emma' AND last_name = 'Rohan'"} +{"answer": "How many distinct students have been in detention?\nAdditional table information: table: behavior_monitoring", "question": "SELECT COUNT(DISTINCT student_id) FROM Students_in_Detention"} +{"answer": "What is the gender of the teacher with last name 'Medhurst'?\nAdditional table information: table: behavior_monitoring", "question": "SELECT gender FROM TEACHERS WHERE last_name = 'Medhurst'"} +{"answer": "What is the incident type description for the incident type with code 'VIOLENCE'?\nAdditional table information: table: behavior_monitoring", "question": "SELECT incident_type_description FROM Ref_Incident_Type WHERE incident_type_code = 'VIOLENCE'"} +{"answer": "Find the maximum and minimum monthly rental for all student addresses.\nAdditional table information: table: behavior_monitoring", "question": "SELECT MAX(monthly_rental), MIN(monthly_rental) FROM Student_Addresses"} +{"answer": "Find the first names of teachers whose email address contains the word 'man'.\nAdditional table information: table: behavior_monitoring", "question": "SELECT first_name FROM Teachers WHERE email_address LIKE '%man%'"} +{"answer": "List all information about the assessment notes sorted by date in ascending order.\nAdditional table information: table: behavior_monitoring", "question": "SELECT * FROM Assessment_Notes ORDER BY date_of_notes ASC NULLS FIRST"} +{"answer": "List all cities of addresses in alphabetical order.\nAdditional table information: table: behavior_monitoring", "question": "SELECT city FROM Addresses ORDER BY city NULLS FIRST"} +{"answer": "Find the first names and last names of teachers in alphabetical order of last name.\nAdditional table information: table: behavior_monitoring", "question": "SELECT first_name, last_name FROM Teachers ORDER BY last_name NULLS FIRST"} +{"answer": "Find all information about student addresses, and sort by monthly rental in descending order.\nAdditional table information: table: behavior_monitoring", "question": "SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC"} +{"answer": "Find the id and first name of the student that has the most number of assessment notes?\nAdditional table information: table: behavior_monitoring", "question": "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"} +{"answer": "Find the ids and first names of the 3 teachers that have the most number of assessment notes?\nAdditional table information: table: behavior_monitoring", "question": "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"} +{"answer": "Find the id and last name of the student that has the most behavior incidents?\nAdditional table information: table: behavior_monitoring", "question": "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"} +{"answer": "Find the id and last name of the teacher that has the most detentions with detention type code 'AFTER'?\nAdditional table information: table: behavior_monitoring", "question": "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"} +{"answer": "What are the id and first name of the student whose addresses have the highest average monthly rental?\nAdditional table information: table: behavior_monitoring", "question": "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"} +{"answer": "Find the id and city of the student address with the highest average monthly rental.\nAdditional table information: table: behavior_monitoring", "question": "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"} +{"answer": "What are the code and description of the most frequent behavior incident type?\nAdditional table information: table: behavior_monitoring", "question": "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"} +{"answer": "What are the code and description of the least frequent detention type ?\nAdditional table information: table: behavior_monitoring", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Find the dates of assessment notes for students with first name 'Fanny'.\nAdditional table information: table: behavior_monitoring", "question": "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'"} +{"answer": "Find the texts of assessment notes for teachers with last name 'Schuster'.\nAdditional table information: table: behavior_monitoring", "question": "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'"} +{"answer": "Find the start and end dates of behavior incidents of students with last name 'Fahey'.\nAdditional table information: table: behavior_monitoring", "question": "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'"} +{"answer": "Find the start and end dates of detentions of teachers with last name 'Schultz'.\nAdditional table information: table: behavior_monitoring", "question": "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'"} +{"answer": "What are the id and zip code of the address with the highest monthly rental?\nAdditional table information: table: behavior_monitoring", "question": "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"} +{"answer": "What is the cell phone number of the student whose address has the lowest monthly rental?\nAdditional table information: table: behavior_monitoring", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What are the monthly rentals of student addresses in Texas state?\nAdditional table information: table: behavior_monitoring", "question": "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'"} +{"answer": "What are the first names and last names of students with address in Wisconsin state?\nAdditional table information: table: behavior_monitoring", "question": "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'"} +{"answer": "What are the line 1 and average monthly rentals of all student addresses?\nAdditional table information: table: behavior_monitoring", "question": "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"} +{"answer": "What is the zip code of the address where the teacher with first name 'Lyla' lives?\nAdditional table information: table: behavior_monitoring", "question": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = 'Lyla'"} +{"answer": "What are the email addresses of teachers whose address has zip code '918'?\nAdditional table information: table: behavior_monitoring", "question": "SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T1.zip_postcode = '918'"} +{"answer": "How many students are not involved in any behavior incident?\nAdditional table information: table: behavior_monitoring", "question": "SELECT COUNT(*) FROM STUDENTS WHERE NOT student_id IN (SELECT student_id FROM Behavior_Incident)"} +{"answer": "Find the last names of teachers who are not involved in any detention.\nAdditional table information: table: behavior_monitoring", "question": "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"} +{"answer": "What are the line 1 of addresses shared by some students and some teachers?\nAdditional table information: table: behavior_monitoring", "question": "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"} +{"answer": "Which assets have 2 parts and have less than 2 fault logs? List the asset id and detail.\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "How many assets does each maintenance contract contain? List the number and the contract id.\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "How many assets does each third party company supply? List the count and the company id.\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name.\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers?\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "Which engineer has visited the most times? Show the engineer id, first name and last name.\nAdditional table information: table: assets_maintenance", "question": "SELECT T1.engineer_id, T1.first_name, T1.last_name FROM Maintenance_Engineers AS T1, Engineer_Visits AS T2 GROUP BY T1.engineer_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which parts have more than 2 faults? Show the part name and id.\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "List all every engineer's first name, last name, details and coresponding skill description.\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "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.\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "How many assets can each parts be used in? List the part name and the number.\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "What are all the fault descriptions and the fault status of all the faults recoreded in the logs?\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "How many engineer visits are required at most for a single fault log? List the number and the log entry id.\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "What are all the distinct last names of all the engineers?\nAdditional table information: table: assets_maintenance", "question": "SELECT DISTINCT last_name FROM Maintenance_Engineers"} +{"answer": "How many fault status codes are recorded in the fault log parts table?\nAdditional table information: table: assets_maintenance", "question": "SELECT DISTINCT fault_status FROM Fault_Log_Parts"} +{"answer": "Which engineers have never visited to maintain the assets? List the engineer first name and last name.\nAdditional table information: table: assets_maintenance", "question": "SELECT first_name, last_name FROM Maintenance_Engineers WHERE NOT engineer_id IN (SELECT engineer_id FROM Engineer_Visits)"} +{"answer": "List the asset id, details, make and model for every asset.\nAdditional table information: table: assets_maintenance", "question": "SELECT asset_id, asset_details, asset_make, asset_model FROM Assets"} +{"answer": "When was the first asset acquired?\nAdditional table information: table: assets_maintenance", "question": "SELECT asset_acquired_date FROM Assets ORDER BY asset_acquired_date ASC NULLS FIRST LIMIT 1"} +{"answer": "Which part fault requires the most number of skills to fix? List part id and name.\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "Which kind of part has the least number of faults? List the part name.\nAdditional table information: table: assets_maintenance", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, first name and last name.\nAdditional table information: table: assets_maintenance", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Which staff have contacted which engineers? List the staff name and the engineer first name and last name.\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "Which fault log included the most number of faulty parts? List the fault log id, description and record time.\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "Which skill is used in fixing the most number of faults? List the skill id and description.\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "What are all the distinct asset models?\nAdditional table information: table: assets_maintenance", "question": "SELECT DISTINCT asset_model FROM Assets"} +{"answer": "List the all the assets make, model, details by the disposed date ascendingly.\nAdditional table information: table: assets_maintenance", "question": "SELECT asset_make, asset_model, asset_details FROM Assets ORDER BY asset_disposed_date ASC NULLS FIRST"} +{"answer": "Which part has the least chargeable amount? List the part id and amount.\nAdditional table information: table: assets_maintenance", "question": "SELECT part_id, chargeable_amount FROM Parts ORDER BY chargeable_amount ASC NULLS FIRST LIMIT 1"} +{"answer": "Which company started the earliest the maintenance contract? Show the company name.\nAdditional table information: table: assets_maintenance", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the description of the type of the company who concluded its contracts most recently?\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "Which gender makes up the majority of the staff?\nAdditional table information: table: assets_maintenance", "question": "SELECT gender FROM staff GROUP BY gender ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "How many engineers did each staff contact? List both the contact staff name and number of engineers contacted.\nAdditional table information: table: assets_maintenance", "question": "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"} +{"answer": "Which assets did not incur any fault log? List the asset model.\nAdditional table information: table: assets_maintenance", "question": "SELECT asset_model FROM Assets WHERE NOT asset_id IN (SELECT asset_id FROM Fault_Log)"} +{"answer": "list the local authorities and services provided by all stations.\nAdditional table information: table: station_weather", "question": "SELECT local_authority, services FROM station"} +{"answer": "show all train numbers and names ordered by their time from early to late.\nAdditional table information: table: station_weather", "question": "SELECT train_number, name FROM train ORDER BY TIME NULLS FIRST"} +{"answer": "Give me the times and numbers of all trains that go to Chennai, ordered by time.\nAdditional table information: table: station_weather", "question": "SELECT TIME, train_number FROM train WHERE destination = 'Chennai' ORDER BY TIME NULLS FIRST"} +{"answer": "How many trains have 'Express' in their names?\nAdditional table information: table: station_weather", "question": "SELECT COUNT(*) FROM train WHERE name LIKE '%Express%'"} +{"answer": "Find the number and time of the train that goes from Chennai to Guruvayur.\nAdditional table information: table: station_weather", "question": "SELECT train_number, TIME FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur'"} +{"answer": "Find the number of trains starting from each origin.\nAdditional table information: table: station_weather", "question": "SELECT origin, COUNT(*) FROM train GROUP BY origin"} +{"answer": "Find the name of the train whose route runs through greatest number of stations.\nAdditional table information: table: station_weather", "question": "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"} +{"answer": "Find the number of trains for each station, as well as the station network name and services.\nAdditional table information: table: station_weather", "question": "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"} +{"answer": "What is the average high temperature for each day of week?\nAdditional table information: table: station_weather", "question": "SELECT AVG(high_temperature), day_of_week FROM weekly_weather GROUP BY day_of_week"} +{"answer": "Give me the maximum low temperature and average precipitation at the Amersham station.\nAdditional table information: table: station_weather", "question": "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'"} +{"answer": "Find names and times of trains that run through stations for the local authority Chiltern.\nAdditional table information: table: station_weather", "question": "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'"} +{"answer": "How many different services are provided by all stations?\nAdditional table information: table: station_weather", "question": "SELECT COUNT(DISTINCT services) FROM station"} +{"answer": "Find the id and local authority of the station with has the highest average high temperature.\nAdditional table information: table: station_weather", "question": "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"} +{"answer": "Find the id and local authority of the station whose maximum precipitation is higher than 50.\nAdditional table information: table: station_weather", "question": "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"} +{"answer": "show the lowest low temperature and highest wind speed in miles per hour.\nAdditional table information: table: station_weather", "question": "SELECT MIN(low_temperature), MAX(wind_speed_mph) FROM weekly_weather"} +{"answer": "Find the origins from which more than 1 train starts.\nAdditional table information: table: station_weather", "question": "SELECT origin FROM train GROUP BY origin HAVING COUNT(*) > 1"} +{"answer": "Find the number of professors in accounting department.\nAdditional table information: table: college_1", "question": "SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = 'Accounting'"} +{"answer": "How many professors are in the accounting dept?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = 'Accounting'"} +{"answer": "How many professors are teaching class with code ACCT-211?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = 'ACCT-211'"} +{"answer": "How many professors teach a class with the code ACCT-211?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = 'ACCT-211'"} +{"answer": "What is the first and last name of the professor in biology department?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What are the first and last name of all biology professors?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What are the first names and date of birth of professors teaching course ACCT-211?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What are the first names and birthdates of the professors in charge of ACCT-211?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "How many classes are professor whose last name is Graztevski has?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski'"} +{"answer": "How many classes does the professor whose last name is Graztevski teach?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski'"} +{"answer": "What is the code of the school where the accounting department belongs to?\nAdditional table information: table: college_1", "question": "SELECT school_code FROM department WHERE dept_name = 'Accounting'"} +{"answer": "What is the school code of the accounting department?\nAdditional table information: table: college_1", "question": "SELECT school_code FROM department WHERE dept_name = 'Accounting'"} +{"answer": "How many credits does course CIS-220 have, and what its description?\nAdditional table information: table: college_1", "question": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'CIS-220'"} +{"answer": "What is the description for the CIS-220 and how many credits does it have?\nAdditional table information: table: college_1", "question": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'CIS-220'"} +{"answer": "what is the address of history department?\nAdditional table information: table: college_1", "question": "SELECT dept_address FROM department WHERE dept_name = 'History'"} +{"answer": "Where is the history department?\nAdditional table information: table: college_1", "question": "SELECT dept_address FROM department WHERE dept_name = 'History'"} +{"answer": "How many different locations does the school with code BUS has?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'"} +{"answer": "What are the different locations of the school with the code BUS?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'"} +{"answer": "How many different locations does each school have?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT dept_address), school_code FROM department GROUP BY school_code"} +{"answer": "Count different addresses of each school.\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT dept_address), school_code FROM department GROUP BY school_code"} +{"answer": "Find the description and credit for the course QM-261?\nAdditional table information: table: college_1", "question": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261'"} +{"answer": "What is the course description and number of credits for QM-261?\nAdditional table information: table: college_1", "question": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261'"} +{"answer": "Find the number of departments in each school.\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code"} +{"answer": "How many departments are in each school?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code"} +{"answer": "Find the number of different departments in each school whose number of different departments is less than 5.\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code HAVING COUNT(DISTINCT dept_name) < 5"} +{"answer": "How many different departments are there in each school that has less than 5 apartments?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code HAVING COUNT(DISTINCT dept_name) < 5"} +{"answer": "How many sections does each course has?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*), crs_code FROM CLASS GROUP BY crs_code"} +{"answer": "How many sections does each course have?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*), crs_code FROM CLASS GROUP BY crs_code"} +{"answer": "What is the total credit does each department offer?\nAdditional table information: table: college_1", "question": "SELECT SUM(crs_credit), dept_code FROM course GROUP BY dept_code"} +{"answer": "How many credits does the department offer?\nAdditional table information: table: college_1", "question": "SELECT SUM(crs_credit), dept_code FROM course GROUP BY dept_code"} +{"answer": "Find the number of classes offered for all class rooms that held at least 2 classes.\nAdditional table information: table: college_1", "question": "SELECT COUNT(*), class_room FROM CLASS GROUP BY class_room HAVING COUNT(*) >= 2"} +{"answer": "For each classroom with at least 2 classes, how many classes are offered?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*), class_room FROM CLASS GROUP BY class_room HAVING COUNT(*) >= 2"} +{"answer": "Find the number of classes in each department.\nAdditional table information: table: college_1", "question": "SELECT COUNT(*), dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code"} +{"answer": "How many classes are held in each department?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*), dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code"} +{"answer": "Find the number of classes in each school.\nAdditional table information: table: college_1", "question": "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"} +{"answer": "How many classes exist for each school?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What is the number of professors for different school?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "How many different professors are there for the different schools?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "Find the count and code of the job has most employees.\nAdditional table information: table: college_1", "question": "SELECT emp_jobcode, COUNT(*) FROM employee GROUP BY emp_jobcode ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the count and code of the job with the most employee?\nAdditional table information: table: college_1", "question": "SELECT emp_jobcode, COUNT(*) FROM employee GROUP BY emp_jobcode ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which school has the smallest amount of professors?\nAdditional table information: table: college_1", "question": "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(*) NULLS FIRST LIMIT 1"} +{"answer": "Which school has the fewest professors?\nAdditional table information: table: college_1", "question": "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(*) NULLS FIRST LIMIT 1"} +{"answer": "Find the number of professors with a Ph.D. degree in each department.\nAdditional table information: table: college_1", "question": "SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code"} +{"answer": "How many professors have a Ph.D. in each department?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code"} +{"answer": "Find the number of students for each department.\nAdditional table information: table: college_1", "question": "SELECT COUNT(*), dept_code FROM student GROUP BY dept_code"} +{"answer": "How many students are in each department?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*), dept_code FROM student GROUP BY dept_code"} +{"answer": "Find the total number of hours have done for all students in each department.\nAdditional table information: table: college_1", "question": "SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code"} +{"answer": "How many hours do the students spend studying in each department?\nAdditional table information: table: college_1", "question": "SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code"} +{"answer": "Find the max, average, and minimum gpa of all students in each department.\nAdditional table information: table: college_1", "question": "SELECT MAX(stu_gpa), AVG(stu_gpa), MIN(stu_gpa), dept_code FROM student GROUP BY dept_code"} +{"answer": "What is the highest, lowest, and average student GPA for every department?\nAdditional table information: table: college_1", "question": "SELECT MAX(stu_gpa), AVG(stu_gpa), MIN(stu_gpa), dept_code FROM student GROUP BY dept_code"} +{"answer": "What is the name and the average gpa of department whose students have the highest average gpa?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "Which department has the highest average student GPA, and what is the average gpa?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "how many schools exist in total?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT school_code) FROM department"} +{"answer": "How many schools are there in the department?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT school_code) FROM department"} +{"answer": "How many different classes are there?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT class_code) FROM CLASS"} +{"answer": "How many unique classes are offered?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT class_code) FROM CLASS"} +{"answer": "How many courses are offered?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT crs_code) FROM CLASS"} +{"answer": "What are the number of different course codes?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT crs_code) FROM CLASS"} +{"answer": "How many departments does the college has?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT dept_name) FROM department"} +{"answer": "How many different departments are there?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT dept_name) FROM department"} +{"answer": "How many courses are offered by the Computer Info. Systems department?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = 'Computer Info. Systems'"} +{"answer": "How many courses does the department of Computer Information Systmes offer?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = 'Computer Info. Systems'"} +{"answer": "How many sections does course ACCT-211 has?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211'"} +{"answer": "What is the number of different class sections offered in the course ACCT-211?\nAdditional table information: table: college_1", "question": "SELECT COUNT(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211'"} +{"answer": "Find the total credits of all classes offered by each department.\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What are the total number of credits offered by each department?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "Find the name of the department that offers the largest number of credits of all classes.\nAdditional table information: table: college_1", "question": "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"} +{"answer": "Which department offers the most credits all together?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "How many students enrolled in class ACCT-211?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'"} +{"answer": "What are the total number of students enrolled in ACCT-211?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'"} +{"answer": "What is the first name of each student enrolled in class ACCT-211?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What are the first names of all students in course ACCT-211?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What is the first name of students enrolled in class ACCT-211 and got grade C?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What are the first names of all students who took ACCT-211 and received a C?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "Find the total number of employees.\nAdditional table information: table: college_1", "question": "SELECT COUNT(*) FROM employee"} +{"answer": "How many employees are there all together?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*) FROM employee"} +{"answer": "How many professors do have a Ph.D. degree?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.'"} +{"answer": "What is the total number of professors with a Ph.D. ?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.'"} +{"answer": "How many students are enrolled in the class taught by some professor from the accounting department?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "How many students are enrolled in some classes that are taught by an accounting professor?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What is the name of the department that has the largest number of students enrolled?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What is the name of the department with the most students enrolled?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "list names of all departments ordered by their names.\nAdditional table information: table: college_1", "question": "SELECT dept_name FROM department ORDER BY dept_name NULLS FIRST"} +{"answer": "What are the names of all departments in alphabetical order?\nAdditional table information: table: college_1", "question": "SELECT dept_name FROM department ORDER BY dept_name NULLS FIRST"} +{"answer": "List the codes of all courses that take place in room KLR209.\nAdditional table information: table: college_1", "question": "SELECT class_code FROM CLASS WHERE class_room = 'KLR209'"} +{"answer": "What are the codes of all the courses that are located in room KLR209?\nAdditional table information: table: college_1", "question": "SELECT class_code FROM CLASS WHERE class_room = 'KLR209'"} +{"answer": "List the first name of all employees with job code PROF ordered by their date of birth.\nAdditional table information: table: college_1", "question": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob NULLS FIRST"} +{"answer": "What are the first names of all employees that are professors ordered by date of birth?\nAdditional table information: table: college_1", "question": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob NULLS FIRST"} +{"answer": "Find the first names and offices of all professors sorted by alphabetical order of their first name.\nAdditional table information: table: college_1", "question": "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 NULLS FIRST"} +{"answer": "What are the first names and office locations for all professors sorted alphabetically by first name?\nAdditional table information: table: college_1", "question": "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 NULLS FIRST"} +{"answer": "What is the first and last name of the oldest employee?\nAdditional table information: table: college_1", "question": "SELECT emp_fname, emp_lname FROM employee ORDER BY emp_dob NULLS FIRST LIMIT 1"} +{"answer": "What are the first and last names of the employee with the earliest date of birth?\nAdditional table information: table: college_1", "question": "SELECT emp_fname, emp_lname FROM employee ORDER BY emp_dob NULLS FIRST LIMIT 1"} +{"answer": "What is the first, last name, gpa of the youngest one among students whose GPA is above 3?\nAdditional table information: table: college_1", "question": "SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1"} +{"answer": "What is the first and last name of the youngest student with a GPA above 3, and what is their GPA?\nAdditional table information: table: college_1", "question": "SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1"} +{"answer": "What is the first name of students who got grade C in any class?\nAdditional table information: table: college_1", "question": "SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'"} +{"answer": "What are the first names of all students who got a grade C in a class?\nAdditional table information: table: college_1", "question": "SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'"} +{"answer": "What is the name of department where has the smallest number of professors?\nAdditional table information: table: college_1", "question": "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(*) NULLS FIRST LIMIT 1"} +{"answer": "What is the name of the department with the fewest professors?\nAdditional table information: table: college_1", "question": "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(*) NULLS FIRST LIMIT 1"} +{"answer": "What is the name of department where has the largest number of professors with a Ph.D. degree?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "Which department has the most professors with a Ph.D.?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What are the first names of the professors who do not teach a class.\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What are the first names of all professors not teaching any classes?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What is the first names of the professors from the history department who do not teach a class.\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What are the first names of all history professors who do not teach?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What is the last name and office of the professor from the history department?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What are the last name and office of all history professors?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What is department name and office for the professor whose last name is Heffington?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What is the name of the department and office location for the professor with the last name of Heffington?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "Find the last name and hire date of the professor who is in office DRE 102.\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What is the last name of the professor whose office is located in DRE 102, and when were they hired?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What is the code of the course which the student whose last name is Smithson took?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What are the course codes for every class that the student with the last name Smithson took?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What are the description and credit of the course which the student whose last name is Smithson took?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "How many credits is the course that the student with the last name Smithson took, and what is its description?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "How many professors who has a either Ph.D. or MA degree?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'"} +{"answer": "How many professors attained either Ph.D. or Masters degrees?\nAdditional table information: table: college_1", "question": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'"} +{"answer": "How many professors who are from either Accounting or Biology department?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What is the number of professors who are in the Accounting or Biology departments?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261.\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What is the first name of the professor who is teaching CIS-220 and QM-261?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "Find the first name of student who is taking classes from accounting and Computer Info. Systems departments\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What are the first names of all students taking accoutning and Computer Information Systems classes?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What is the average gpa of the students enrolled in the course with code ACCT-211?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What is the average GPA of students taking ACCT-211?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What is the first name, gpa and phone number of the top 5 students with highest gpa?\nAdditional table information: table: college_1", "question": "SELECT stu_gpa, stu_phone, stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5"} +{"answer": "What is the first name, GPA, and phone number of the students with the top 5 GPAs?\nAdditional table information: table: college_1", "question": "SELECT stu_gpa, stu_phone, stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5"} +{"answer": "What is the department name of the students with lowest gpa belongs to?\nAdditional table information: table: college_1", "question": "SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa NULLS FIRST LIMIT 1"} +{"answer": "What is the name of the department with the student that has the lowest GPA?\nAdditional table information: table: college_1", "question": "SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa NULLS FIRST LIMIT 1"} +{"answer": "Find the first name and gpa of the students whose gpa is lower than the average gpa of all students.\nAdditional table information: table: college_1", "question": "SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student)"} +{"answer": "What is the first name and GPA of every student that has a GPA lower than average?\nAdditional table information: table: college_1", "question": "SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student)"} +{"answer": "Find the name and address of the department that has the highest number of students.\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What is the name and address of the department with the most students?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "Find the name, address, number of students in the departments that have the top 3 highest number of students.\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What is the name, address, and number of students in the departments that have the 3 most students?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "Find the first name and office of the professor who is in the history department and has a Ph.D. degree.\nAdditional table information: table: college_1", "question": "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.'"} +{"answer": "What are the first names and office of the professors who are in the history department and have a Ph.D?\nAdditional table information: table: college_1", "question": "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.'"} +{"answer": "Find the first names of all instructors who have taught some course and the course code.\nAdditional table information: table: college_1", "question": "SELECT T2.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num"} +{"answer": "What are the first names of all teachers who have taught a course and the corresponding course codes?\nAdditional table information: table: college_1", "question": "SELECT T2.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num"} +{"answer": "Find the first names of all instructors who have taught some course and the course description.\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What are the first names of all teachers who have taught a course and the corresponding descriptions?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "Find the first names and offices of all instructors who have taught some course and also find the course description.\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What are the first names, office locations of all lecturers who have taught some course?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "Find the first names and offices of all instructors who have taught some course and the course description and the department name.\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What are the first names, office locations, and departments of all instructors, and also what are the descriptions of the courses they teach?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "Find names of all students who took some course and the course description.\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What are the names of all students who took a class and the corresponding course descriptions?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "Find names of all students who took some course and got A or C.\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What are the names of all students taking a course who received an A or C?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "Find the first names of all professors in the Accounting department who is teaching some course and the class room.\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department.\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department?\nAdditional table information: table: college_1", "question": "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'"} +{"answer": "What is the last name of the student who got a grade A in the class with code 10018.\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What is the last name of the student who received an A in the class with the code 10018?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "Find the first name and office of history professor who did not get a Ph.D. degree.\nAdditional table information: table: college_1", "question": "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.'"} +{"answer": "What are the first names and offices of history professors who don't have Ph.D.s?\nAdditional table information: table: college_1", "question": "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.'"} +{"answer": "Find the first names of professors who are teaching more than one class.\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What are the first names of all professors who teach more than one class?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "Find the first names of students who took exactly one class.\nAdditional table information: table: college_1", "question": "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"} +{"answer": "What are the first names of student who only took one course?\nAdditional table information: table: college_1", "question": "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"} +{"answer": "Find the name of department that offers the class whose description has the word 'Statistics'.\nAdditional table information: table: college_1", "question": "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%'"} +{"answer": "What is the name of the department that offers a course that has a description including the word 'Statistics'?\nAdditional table information: table: college_1", "question": "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%'"} +{"answer": "What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class?\nAdditional table information: table: college_1", "question": "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%'"} +{"answer": "What is the first name of the student whose last name starts with the letter S and is taking ACCT-211?\nAdditional table information: table: college_1", "question": "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%'"} +{"answer": "How many clubs are there?\nAdditional table information: table: sports_competition", "question": "SELECT COUNT(*) FROM club"} +{"answer": "What is the total number of clubs?\nAdditional table information: table: sports_competition", "question": "SELECT COUNT(*) FROM club"} +{"answer": "List the distinct region of clubs in ascending alphabetical order.\nAdditional table information: table: sports_competition", "question": "SELECT DISTINCT Region FROM club ORDER BY Region ASC NULLS FIRST"} +{"answer": "What are the different regions of clubs in ascending alphabetical order?\nAdditional table information: table: sports_competition", "question": "SELECT DISTINCT Region FROM club ORDER BY Region ASC NULLS FIRST"} +{"answer": "What is the average number of gold medals for clubs?\nAdditional table information: table: sports_competition", "question": "SELECT AVG(Gold) FROM club_rank"} +{"answer": "What is the average number of gold medals for a club?\nAdditional table information: table: sports_competition", "question": "SELECT AVG(Gold) FROM club_rank"} +{"answer": "What are the types and countries of competitions?\nAdditional table information: table: sports_competition", "question": "SELECT Competition_type, Country FROM competition"} +{"answer": "What are the types of every competition and in which countries are they located?\nAdditional table information: table: sports_competition", "question": "SELECT Competition_type, Country FROM competition"} +{"answer": "What are the distinct years in which the competitions type is not 'Tournament'?\nAdditional table information: table: sports_competition", "question": "SELECT DISTINCT YEAR FROM competition WHERE Competition_type <> 'Tournament'"} +{"answer": "What are the different years for all competitions that are not of type equal to tournament?\nAdditional table information: table: sports_competition", "question": "SELECT DISTINCT YEAR FROM competition WHERE Competition_type <> 'Tournament'"} +{"answer": "What are the maximum and minimum number of silver medals for clubs.\nAdditional table information: table: sports_competition", "question": "SELECT MAX(Silver), MIN(Silver) FROM club_rank"} +{"answer": "What are the maximum and minimum number of silver medals for all the clubs?\nAdditional table information: table: sports_competition", "question": "SELECT MAX(Silver), MIN(Silver) FROM club_rank"} +{"answer": "How many clubs have total medals less than 10?\nAdditional table information: table: sports_competition", "question": "SELECT COUNT(*) FROM club_rank WHERE Total < 10"} +{"answer": "What is the total number of clubs that have less than 10 medals in total?\nAdditional table information: table: sports_competition", "question": "SELECT COUNT(*) FROM club_rank WHERE Total < 10"} +{"answer": "List all club names in ascending order of start year.\nAdditional table information: table: sports_competition", "question": "SELECT name FROM club ORDER BY Start_year ASC NULLS FIRST"} +{"answer": "What are the names of all the clubs starting with the oldest?\nAdditional table information: table: sports_competition", "question": "SELECT name FROM club ORDER BY Start_year ASC NULLS FIRST"} +{"answer": "List all club names in descending alphabetical order.\nAdditional table information: table: sports_competition", "question": "SELECT name FROM club ORDER BY name DESC"} +{"answer": "What are the names of all the clubs ordered in descending alphabetical order?\nAdditional table information: table: sports_competition", "question": "SELECT name FROM club ORDER BY name DESC"} +{"answer": "Please show the names and the players of clubs.\nAdditional table information: table: sports_competition", "question": "SELECT T1.name, T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID"} +{"answer": "What are the names and players of all the clubs?\nAdditional table information: table: sports_competition", "question": "SELECT T1.name, T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID"} +{"answer": "Show the names of clubs that have players with position 'Right Wing'.\nAdditional table information: table: sports_competition", "question": "SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = 'Right Wing'"} +{"answer": "What are the names of the clubs that have players in the position of 'Right Wing'?\nAdditional table information: table: sports_competition", "question": "SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = 'Right Wing'"} +{"answer": "What is the average points of players from club with name 'AIB'.\nAdditional table information: table: sports_competition", "question": "SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = 'AIB'"} +{"answer": "What is the average number of points for players from the 'AIB' club?\nAdditional table information: table: sports_competition", "question": "SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = 'AIB'"} +{"answer": "List the position of players and the average number of points of players of each position.\nAdditional table information: table: sports_competition", "question": "SELECT POSITION, AVG(Points) FROM player GROUP BY POSITION"} +{"answer": "For each position, what is the average number of points for players in that position?\nAdditional table information: table: sports_competition", "question": "SELECT POSITION, AVG(Points) FROM player GROUP BY POSITION"} +{"answer": "List the position of players with average number of points scored by players of that position bigger than 20.\nAdditional table information: table: sports_competition", "question": "SELECT POSITION FROM player GROUP BY name HAVING AVG(Points) >= 20"} +{"answer": "What are the positions of players whose average number of points scored by that position is larger than 20?\nAdditional table information: table: sports_competition", "question": "SELECT POSITION FROM player GROUP BY name HAVING AVG(Points) >= 20"} +{"answer": "List the types of competition and the number of competitions of each type.\nAdditional table information: table: sports_competition", "question": "SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type"} +{"answer": "What are the types of competition and number of competitions for that type?\nAdditional table information: table: sports_competition", "question": "SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type"} +{"answer": "List the most common type of competition.\nAdditional table information: table: sports_competition", "question": "SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the most common competition type?\nAdditional table information: table: sports_competition", "question": "SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the types of competition that have at most five competitions of that type.\nAdditional table information: table: sports_competition", "question": "SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5"} +{"answer": "What are the types of competition that have most 5 competitions for that type?\nAdditional table information: table: sports_competition", "question": "SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5"} +{"answer": "List the names of clubs that do not have any players.\nAdditional table information: table: sports_competition", "question": "SELECT name FROM CLub WHERE NOT Club_ID IN (SELECT Club_ID FROM player)"} +{"answer": "What are the names of all clubs that do not have any players?\nAdditional table information: table: sports_competition", "question": "SELECT name FROM CLub WHERE NOT Club_ID IN (SELECT Club_ID FROM player)"} +{"answer": "What are the positions with both players having more than 20 points and less than 10 points.\nAdditional table information: table: sports_competition", "question": "SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10"} +{"answer": "What are the positions of both players that have more than 20 20 points and less than 10 points?\nAdditional table information: table: sports_competition", "question": "SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10"} +{"answer": "Show total points of all players.\nAdditional table information: table: sports_competition", "question": "SELECT SUM(Points) FROM player"} +{"answer": "What is the total number of points for all players?\nAdditional table information: table: sports_competition", "question": "SELECT SUM(Points) FROM player"} +{"answer": "how many different positions are there?\nAdditional table information: table: sports_competition", "question": "SELECT COUNT(DISTINCT POSITION) FROM player"} +{"answer": "How many different position for players are listed?\nAdditional table information: table: sports_competition", "question": "SELECT COUNT(DISTINCT POSITION) FROM player"} +{"answer": "what are the name of players who get more than the average points.\nAdditional table information: table: sports_competition", "question": "SELECT name FROM player WHERE points > (SELECT AVG(points) FROM player)"} +{"answer": "What are the names of all players that got more than the average number of points?\nAdditional table information: table: sports_competition", "question": "SELECT name FROM player WHERE points > (SELECT AVG(points) FROM player)"} +{"answer": "find the number of players whose points are lower than 30 in each position.\nAdditional table information: table: sports_competition", "question": "SELECT COUNT(*), POSITION FROM player WHERE points < 30 GROUP BY POSITION"} +{"answer": "What is the number of players who have points less than 30 for each position?\nAdditional table information: table: sports_competition", "question": "SELECT COUNT(*), POSITION FROM player WHERE points < 30 GROUP BY POSITION"} +{"answer": "which country did participated in the most number of Tournament competitions?\nAdditional table information: table: sports_competition", "question": "SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "what is the name of the country that participated in the most tournament competitions?\nAdditional table information: table: sports_competition", "question": "SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "which countries did participated in both Friendly and Tournament type competitions.\nAdditional table information: table: sports_competition", "question": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'"} +{"answer": "What are the countries that participated in both friendly and tournament type competitions?\nAdditional table information: table: sports_competition", "question": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'"} +{"answer": "Find the countries that have never participated in any competition with Friendly type.\nAdditional table information: table: sports_competition", "question": "SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'"} +{"answer": "What are the countries that have never participated in any friendly-type competitions?\nAdditional table information: table: sports_competition", "question": "SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'"} +{"answer": "How many furniture components are there in total?\nAdditional table information: table: manufacturer", "question": "SELECT SUM(num_of_component) FROM furniture"} +{"answer": "Return the name and id of the furniture with the highest market rate.\nAdditional table information: table: manufacturer", "question": "SELECT name, furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1"} +{"answer": "find the total market rate of the furnitures that have the top 2 market shares.\nAdditional table information: table: manufacturer", "question": "SELECT SUM(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2"} +{"answer": "Find the component amounts and names of all furnitures that have more than 10 components.\nAdditional table information: table: manufacturer", "question": "SELECT Num_of_Component, name FROM furniture WHERE Num_of_Component > 10"} +{"answer": "Find the name and component amount of the least popular furniture.\nAdditional table information: table: manufacturer", "question": "SELECT name, Num_of_Component FROM furniture ORDER BY market_rate NULLS FIRST LIMIT 1"} +{"answer": "Find the names of furnitures whose prices are lower than the highest price.\nAdditional table information: table: manufacturer", "question": "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)"} +{"answer": "Which manufacturer has the most number of shops? List its name and year of opening.\nAdditional table information: table: manufacturer", "question": "SELECT open_year, name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1"} +{"answer": "Find the average number of factories for the manufacturers that have more than 20 shops.\nAdditional table information: table: manufacturer", "question": "SELECT AVG(Num_of_Factories) FROM manufacturer WHERE num_of_shops > 20"} +{"answer": "List all manufacturer names and ids ordered by their opening year.\nAdditional table information: table: manufacturer", "question": "SELECT name, manufacturer_id FROM manufacturer ORDER BY open_year NULLS FIRST"} +{"answer": "Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.\nAdditional table information: table: manufacturer", "question": "SELECT name, open_year FROM manufacturer WHERE num_of_shops > 10 OR Num_of_Factories < 10"} +{"answer": "what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.\nAdditional table information: table: manufacturer", "question": "SELECT MAX(num_of_shops), AVG(Num_of_Factories) FROM manufacturer WHERE open_year < 1990"} +{"answer": "Find the id and number of shops for the company that produces the most expensive furniture.\nAdditional table information: table: manufacturer", "question": "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"} +{"answer": "Find the number of funiture types produced by each manufacturer as well as the company names.\nAdditional table information: table: manufacturer", "question": "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"} +{"answer": "Give me the names and prices of furnitures which some companies are manufacturing.\nAdditional table information: table: manufacturer", "question": "SELECT t1.name, t2.price_in_dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID"} +{"answer": "Find the market shares and names of furnitures which no any company is producing in our records.\nAdditional table information: table: manufacturer", "question": "SELECT Market_Rate, name FROM furniture WHERE NOT Furniture_ID IN (SELECT Furniture_ID FROM furniture_manufacte)"} +{"answer": "Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components.\nAdditional table information: table: manufacturer", "question": "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"} +{"answer": "Display the first name and department name for each employee.\nAdditional table information: table: hr_1", "question": "SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id"} +{"answer": "What are the first name and department name of all employees?\nAdditional table information: table: hr_1", "question": "SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id"} +{"answer": "List the full name (first and last name), and salary for those employees who earn below 6000.\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, salary FROM employees WHERE salary < 6000"} +{"answer": "What are the full names and salaries for any employees earning less than 6000?\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, salary FROM employees WHERE salary < 6000"} +{"answer": "Display the first name, and department number for all employees whose last name is 'McEwen'.\nAdditional table information: table: hr_1", "question": "SELECT first_name, department_id FROM employees WHERE last_name = 'McEwen'"} +{"answer": "What are the first names and department numbers for employees with last name McEwen?\nAdditional table information: table: hr_1", "question": "SELECT first_name, department_id FROM employees WHERE last_name = 'McEwen'"} +{"answer": "Return all the information for all employees without any department number.\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE department_id = 'null'"} +{"answer": "What are all the employees without a department number?\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE department_id = 'null'"} +{"answer": "Display all the information about the department Marketing.\nAdditional table information: table: hr_1", "question": "SELECT * FROM departments WHERE department_name = 'Marketing'"} +{"answer": "What is all the information about the Marketing department?\nAdditional table information: table: hr_1", "question": "SELECT * FROM departments WHERE department_name = 'Marketing'"} +{"answer": "when is the hire date for those employees whose first name does not containing the letter M?\nAdditional table information: table: hr_1", "question": "SELECT hire_date FROM employees WHERE NOT first_name LIKE '%M%'"} +{"answer": "On what dates were employees without the letter M in their first names hired?\nAdditional table information: table: hr_1", "question": "SELECT hire_date FROM employees WHERE NOT first_name LIKE '%M%'"} +{"answer": "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.\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%'"} +{"answer": "What are the full name, hire date, salary, and department id for employees without the letter M in their first name?\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%'"} +{"answer": "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.\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%' ORDER BY department_id NULLS FIRST"} +{"answer": "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?\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%' ORDER BY department_id NULLS FIRST"} +{"answer": "what is the phone number of employees whose salary is in the range of 8000 and 12000?\nAdditional table information: table: hr_1", "question": "SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000"} +{"answer": "Return the phone numbers of employees with salaries between 8000 and 12000.\nAdditional table information: table: hr_1", "question": "SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000"} +{"answer": "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.\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct <> 'null' OR department_id <> 40"} +{"answer": "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.\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct <> 'null' OR department_id <> 40"} +{"answer": "What are the full name (first and last name) and salary for all employees who does not have any value for commission?\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, salary FROM employees WHERE commission_pct = 'null'"} +{"answer": "Return the full names and salaries of employees with null commissions.\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, salary FROM employees WHERE commission_pct = 'null'"} +{"answer": "Display the first and last name, and salary for those employees whose first name is ending with the letter m.\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, salary FROM employees WHERE first_name LIKE '%m'"} +{"answer": "Return the full names and salaries for employees with first names that end with the letter m.\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, salary FROM employees WHERE first_name LIKE '%m'"} +{"answer": "Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009.\nAdditional table information: table: hr_1", "question": "SELECT job_id, hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'"} +{"answer": "What are the job ids and dates of hire for employees hired after November 5th, 2007 and before July 5th, 2009?\nAdditional table information: table: hr_1", "question": "SELECT job_id, hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'"} +{"answer": "What are the first and last name for those employees who works either in department 70 or 90?\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name FROM employees WHERE department_id = 70 OR department_id = 90"} +{"answer": "What are the full names of employees who with in department 70 or 90?\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name FROM employees WHERE department_id = 70 OR department_id = 90"} +{"answer": "Find the salary and manager number for those employees who is working under a manager.\nAdditional table information: table: hr_1", "question": "SELECT salary, manager_id FROM employees WHERE manager_id <> 'null'"} +{"answer": "What are the salaries and manager ids for employees who have managers?\nAdditional table information: table: hr_1", "question": "SELECT salary, manager_id FROM employees WHERE manager_id <> 'null'"} +{"answer": "display all the details from Employees table for those employees who was hired before 2002-06-21.\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE hire_date < '2002-06-21'"} +{"answer": "What is all the information about employees hired before June 21, 2002?\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE hire_date < '2002-06-21'"} +{"answer": "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.\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC"} +{"answer": "What is all the information about employees with D or S in their first name, ordered by salary descending?\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC"} +{"answer": "display those employees who joined after 7th September, 1987.\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE hire_date > '1987-09-07'"} +{"answer": "Which employees were hired after September 7th, 1987?\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE hire_date > '1987-09-07'"} +{"answer": "display the job title of jobs which minimum salary is greater than 9000.\nAdditional table information: table: hr_1", "question": "SELECT job_title FROM jobs WHERE min_salary > 9000"} +{"answer": "Which job titles correspond to jobs with salaries over 9000?\nAdditional table information: table: hr_1", "question": "SELECT job_title FROM jobs WHERE min_salary > 9000"} +{"answer": "display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000.\nAdditional table information: table: hr_1", "question": "SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000"} +{"answer": "What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000?\nAdditional table information: table: hr_1", "question": "SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000"} +{"answer": "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.\nAdditional table information: table: hr_1", "question": "SELECT email FROM employees WHERE commission_pct = 'null' AND salary BETWEEN 7000 AND 12000 AND department_id = 50"} +{"answer": "What are the emails of employees with null commission, salary between 7000 and 12000, and who work in department 50?\nAdditional table information: table: hr_1", "question": "SELECT email FROM employees WHERE commission_pct = 'null' AND salary BETWEEN 7000 AND 12000 AND department_id = 50"} +{"answer": "display the employee ID for each employee and the date on which he ended his previous job.\nAdditional table information: table: hr_1", "question": "SELECT employee_id, MAX(end_date) FROM job_history GROUP BY employee_id"} +{"answer": "What are the employee ids for each employee and final dates of employment at their last job?\nAdditional table information: table: hr_1", "question": "SELECT employee_id, MAX(end_date) FROM job_history GROUP BY employee_id"} +{"answer": "display those departments where more than ten employees work who got a commission percentage.\nAdditional table information: table: hr_1", "question": "SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10"} +{"answer": "What are the department ids for which more than 10 employees had a commission?\nAdditional table information: table: hr_1", "question": "SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10"} +{"answer": "Find the ids of the departments where any manager is managing 4 or more employees.\nAdditional table information: table: hr_1", "question": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4"} +{"answer": "What are department ids for departments with managers managing more than 3 employees?\nAdditional table information: table: hr_1", "question": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4"} +{"answer": "display the average salary of employees for each department who gets a commission percentage.\nAdditional table information: table: hr_1", "question": "SELECT department_id, AVG(salary) FROM employees WHERE commission_pct <> 'null' GROUP BY department_id"} +{"answer": "What is the average salary of employees who have a commission percentage that is not null?\nAdditional table information: table: hr_1", "question": "SELECT department_id, AVG(salary) FROM employees WHERE commission_pct <> 'null' GROUP BY department_id"} +{"answer": "display the country ID and number of cities for each country.\nAdditional table information: table: hr_1", "question": "SELECT country_id, COUNT(*) FROM locations GROUP BY country_id"} +{"answer": "Give the country id and corresponding count of cities in each country.\nAdditional table information: table: hr_1", "question": "SELECT country_id, COUNT(*) FROM locations GROUP BY country_id"} +{"answer": "display job ID for those jobs that were done by two or more for more than 300 days.\nAdditional table information: table: hr_1", "question": "SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2"} +{"answer": "What are the job ids for jobs done more than once for a period of more than 300 days?\nAdditional table information: table: hr_1", "question": "SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2"} +{"answer": "display the ID for those employees who did two or more jobs in the past.\nAdditional table information: table: hr_1", "question": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2"} +{"answer": "What are the employee ids for employees who have held two or more jobs?\nAdditional table information: table: hr_1", "question": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2"} +{"answer": "Find employee with ID and name of the country presently where (s)he is working.\nAdditional table information: table: hr_1", "question": "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"} +{"answer": "What are all the employee ids and the names of the countries in which they work?\nAdditional table information: table: hr_1", "question": "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"} +{"answer": "display the department name and number of employees in each of the department.\nAdditional table information: table: hr_1", "question": "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"} +{"answer": "Give the name of each department and the number of employees in each.\nAdditional table information: table: hr_1", "question": "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"} +{"answer": "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?\nAdditional table information: table: hr_1", "question": "SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000"} +{"answer": "What is all the job history info done by employees earning a salary greater than or equal to 12000?\nAdditional table information: table: hr_1", "question": "SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000"} +{"answer": "display job title and average salary of employees.\nAdditional table information: table: hr_1", "question": "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"} +{"answer": "What is the average salary for each job title?\nAdditional table information: table: hr_1", "question": "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"} +{"answer": "What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163?\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163)"} +{"answer": "Provide the full names of employees earning more than the employee with id 163.\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163)"} +{"answer": "return the smallest salary for every departments.\nAdditional table information: table: hr_1", "question": "SELECT MIN(salary), department_id FROM employees GROUP BY department_id"} +{"answer": "What is the minimum salary in each department?\nAdditional table information: table: hr_1", "question": "SELECT MIN(salary), department_id FROM employees GROUP BY department_id"} +{"answer": "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.\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)"} +{"answer": "What are the full names and department ids for the lowest paid employees across all departments.\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)"} +{"answer": "Find the employee id for all employees who earn more than the average salary.\nAdditional table information: table: hr_1", "question": "SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)"} +{"answer": "What are the employee ids for employees who make more than the average?\nAdditional table information: table: hr_1", "question": "SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)"} +{"answer": "display the employee id and salary of all employees who report to Payam (first name).\nAdditional table information: table: hr_1", "question": "SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam')"} +{"answer": "What are the employee ids of employees who report to Payam, and what are their salaries?\nAdditional table information: table: hr_1", "question": "SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam')"} +{"answer": "find the name of all departments that do actually have one or more employees assigned to them.\nAdditional table information: table: hr_1", "question": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id"} +{"answer": "What are the names of departments that have at least one employee.\nAdditional table information: table: hr_1", "question": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id"} +{"answer": "get the details of employees who manage a department.\nAdditional table information: table: hr_1", "question": "SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id"} +{"answer": "What is all the information regarding employees who are managers?\nAdditional table information: table: hr_1", "question": "SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id"} +{"answer": "display all the information about the department Marketing.\nAdditional table information: table: hr_1", "question": "SELECT * FROM departments WHERE department_name = 'Marketing'"} +{"answer": "What is all the information about the Marketing department?\nAdditional table information: table: hr_1", "question": "SELECT * FROM departments WHERE department_name = 'Marketing'"} +{"answer": "display the ID for those employees who did two or more jobs in the past.\nAdditional table information: table: hr_1", "question": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2"} +{"answer": "What are the employee ids for those who had two or more jobs.\nAdditional table information: table: hr_1", "question": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2"} +{"answer": "What are the unique ids of those departments where any manager is managing 4 or more employees.\nAdditional table information: table: hr_1", "question": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4"} +{"answer": "Give the distinct department ids of departments in which a manager is in charge of 4 or more employees?\nAdditional table information: table: hr_1", "question": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4"} +{"answer": "Find the job ID for those jobs which average salary is above 8000.\nAdditional table information: table: hr_1", "question": "SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000"} +{"answer": "What are the job ids corresponding to jobs with average salary above 8000?\nAdditional table information: table: hr_1", "question": "SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000"} +{"answer": "display the employee ID and job name for all those jobs in department 80.\nAdditional table information: table: hr_1", "question": "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"} +{"answer": "what are the employee ids and job titles for employees in department 80?\nAdditional table information: table: hr_1", "question": "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"} +{"answer": "What is the first name and job id for all employees in the Finance department?\nAdditional table information: table: hr_1", "question": "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'"} +{"answer": "Give the first name and job id for all employees in the Finance department.\nAdditional table information: table: hr_1", "question": "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'"} +{"answer": "display all the information of the employees whose salary if within the range of smallest salary and 2500.\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500"} +{"answer": "What is all the information regarding employees with salaries above the minimum and under 2500?\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500"} +{"answer": "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.\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE NOT department_id IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)"} +{"answer": "What are the ids for employees who do not work in departments with managers that have ids between 100 and 200?\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE NOT department_id IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)"} +{"answer": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara.\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara')"} +{"answer": "What are the full names and hire dates for employees in the same department as someone with the first name Clara?\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara')"} +{"answer": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara.\nAdditional table information: table: hr_1", "question": "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'"} +{"answer": "What are the full names and hire dates for employees in the same department as someone with the first name Clara, not including Clara?\nAdditional table information: table: hr_1", "question": "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'"} +{"answer": "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.\nAdditional table information: table: hr_1", "question": "SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%')"} +{"answer": "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?\nAdditional table information: table: hr_1", "question": "SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%')"} +{"answer": "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.\nAdditional table information: table: hr_1", "question": "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%')"} +{"answer": "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?\nAdditional table information: table: hr_1", "question": "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%')"} +{"answer": "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.\nAdditional table information: table: hr_1", "question": "SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN')"} +{"answer": "What are the employee ids and job ids for employees who make less than the lowest earning employee with title MK_MAN?\nAdditional table information: table: hr_1", "question": "SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN')"} +{"answer": "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.\nAdditional table information: table: hr_1", "question": "SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN')"} +{"answer": "What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?\nAdditional table information: table: hr_1", "question": "SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN')"} +{"answer": "display the department id and the total salary for those departments which contains at least two employees.\nAdditional table information: table: hr_1", "question": "SELECT department_id, SUM(salary) FROM employees GROUP BY department_id HAVING COUNT(*) >= 2"} +{"answer": "What are total salaries and department id for each department that has more than 2 employees?\nAdditional table information: table: hr_1", "question": "SELECT department_id, SUM(salary) FROM employees GROUP BY department_id HAVING COUNT(*) >= 2"} +{"answer": "display all the information of those employees who did not have any job in the past.\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE NOT employee_id IN (SELECT employee_id FROM job_history)"} +{"answer": "What is all the information about employees who have never had a job in the past?\nAdditional table information: table: hr_1", "question": "SELECT * FROM employees WHERE NOT employee_id IN (SELECT employee_id FROM job_history)"} +{"answer": "display the department ID, full name (first and last name), salary for those employees who is highest salary in every department.\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, salary, department_id, MAX(salary) FROM employees GROUP BY department_id"} +{"answer": "What are the department ids, full names, and salaries for employees who make the most in their departments?\nAdditional table information: table: hr_1", "question": "SELECT first_name, last_name, salary, department_id, MAX(salary) FROM employees GROUP BY department_id"} +{"answer": "display the first and last name, department, city, and state province for each employee.\nAdditional table information: table: hr_1", "question": "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"} +{"answer": "What are the full names, departments, cities, and state provinces for each employee?\nAdditional table information: table: hr_1", "question": "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"} +{"answer": "display those employees who contain a letter z to their first name and also display their last name, city.\nAdditional table information: table: hr_1", "question": "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%'"} +{"answer": "What are the full names and cities of employees who have the letter Z in their first names?\nAdditional table information: table: hr_1", "question": "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%'"} +{"answer": "display the department name, city, and state province for each department.\nAdditional table information: table: hr_1", "question": "SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id"} +{"answer": "What are the department names, cities, and state provinces for each department?\nAdditional table information: table: hr_1", "question": "SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id"} +{"answer": "display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working.\nAdditional table information: table: hr_1", "question": "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"} +{"answer": "What the full names, ids of each employee and the name of the country they are in?\nAdditional table information: table: hr_1", "question": "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"} +{"answer": "display the department name and number of employees in each of the department.\nAdditional table information: table: hr_1", "question": "SELECT department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name"} +{"answer": "What are the department names and how many employees work in each of them?\nAdditional table information: table: hr_1", "question": "SELECT department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name"} +{"answer": "display the full name (first and last name), and salary of those employees who working in any department located in London.\nAdditional table information: table: hr_1", "question": "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'"} +{"answer": "What are full names and salaries of employees working in the city of London?\nAdditional table information: table: hr_1", "question": "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'"} +{"answer": "What is the name of the song that was released in the most recent year?\nAdditional table information: table: music_1", "question": "SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1"} +{"answer": "What is the name of the song that was released most recently?\nAdditional table information: table: music_1", "question": "SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1"} +{"answer": "What is the id of the longest song?\nAdditional table information: table: music_1", "question": "SELECT f_id FROM files ORDER BY duration DESC LIMIT 1"} +{"answer": "Find the id of the song that lasts the longest.\nAdditional table information: table: music_1", "question": "SELECT f_id FROM files ORDER BY duration DESC LIMIT 1"} +{"answer": "Find the names of all English songs.\nAdditional table information: table: music_1", "question": "SELECT song_name FROM song WHERE languages = 'english'"} +{"answer": "What are the names of all songs in English?\nAdditional table information: table: music_1", "question": "SELECT song_name FROM song WHERE languages = 'english'"} +{"answer": "What are the id of songs whose format is mp3.\nAdditional table information: table: music_1", "question": "SELECT f_id FROM files WHERE formats = 'mp3'"} +{"answer": "What are the id of all the files in mp3 format?\nAdditional table information: table: music_1", "question": "SELECT f_id FROM files WHERE formats = 'mp3'"} +{"answer": "List the name and country of origin for all singers who have produced songs with rating above 9.\nAdditional table information: table: music_1", "question": "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"} +{"answer": "What are the different names and countries of origins for all artists whose song ratings are above 9?\nAdditional table information: table: music_1", "question": "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"} +{"answer": "List the file size and format for all songs that have resolution lower than 800.\nAdditional table information: table: music_1", "question": "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"} +{"answer": "What are the file sizes and formats for all songs with a resolution lower than 800?\nAdditional table information: table: music_1", "question": "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"} +{"answer": "What is the name of the artist who produced the shortest song?\nAdditional table information: table: music_1", "question": "SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration NULLS FIRST LIMIT 1"} +{"answer": "What are the names of the artists who sang the shortest song?\nAdditional table information: table: music_1", "question": "SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration NULLS FIRST LIMIT 1"} +{"answer": "What are the names and countries of origin for the artists who produced the top three highly rated songs.\nAdditional table information: table: music_1", "question": "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"} +{"answer": "What are the names of the singers who sang the top 3 most highly rated songs and what countries do they hail from?\nAdditional table information: table: music_1", "question": "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"} +{"answer": "How many songs have 4 minute duration?\nAdditional table information: table: music_1", "question": "SELECT COUNT(*) FROM files WHERE duration LIKE '4:%'"} +{"answer": "What is the count of the songs that last approximately 4 minutes?\nAdditional table information: table: music_1", "question": "SELECT COUNT(*) FROM files WHERE duration LIKE '4:%'"} +{"answer": "How many artists are from Bangladesh?\nAdditional table information: table: music_1", "question": "SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh'"} +{"answer": "How many Bangladeshi artists are listed?\nAdditional table information: table: music_1", "question": "SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh'"} +{"answer": "What is the average rating of songs produced by female artists?\nAdditional table information: table: music_1", "question": "SELECT AVG(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female'"} +{"answer": "How many songs, on average, are sung by a female artist?\nAdditional table information: table: music_1", "question": "SELECT AVG(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female'"} +{"answer": "What is the most popular file format?\nAdditional table information: table: music_1", "question": "SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the file format that is used by the most files.\nAdditional table information: table: music_1", "question": "SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the names of the artists who are from UK and have produced English songs.\nAdditional table information: table: music_1", "question": "SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT artist_name FROM song WHERE languages = 'english'"} +{"answer": "What are the names of the artists that are from the UK and sang songs in English?\nAdditional table information: table: music_1", "question": "SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT artist_name FROM song WHERE languages = 'english'"} +{"answer": "Find the id of songs that are available in mp4 format and have resolution lower than 1000.\nAdditional table information: table: music_1", "question": "SELECT f_id FROM files WHERE formats = 'mp4' INTERSECT SELECT f_id FROM song WHERE resolution < 1000"} +{"answer": "What is the id of the files that are available in the format of mp4 and a resolution smaller than 1000?\nAdditional table information: table: music_1", "question": "SELECT f_id FROM files WHERE formats = 'mp4' INTERSECT SELECT f_id FROM song WHERE resolution < 1000"} +{"answer": "What is the country of origin of the artist who is female and produced a song in Bangla?\nAdditional table information: table: music_1", "question": "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'"} +{"answer": "What countries are the female artists who sung in the language Bangla from?\nAdditional table information: table: music_1", "question": "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'"} +{"answer": "What is the average duration of songs that have mp3 format and resolution below 800?\nAdditional table information: table: music_1", "question": "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"} +{"answer": "What is the average song duration for the songs that are in mp3 format and whose resolution below 800?\nAdditional table information: table: music_1", "question": "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"} +{"answer": "What is the number of artists for each gender?\nAdditional table information: table: music_1", "question": "SELECT COUNT(*), gender FROM artist GROUP BY gender"} +{"answer": "How many artists are male and how many are female?\nAdditional table information: table: music_1", "question": "SELECT COUNT(*), gender FROM artist GROUP BY gender"} +{"answer": "What is the average rating of songs for each language?\nAdditional table information: table: music_1", "question": "SELECT AVG(rating), languages FROM song GROUP BY languages"} +{"answer": "What is the average song rating for each language?\nAdditional table information: table: music_1", "question": "SELECT AVG(rating), languages FROM song GROUP BY languages"} +{"answer": "Return the gender and name of artist who produced the song with the lowest resolution.\nAdditional table information: table: music_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the gender and name of the artist who sang the song with the smallest resolution?\nAdditional table information: table: music_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "For each file format, return the number of artists who released songs in that format.\nAdditional table information: table: music_1", "question": "SELECT COUNT(*), formats FROM files GROUP BY formats"} +{"answer": "How many songs were released for each format?\nAdditional table information: table: music_1", "question": "SELECT COUNT(*), formats FROM files GROUP BY formats"} +{"answer": "Find the distinct names of all songs that have a higher resolution than some songs in English.\nAdditional table information: table: music_1", "question": "SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT MIN(resolution) FROM song WHERE languages = 'english')"} +{"answer": "What are the different names for all songs that have a higher resolution than English songs?\nAdditional table information: table: music_1", "question": "SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT MIN(resolution) FROM song WHERE languages = 'english')"} +{"answer": "What are the names of all songs that have a lower rating than some song of blues genre?\nAdditional table information: table: music_1", "question": "SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = 'blues')"} +{"answer": "What are the names of the songs that have a lower rating than at least one blues song?\nAdditional table information: table: music_1", "question": "SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = 'blues')"} +{"answer": "What is the name and country of origin of the artist who released a song that has 'love' in its title?\nAdditional table information: table: music_1", "question": "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%'"} +{"answer": "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?\nAdditional table information: table: music_1", "question": "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%'"} +{"answer": "List the name and gender for all artists who released songs in March.\nAdditional table information: table: music_1", "question": "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%'"} +{"answer": "What are the names and genders of all artists who released songs in the month of March?\nAdditional table information: table: music_1", "question": "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%'"} +{"answer": "List the names of all genres in alphabetical oder, together with its ratings.\nAdditional table information: table: music_1", "question": "SELECT g_name, rating FROM genre ORDER BY g_name NULLS FIRST"} +{"answer": "What are the names of all genres in alphabetical order, combined with its ratings?\nAdditional table information: table: music_1", "question": "SELECT g_name, rating FROM genre ORDER BY g_name NULLS FIRST"} +{"answer": "Give me a list of the names of all songs ordered by their resolution.\nAdditional table information: table: music_1", "question": "SELECT song_name FROM song ORDER BY resolution NULLS FIRST"} +{"answer": "What are the names of all songs that are ordered by their resolution numbers?\nAdditional table information: table: music_1", "question": "SELECT song_name FROM song ORDER BY resolution NULLS FIRST"} +{"answer": "What are the ids of songs that are available in either mp4 format or have resolution above 720?\nAdditional table information: table: music_1", "question": "SELECT f_id FROM files WHERE formats = 'mp4' UNION SELECT f_id FROM song WHERE resolution > 720"} +{"answer": "What are the ids of all songs that are available on mp4 or have a higher resolution than 720?\nAdditional table information: table: music_1", "question": "SELECT f_id FROM files WHERE formats = 'mp4' UNION SELECT f_id FROM song WHERE resolution > 720"} +{"answer": "List the names of all songs that have 4 minute duration or are in English.\nAdditional table information: table: music_1", "question": "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'"} +{"answer": "What are the names of all songs that are approximately 4 minutes long or are in English?\nAdditional table information: table: music_1", "question": "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'"} +{"answer": "What is the language used most often in the songs?\nAdditional table information: table: music_1", "question": "SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the languages that are used most often in songs?\nAdditional table information: table: music_1", "question": "SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the language that was used most often in songs with resolution above 500?\nAdditional table information: table: music_1", "question": "SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the name of the artist, for each language, that has the most songs with a higher resolution than 500?\nAdditional table information: table: music_1", "question": "SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the names of artists who are Male and are from UK?\nAdditional table information: table: music_1", "question": "SELECT artist_name FROM artist WHERE country = 'UK' AND gender = 'Male'"} +{"answer": "What are the names of all male British artists?\nAdditional table information: table: music_1", "question": "SELECT artist_name FROM artist WHERE country = 'UK' AND gender = 'Male'"} +{"answer": "Find the names of songs whose genre is modern or language is English.\nAdditional table information: table: music_1", "question": "SELECT song_name FROM song WHERE genre_is = 'modern' OR languages = 'english'"} +{"answer": "What are the names of the songs that are modern or sung in English?\nAdditional table information: table: music_1", "question": "SELECT song_name FROM song WHERE genre_is = 'modern' OR languages = 'english'"} +{"answer": "Return the names of songs for which format is mp3 and resolution is below 1000.\nAdditional table information: table: music_1", "question": "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"} +{"answer": "What are the names of all songs that are in mp3 format and have a resolution lower than 1000?\nAdditional table information: table: music_1", "question": "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"} +{"answer": "Return the names of singers who are from UK and released an English song.\nAdditional table information: table: music_1", "question": "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'"} +{"answer": "What are the names of all singers that are from the UK and released a song in English?\nAdditional table information: table: music_1", "question": "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'"} +{"answer": "What are the average rating and resolution of songs that are in Bangla?\nAdditional table information: table: music_1", "question": "SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = 'bangla'"} +{"answer": "What is the average rating and resolution of all bangla songs?\nAdditional table information: table: music_1", "question": "SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = 'bangla'"} +{"answer": "What are the maximum and minimum resolution of songs whose duration is 3 minutes?\nAdditional table information: table: music_1", "question": "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:%'"} +{"answer": "What is the maximum and minimum resolution of all songs that are approximately 3 minutes long?\nAdditional table information: table: music_1", "question": "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:%'"} +{"answer": "What are the maximum duration and resolution of songs grouped and ordered by languages?\nAdditional table information: table: music_1", "question": "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 NULLS FIRST"} +{"answer": "What are the maximum duration and resolution of all songs, for each language, ordered alphabetically by language?\nAdditional table information: table: music_1", "question": "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 NULLS FIRST"} +{"answer": "What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre?\nAdditional table information: table: music_1", "question": "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 NULLS FIRST"} +{"answer": "What is the shortest and most poorly rated song for each genre, ordered alphabetically by genre?\nAdditional table information: table: music_1", "question": "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 NULLS FIRST"} +{"answer": "Find the names and number of works of all artists who have at least one English songs.\nAdditional table information: table: music_1", "question": "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"} +{"answer": "What are the names and number of works for all artists who have sung at least one song in English?\nAdditional table information: table: music_1", "question": "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"} +{"answer": "Find the name and country of origin for all artists who have release at least one song of resolution above 900.\nAdditional table information: table: music_1", "question": "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"} +{"answer": "What is the name and country of origin for each artist who has released a song with a resolution higher than 900?\nAdditional table information: table: music_1", "question": "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"} +{"answer": "Find the names and number of works of the three artists who have produced the most songs.\nAdditional table information: table: music_1", "question": "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"} +{"answer": "What are the names of the three artists who have produced the most songs, and how many works did they produce?\nAdditional table information: table: music_1", "question": "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"} +{"answer": "Find the country of origin for the artist who made the least number of songs?\nAdditional table information: table: music_1", "question": "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(*) NULLS FIRST LIMIT 1"} +{"answer": "What country is the artist who made the fewest songs from?\nAdditional table information: table: music_1", "question": "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(*) NULLS FIRST LIMIT 1"} +{"answer": "What are the names of the songs whose rating is below the rating of all songs in English?\nAdditional table information: table: music_1", "question": "SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english')"} +{"answer": "What are the song names for every song whose rating is less than the minimum rating for English songs?\nAdditional table information: table: music_1", "question": "SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english')"} +{"answer": "What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8?\nAdditional table information: table: music_1", "question": "SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8)"} +{"answer": "What is the id of every song that has a resolution higher than that of a song with a rating below 8?\nAdditional table information: table: music_1", "question": "SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8)"} +{"answer": "What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre?\nAdditional table information: table: music_1", "question": "SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = 'modern')"} +{"answer": "What are the ids of all songs that have higher resolution of the average resolution in the modern genre?\nAdditional table information: table: music_1", "question": "SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = 'modern')"} +{"answer": "Find the top 3 artists who have the largest number of songs works whose language is Bangla.\nAdditional table information: table: music_1", "question": "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"} +{"answer": "What are the top 3 artists with the largest number of songs in the language Bangla?\nAdditional table information: table: music_1", "question": "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"} +{"answer": "List the id, genre and artist name of English songs ordered by rating.\nAdditional table information: table: music_1", "question": "SELECT f_id, genre_is, artist_name FROM song WHERE languages = 'english' ORDER BY rating NULLS FIRST"} +{"answer": "What is the id, genre, and name of the artist for every English song ordered by ascending rating?\nAdditional table information: table: music_1", "question": "SELECT f_id, genre_is, artist_name FROM song WHERE languages = 'english' ORDER BY rating NULLS FIRST"} +{"answer": "List the duration, file size and format of songs whose genre is pop, ordered by title?\nAdditional table information: table: music_1", "question": "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 NULLS FIRST"} +{"answer": "What is the duration, file size, and song format for every pop song, ordered by title alphabetically?\nAdditional table information: table: music_1", "question": "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 NULLS FIRST"} +{"answer": "Find the names of the artists who have produced English songs but have never received rating higher than 8.\nAdditional table information: table: music_1", "question": "SELECT DISTINCT artist_name FROM song WHERE languages = 'english' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8"} +{"answer": "What are the names of the different artists that have produced a song in English but have never receieved a rating higher than 8?\nAdditional table information: table: music_1", "question": "SELECT DISTINCT artist_name FROM song WHERE languages = 'english' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8"} +{"answer": "Find the names of the artists who are from Bangladesh and have never received rating higher than 7.\nAdditional table information: table: music_1", "question": "SELECT DISTINCT artist_name FROM artist WHERE country = 'Bangladesh' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7"} +{"answer": "What are the names of the different artists from Bangladesh who never received a rating higher than a 7?\nAdditional table information: table: music_1", "question": "SELECT DISTINCT artist_name FROM artist WHERE country = 'Bangladesh' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7"} +{"answer": "what is the full name and id of the college with the largest number of baseball players?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "Find the full name and id of the college that has the most baseball players.\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "What is average salary of the players in the team named 'Boston Red Stockings' ?\nAdditional table information: table: baseball_1", "question": "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'"} +{"answer": "Compute the average salary of the players in the team called 'Boston Red Stockings'.\nAdditional table information: table: baseball_1", "question": "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'"} +{"answer": "What are first and last names of players participating in all star game in 1998?\nAdditional table information: table: baseball_1", "question": "SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998"} +{"answer": "List the first and last name for players who participated in all star game in 1998.\nAdditional table information: table: baseball_1", "question": "SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998"} +{"answer": "What are the first name, last name and id of the player with the most all star game experiences? Also list the count.\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "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.\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "How many players enter hall of fame each year?\nAdditional table information: table: baseball_1", "question": "SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid"} +{"answer": "Count the number of players who enter hall of fame for each year.\nAdditional table information: table: baseball_1", "question": "SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid"} +{"answer": "What is the average number of attendance at home games for each year?\nAdditional table information: table: baseball_1", "question": "SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR"} +{"answer": "For each year, return the year and the average number of attendance at home games.\nAdditional table information: table: baseball_1", "question": "SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR"} +{"answer": "In 2014, what are the id and rank of the team that has the largest average number of attendance?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "Find the id and rank of the team that has the highest average attendance rate in 2014.\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "What are the manager's first name, last name and id who won the most manager award?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "Which manager won the most manager award? Give me the manager's first name, last name and id.\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "How many parks are there in the state of NY?\nAdditional table information: table: baseball_1", "question": "SELECT COUNT(*) FROM park WHERE state = 'NY'"} +{"answer": "Show me the number of parks the state of NY has.\nAdditional table information: table: baseball_1", "question": "SELECT COUNT(*) FROM park WHERE state = 'NY'"} +{"answer": "Which 3 players won the most player awards? List their full name and id.\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "Find the first name, last name and id for the top three players won the most player awards.\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "List three countries which are the origins of the least players.\nAdditional table information: table: baseball_1", "question": "SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 3"} +{"answer": "What are the three countries that the least players are from?\nAdditional table information: table: baseball_1", "question": "SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 3"} +{"answer": "Find all the players' first name and last name who have empty death record.\nAdditional table information: table: baseball_1", "question": "SELECT name_first, name_last FROM player WHERE death_year = ''"} +{"answer": "What are the first name and last name of the players whose death record is empty?\nAdditional table information: table: baseball_1", "question": "SELECT name_first, name_last FROM player WHERE death_year = ''"} +{"answer": "How many players born in USA are right-handed batters? That is, have the batter value 'R'.\nAdditional table information: table: baseball_1", "question": "SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R'"} +{"answer": "Count the number of players who were born in USA and have bats information 'R'.\nAdditional table information: table: baseball_1", "question": "SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R'"} +{"answer": "What is the average height of the players from the college named 'Yale University'?\nAdditional table information: table: baseball_1", "question": "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'"} +{"answer": "Find the average height of the players who belong to the college called 'Yale University'.\nAdditional table information: table: baseball_1", "question": "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'"} +{"answer": "What is the highest salary among each team? List the team name, id and maximum salary.\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "For each team, return the team name, id and the maximum salary among the team.\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "What are the name and id of the team offering the lowest average salary?\nAdditional table information: table: baseball_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Which team offers the lowest average salary? Give me the name and id of the team.\nAdditional table information: table: baseball_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Find the players' first name and last name who won award both in 1960 and in 1961.\nAdditional table information: table: baseball_1", "question": "SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1961"} +{"answer": "Which players won awards in both 1960 and 1961? Return their first names and last names.\nAdditional table information: table: baseball_1", "question": "SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1961"} +{"answer": "List players' first name and last name who have weight greater than 220 or height shorter than 75.\nAdditional table information: table: baseball_1", "question": "SELECT name_first, name_last FROM player WHERE weight > 220 OR height < 75"} +{"answer": "What are the first name and last name of the players who have weight above 220 or height below 75?\nAdditional table information: table: baseball_1", "question": "SELECT name_first, name_last FROM player WHERE weight > 220 OR height < 75"} +{"answer": "List the maximum scores of the team Boston Red Stockings when the team won in postseason?\nAdditional table information: table: baseball_1", "question": "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'"} +{"answer": "What are the maximum scores the team Boston Red Stockings got when the team won in postseason?\nAdditional table information: table: baseball_1", "question": "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'"} +{"answer": "How many times did Boston Red Stockings lose in 2009 postseason?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "Count the number of times the team 'Boston Red Stockings' lost in 2009 postseason.\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "What are the name and id of the team with the most victories in 2008 postseason?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "Find the name and id of the team that won the most times in 2008 postseason.\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "What is the number of wins the team Boston Red Stockings got in the postseasons each year in history?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons.\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "What is the total number of postseason games that team Boston Red Stockings participated in?\nAdditional table information: table: baseball_1", "question": "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')"} +{"answer": "How many times in total did the team Boston Red Stockings participate in postseason games?\nAdditional table information: table: baseball_1", "question": "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')"} +{"answer": "How many games in 1885 postseason resulted in ties (that is, the value of 'ties' is '1')?\nAdditional table information: table: baseball_1", "question": "SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1"} +{"answer": "Find the number of tied games (the value of 'ties' is '1') in 1885 postseason.\nAdditional table information: table: baseball_1", "question": "SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1"} +{"answer": "What is the total salary paid by team Boston Red Stockings in 2010?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "What is the total salary expenses of team Boston Red Stockings in 2010?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "How many players were in the team Boston Red Stockings in 2000?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "How many players did Boston Red Stockings have in 2000?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "List the 3 highest salaries of the players in 2001?\nAdditional table information: table: baseball_1", "question": "SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3"} +{"answer": "How much salary did the top 3 well-paid players get in 2001?\nAdditional table information: table: baseball_1", "question": "SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3"} +{"answer": "What were all the salary values of players in 2010 and 2001?\nAdditional table information: table: baseball_1", "question": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001"} +{"answer": "List all the salary values players received in 2010 and 2001.\nAdditional table information: table: baseball_1", "question": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001"} +{"answer": "In which year did the least people enter hall of fame?\nAdditional table information: table: baseball_1", "question": "SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "Find the year in which the least people enter hall of fame.\nAdditional table information: table: baseball_1", "question": "SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "How many parks are there in Atlanta city?\nAdditional table information: table: baseball_1", "question": "SELECT COUNT(*) FROM park WHERE city = 'Atlanta'"} +{"answer": "How many parks does Atlanta city have?\nAdditional table information: table: baseball_1", "question": "SELECT COUNT(*) FROM park WHERE city = 'Atlanta'"} +{"answer": "How many games were played in park 'Columbia Park' in 1907?\nAdditional table information: table: baseball_1", "question": "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'"} +{"answer": "Count the number of games taken place in park 'Columbia Park' in 1907.\nAdditional table information: table: baseball_1", "question": "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'"} +{"answer": "How many games were played in city Atlanta in 2000?\nAdditional table information: table: baseball_1", "question": "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'"} +{"answer": "Find the number of games taken place in city Atlanta in 2000.\nAdditional table information: table: baseball_1", "question": "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'"} +{"answer": "What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "How many games in total did team Boston Red Stockings attend from 2000 to 2010?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "Compute the total salary that the player with first name Len and last name Barker received between 1985 to 1990.\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007.\nAdditional table information: table: baseball_1", "question": "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'"} +{"answer": "What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007?\nAdditional table information: table: baseball_1", "question": "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'"} +{"answer": "How many home games did the team Boston Red Stockings play from 1990 to 2000 in total?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "Count the total number of games the team Boston Red Stockings attended from 1990 to 2000.\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "Which team had the least number of attendances in home games in 1980?\nAdditional table information: table: baseball_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Find the team that attended the least number of home games in 1980.\nAdditional table information: table: baseball_1", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "List the names of states that have more than 2 parks.\nAdditional table information: table: baseball_1", "question": "SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2"} +{"answer": "Which states have more than 2 parks?\nAdditional table information: table: baseball_1", "question": "SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2"} +{"answer": "How many team franchises are active, with active value 'Y'?\nAdditional table information: table: baseball_1", "question": "SELECT COUNT(*) FROM team_franchise WHERE active = 'Y'"} +{"answer": "Find the number of team franchises that are active (have 'Y' as 'active' information).\nAdditional table information: table: baseball_1", "question": "SELECT COUNT(*) FROM team_franchise WHERE active = 'Y'"} +{"answer": "Which cities have 2 to 4 parks?\nAdditional table information: table: baseball_1", "question": "SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4"} +{"answer": "Find all the cities that have 2 to 4 parks.\nAdditional table information: table: baseball_1", "question": "SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4"} +{"answer": "Which park had most attendances in 2008?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "Which park did the most people attend in 2008?\nAdditional table information: table: baseball_1", "question": "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"} +{"answer": "How many camera lenses have a focal length longer than 15 mm?\nAdditional table information: table: mountain_photos", "question": "SELECT COUNT(*) FROM camera_lens WHERE focal_length_mm > 15"} +{"answer": "Find the brand and name for each camera lens, and sort in descending order of maximum aperture.\nAdditional table information: table: mountain_photos", "question": "SELECT brand, name FROM camera_lens ORDER BY max_aperture DESC"} +{"answer": "List the id, color scheme, and name for all the photos.\nAdditional table information: table: mountain_photos", "question": "SELECT id, color, name FROM photos"} +{"answer": "What are the maximum and average height of the mountains?\nAdditional table information: table: mountain_photos", "question": "SELECT MAX(height), AVG(height) FROM mountain"} +{"answer": "What are the average prominence of the mountains in country 'Morocco'?\nAdditional table information: table: mountain_photos", "question": "SELECT AVG(prominence) FROM mountain WHERE country = 'Morocco'"} +{"answer": "What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'?\nAdditional table information: table: mountain_photos", "question": "SELECT name, height, prominence FROM mountain WHERE range <> 'Aberdare Range'"} +{"answer": "What are the id and name of the photos for mountains?\nAdditional table information: table: mountain_photos", "question": "SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000"} +{"answer": "What are the id and name of the mountains that have at least 2 photos?\nAdditional table information: table: mountain_photos", "question": "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"} +{"answer": "What are the names of the cameras that have taken picture of the most mountains?\nAdditional table information: table: mountain_photos", "question": "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"} +{"answer": "What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'?\nAdditional table information: table: mountain_photos", "question": "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'"} +{"answer": "How many different kinds of lens brands are there?\nAdditional table information: table: mountain_photos", "question": "SELECT COUNT(DISTINCT brand) FROM camera_lens"} +{"answer": "How many camera lenses are not used in taking any photos?\nAdditional table information: table: mountain_photos", "question": "SELECT COUNT(*) FROM camera_lens WHERE NOT id IN (SELECT camera_lens_id FROM photos)"} +{"answer": "How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'?\nAdditional table information: table: mountain_photos", "question": "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'"} +{"answer": "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'\nAdditional table information: table: mountain_photos", "question": "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'"} +{"answer": "Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'.\nAdditional table information: table: mountain_photos", "question": "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'"} +{"answer": "List the camera lens names containing substring 'Digital'.\nAdditional table information: table: mountain_photos", "question": "SELECT name FROM camera_lens WHERE name LIKE '%Digital%'"} +{"answer": "What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos.\nAdditional table information: table: mountain_photos", "question": "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(*) NULLS FIRST"} +{"answer": "Find the names of channels that are not owned by CCTV.\nAdditional table information: table: program_share", "question": "SELECT name FROM channel WHERE OWNER <> 'CCTV'"} +{"answer": "Which channels are not owned by CCTV? Give me the channel names.\nAdditional table information: table: program_share", "question": "SELECT name FROM channel WHERE OWNER <> 'CCTV'"} +{"answer": "List all channel names ordered by their rating in percent from big to small.\nAdditional table information: table: program_share", "question": "SELECT name FROM channel ORDER BY rating_in_percent DESC"} +{"answer": "Give me a list of all the channel names sorted by the channel rating in descending order.\nAdditional table information: table: program_share", "question": "SELECT name FROM channel ORDER BY rating_in_percent DESC"} +{"answer": "What is the owner of the channel that has the highest rating ratio?\nAdditional table information: table: program_share", "question": "SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1"} +{"answer": "Show me the owner of the channel with the highest rating.\nAdditional table information: table: program_share", "question": "SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1"} +{"answer": "how many programs are there?\nAdditional table information: table: program_share", "question": "SELECT COUNT(*) FROM program"} +{"answer": "Count the number of programs.\nAdditional table information: table: program_share", "question": "SELECT COUNT(*) FROM program"} +{"answer": "list all the names of programs, ordering by launch time.\nAdditional table information: table: program_share", "question": "SELECT name FROM program ORDER BY launch NULLS FIRST"} +{"answer": "What is the list of program names, sorted by the order of launch date?\nAdditional table information: table: program_share", "question": "SELECT name FROM program ORDER BY launch NULLS FIRST"} +{"answer": "List the name, origin and owner of each program.\nAdditional table information: table: program_share", "question": "SELECT name, origin, OWNER FROM program"} +{"answer": "What are the name, origin and owner of each program?\nAdditional table information: table: program_share", "question": "SELECT name, origin, OWNER FROM program"} +{"answer": "find the name of the program that was launched most recently.\nAdditional table information: table: program_share", "question": "SELECT name FROM program ORDER BY launch DESC LIMIT 1"} +{"answer": "Which program was launched most recently? Return the program name.\nAdditional table information: table: program_share", "question": "SELECT name FROM program ORDER BY launch DESC LIMIT 1"} +{"answer": "find the total percentage share of all channels owned by CCTV.\nAdditional table information: table: program_share", "question": "SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'"} +{"answer": "What is the total share (in percent) of all the channels owned by CCTV?\nAdditional table information: table: program_share", "question": "SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'"} +{"answer": "Find the names of the channels that are broadcast in the morning.\nAdditional table information: table: program_share", "question": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'"} +{"answer": "Which channels are broadcast in the morning? Give me the channel names.\nAdditional table information: table: program_share", "question": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'"} +{"answer": "what are the names of the channels that broadcast in both morning and night?\nAdditional table information: table: program_share", "question": "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'"} +{"answer": "Which channels broadcast both in the morning and at night? Give me the channel names.\nAdditional table information: table: program_share", "question": "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'"} +{"answer": "how many programs are broadcast in each time section of the day?\nAdditional table information: table: program_share", "question": "SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day"} +{"answer": "Count the number of programs broadcast for each time section of a day.\nAdditional table information: table: program_share", "question": "SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day"} +{"answer": "find the number of different programs that are broadcast during night time.\nAdditional table information: table: program_share", "question": "SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night'"} +{"answer": "How many distinct programs are broadcast at 'Night' time?\nAdditional table information: table: program_share", "question": "SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night'"} +{"answer": "Find the names of programs that are never broadcasted in the morning.\nAdditional table information: table: program_share", "question": "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'"} +{"answer": "Which programs are never broadcasted in the morning? Give me the names of the programs.\nAdditional table information: table: program_share", "question": "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'"} +{"answer": "find the program owners that have some programs in both morning and night time.\nAdditional table information: table: program_share", "question": "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'"} +{"answer": "Who are the owners of the programs that broadcast both in the morning and at night?\nAdditional table information: table: program_share", "question": "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'"} +{"answer": "List all program origins in the alphabetical order.\nAdditional table information: table: program_share", "question": "SELECT origin FROM program ORDER BY origin NULLS FIRST"} +{"answer": "What is the list of program origins ordered alphabetically?\nAdditional table information: table: program_share", "question": "SELECT origin FROM program ORDER BY origin NULLS FIRST"} +{"answer": "what is the number of different channel owners?\nAdditional table information: table: program_share", "question": "SELECT COUNT(DISTINCT OWNER) FROM channel"} +{"answer": "Count the number of distinct channel owners.\nAdditional table information: table: program_share", "question": "SELECT COUNT(DISTINCT OWNER) FROM channel"} +{"answer": "find the names of programs whose origin is not in Beijing.\nAdditional table information: table: program_share", "question": "SELECT name FROM program WHERE origin <> 'Beijing'"} +{"answer": "Which programs' origins are not 'Beijing'? Give me the program names.\nAdditional table information: table: program_share", "question": "SELECT name FROM program WHERE origin <> 'Beijing'"} +{"answer": "What are the names of the channels owned by CCTV or HBS?\nAdditional table information: table: program_share", "question": "SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'"} +{"answer": "List the names of all the channels owned by either CCTV or HBS\nAdditional table information: table: program_share", "question": "SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'"} +{"answer": "Find the total rating ratio for each channel owner.\nAdditional table information: table: program_share", "question": "SELECT SUM(Rating_in_percent), OWNER FROM channel GROUP BY OWNER"} +{"answer": "What is the total rating of channel for each channel owner?\nAdditional table information: table: program_share", "question": "SELECT SUM(Rating_in_percent), OWNER FROM channel GROUP BY OWNER"} +{"answer": "Find the name of the program that is broadcast most frequently.\nAdditional table information: table: program_share", "question": "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"} +{"answer": "Which program is broadcast most frequently? Give me the program name.\nAdditional table information: table: program_share", "question": "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"} +{"answer": "How many courses are there in total?\nAdditional table information: table: e_learning", "question": "SELECT COUNT(*) FROM COURSES"} +{"answer": "Find the total number of courses offered.\nAdditional table information: table: e_learning", "question": "SELECT COUNT(*) FROM COURSES"} +{"answer": "What are the descriptions of the courses with name 'database'?\nAdditional table information: table: e_learning", "question": "SELECT course_description FROM COURSES WHERE course_name = 'database'"} +{"answer": "Return the description for the courses named 'database'.\nAdditional table information: table: e_learning", "question": "SELECT course_description FROM COURSES WHERE course_name = 'database'"} +{"answer": "What are the addresses of the course authors or tutors with personal name 'Cathrine'\nAdditional table information: table: e_learning", "question": "SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = 'Cathrine'"} +{"answer": "Return the addresses of the course authors or tutors whose personal name is 'Cathrine'.\nAdditional table information: table: e_learning", "question": "SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = 'Cathrine'"} +{"answer": "List the addresses of all the course authors or tutors.\nAdditional table information: table: e_learning", "question": "SELECT address_line_1 FROM Course_Authors_and_Tutors"} +{"answer": "What is the address of each course author or tutor?\nAdditional table information: table: e_learning", "question": "SELECT address_line_1 FROM Course_Authors_and_Tutors"} +{"answer": "List all the login names and family names of course author and tutors.\nAdditional table information: table: e_learning", "question": "SELECT login_name, family_name FROM Course_Authors_and_Tutors"} +{"answer": "What are the login names and family names of course author and tutors?\nAdditional table information: table: e_learning", "question": "SELECT login_name, family_name FROM Course_Authors_and_Tutors"} +{"answer": "List all the dates of enrollment and completion of students.\nAdditional table information: table: e_learning", "question": "SELECT date_of_enrolment, date_of_completion FROM Student_Course_Enrolment"} +{"answer": "What are all the dates of enrollment and completion in record?\nAdditional table information: table: e_learning", "question": "SELECT date_of_enrolment, date_of_completion FROM Student_Course_Enrolment"} +{"answer": "How many distinct students are enrolled in courses?\nAdditional table information: table: e_learning", "question": "SELECT COUNT(DISTINCT student_id) FROM Student_Course_Enrolment"} +{"answer": "Find the number of distinct students enrolled in courses.\nAdditional table information: table: e_learning", "question": "SELECT COUNT(DISTINCT student_id) FROM Student_Course_Enrolment"} +{"answer": "How many distinct courses are enrolled in by students?\nAdditional table information: table: e_learning", "question": "SELECT COUNT(course_id) FROM Student_Course_Enrolment"} +{"answer": "Find the number of distinct courses that have enrolled students.\nAdditional table information: table: e_learning", "question": "SELECT COUNT(course_id) FROM Student_Course_Enrolment"} +{"answer": "Find the dates of the tests taken with result 'Pass'.\nAdditional table information: table: e_learning", "question": "SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = 'Pass'"} +{"answer": "Which tests have 'Pass' results? Return the dates when the tests were taken.\nAdditional table information: table: e_learning", "question": "SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = 'Pass'"} +{"answer": "How many tests have result 'Fail'?\nAdditional table information: table: e_learning", "question": "SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = 'Fail'"} +{"answer": "Count the number of tests with 'Fail' result.\nAdditional table information: table: e_learning", "question": "SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = 'Fail'"} +{"answer": "What are the login names of the students with family name 'Ward'?\nAdditional table information: table: e_learning", "question": "SELECT login_name FROM Students WHERE family_name = 'Ward'"} +{"answer": "Return the login names of the students whose family name is 'Ward'.\nAdditional table information: table: e_learning", "question": "SELECT login_name FROM Students WHERE family_name = 'Ward'"} +{"answer": "What are the dates of the latest logon of the students with family name 'Jaskolski' or 'Langosh'?\nAdditional table information: table: e_learning", "question": "SELECT date_of_latest_logon FROM Students WHERE family_name = 'Jaskolski' OR family_name = 'Langosh'"} +{"answer": "Find the latest logon date of the students whose family name is 'Jaskolski' or 'Langosh'.\nAdditional table information: table: e_learning", "question": "SELECT date_of_latest_logon FROM Students WHERE family_name = 'Jaskolski' OR family_name = 'Langosh'"} +{"answer": "How many students have personal names that contain the word 'son'?\nAdditional table information: table: e_learning", "question": "SELECT COUNT(*) FROM Students WHERE personal_name LIKE '%son%'"} +{"answer": "Find the number of students who have the word 'son' in their personal names.\nAdditional table information: table: e_learning", "question": "SELECT COUNT(*) FROM Students WHERE personal_name LIKE '%son%'"} +{"answer": "List all the subject names.\nAdditional table information: table: e_learning", "question": "SELECT subject_name FROM SUBJECTS"} +{"answer": "What are the names of all the subjects.\nAdditional table information: table: e_learning", "question": "SELECT subject_name FROM SUBJECTS"} +{"answer": "List all the information about course authors and tutors in alphabetical order of the personal name.\nAdditional table information: table: e_learning", "question": "SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name NULLS FIRST"} +{"answer": "Sort the information about course authors and tutors in alphabetical order of the personal name.\nAdditional table information: table: e_learning", "question": "SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name NULLS FIRST"} +{"answer": "List the personal names and family names of all the students in alphabetical order of family name.\nAdditional table information: table: e_learning", "question": "SELECT personal_name, family_name FROM Students ORDER BY family_name NULLS FIRST"} +{"answer": "What are the personal names and family names of the students? Sort the result in alphabetical order of the family name.\nAdditional table information: table: e_learning", "question": "SELECT personal_name, family_name FROM Students ORDER BY family_name NULLS FIRST"} +{"answer": "List each test result and its count in descending order of count.\nAdditional table information: table: e_learning", "question": "SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC"} +{"answer": "For each distinct test result, find the number of students who got the result.\nAdditional table information: table: e_learning", "question": "SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC"} +{"answer": "Find the login name of the course author that teaches the course with name 'advanced database'.\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "Which course author teaches the 'advanced database' course? Give me his or her login name.\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "Find the addresses of the course authors who teach the course with name 'operating system' or 'data structure'.\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "What are the addresses of the course authors who teach either 'operating system' or 'data structure' course.\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "Find the personal name, family name, and author ID of the course author that teaches the most courses.\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "What are the personal name, family name, and author ID of the course author who teaches the most courses?\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "Find the addresses and author IDs of the course authors that teach at least two courses.\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "Which course authors teach two or more courses? Give me their addresses and author IDs.\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "Find the names of courses taught by the tutor who has personal name 'Julio'.\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "What are the names of the courses taught by the tutor whose personal name is 'Julio'?\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "Find the names and descriptions of courses that belong to the subject named 'Computer Science'.\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "What are the names and descriptions of the all courses under the 'Computer Science' subject?\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "Find the subject ID, subject name, and the corresponding number of available courses for each subject.\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "What are the subject ID, subject name, and the number of available courses for each subject?\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "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.\nAdditional table information: table: e_learning", "question": "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 NULLS FIRST"} +{"answer": "List the subject ID, name of subject and the number of courses available for each subject in ascending order of the course counts.\nAdditional table information: table: e_learning", "question": "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 NULLS FIRST"} +{"answer": "What is the date of enrollment of the course named 'Spanish'?\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "Find the the date of enrollment of the 'Spanish' course.\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "What is the name of the course that has the most student enrollment?\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "Which course is enrolled in by the most students? Give me the course name.\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "What are the names of the courses that have exactly 1 student enrollment?\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "Find the names of the courses that have just one student enrollment.\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "What are the descriptions and names of the courses that have student enrollment bigger than 2?\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "Return the descriptions and names of the courses that have more than two students enrolled in.\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "What is the name of each course and the corresponding number of student enrollment?\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "List the name and the number of enrolled student for each course.\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "What are the enrollment dates of all the tests that have result 'Pass'?\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "Find the enrollment date for all the tests that have 'Pass' result.\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "What are the completion dates of all the tests that have result 'Fail'?\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "Return the completion date for all the tests that have 'Fail' result.\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "List the dates of enrollment and completion of the student with personal name 'Karson'.\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "On what dates did the student whose personal name is 'Karson' enroll in and complete the courses?\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "List the dates of enrollment and completion of the student with family name 'Zieme' and personal name 'Bernie'.\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "On what dates did the student with family name 'Zieme' and personal name 'Bernie' enroll in and complete the courses?\nAdditional table information: table: e_learning", "question": "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'"} +{"answer": "Find the student ID and login name of the student with the most course enrollments\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "What are the student ID and login name of the student who are enrolled in the most courses?\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "Find the student ID and personal name of the student with at least two enrollments.\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "Which student are enrolled in at least two courses? Give me the student ID and personal name.\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "Find the student ID and middle name for all the students with at most two enrollments.\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "What are the student IDs and middle names of the students enrolled in at most two courses?\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "Find the personal names of students not enrolled in any course.\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "Which students not enrolled in any course? Find their personal names.\nAdditional table information: table: e_learning", "question": "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"} +{"answer": "How many students did not have any course enrollment?\nAdditional table information: table: e_learning", "question": "SELECT COUNT(*) FROM Students WHERE NOT student_id IN (SELECT student_id FROM Student_Course_Enrolment)"} +{"answer": "Count the number of students who did not enroll in any course.\nAdditional table information: table: e_learning", "question": "SELECT COUNT(*) FROM Students WHERE NOT student_id IN (SELECT student_id FROM Student_Course_Enrolment)"} +{"answer": "Find the common login name of course authors and students.\nAdditional table information: table: e_learning", "question": "SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students"} +{"answer": "What are the login names used both by some course authors and some students?\nAdditional table information: table: e_learning", "question": "SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students"} +{"answer": "Find the common personal name of course authors and students.\nAdditional table information: table: e_learning", "question": "SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students"} +{"answer": "What are the personal names used both by some course authors and some students?\nAdditional table information: table: e_learning", "question": "SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students"} +{"answer": "Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id.\nAdditional table information: table: insurance_policies", "question": "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)"} +{"answer": "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.\nAdditional table information: table: insurance_policies", "question": "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)"} +{"answer": "Which customer had at least 2 policies but did not file any claims? List the customer details and id.\nAdditional table information: table: insurance_policies", "question": "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"} +{"answer": "Give me the the customer details and id for the customers who had two or more policies but did not file any claims.\nAdditional table information: table: insurance_policies", "question": "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"} +{"answer": "List the method, date and amount of all the payments, in ascending order of date.\nAdditional table information: table: insurance_policies", "question": "SELECT Payment_Method_Code, Date_Payment_Made, Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC NULLS FIRST"} +{"answer": "What are the method, date and amount of each payment? Sort the list in ascending order of date.\nAdditional table information: table: insurance_policies", "question": "SELECT Payment_Method_Code, Date_Payment_Made, Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC NULLS FIRST"} +{"answer": "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.\nAdditional table information: table: insurance_policies", "question": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1"} +{"answer": "Find the settlement amount of the claim with the largest claim amount. Show both the settlement amount and claim amount.\nAdditional table information: table: insurance_policies", "question": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1"} +{"answer": "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.\nAdditional table information: table: insurance_policies", "question": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC NULLS FIRST LIMIT 1"} +{"answer": "Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount.\nAdditional table information: table: insurance_policies", "question": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC NULLS FIRST LIMIT 1"} +{"answer": "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.\nAdditional table information: table: insurance_policies", "question": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Claims WHERE Amount_Claimed > (SELECT AVG(Amount_Claimed) FROM Claims)"} +{"answer": "Give me the claim date, settlement date for all the claims whose claimed amount is larger than the average.\nAdditional table information: table: insurance_policies", "question": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Claims WHERE Amount_Claimed > (SELECT AVG(Amount_Claimed) FROM Claims)"} +{"answer": "Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date.\nAdditional table information: table: insurance_policies", "question": "SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims)"} +{"answer": "Return the claim start date for the claims whose claimed amount is no more than the average\nAdditional table information: table: insurance_policies", "question": "SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims)"} +{"answer": "How many settlements does each claim correspond to? List the claim id and the number of settlements.\nAdditional table information: table: insurance_policies", "question": "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"} +{"answer": "Find the number of settlements each claim corresponds to. Show the number together with the claim id.\nAdditional table information: table: insurance_policies", "question": "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"} +{"answer": "Which claim incurred the most number of settlements? List the claim id, the date the claim was made, and the number.\nAdditional table information: table: insurance_policies", "question": "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"} +{"answer": "Find the claim id and claim date of the claim that incurred the most settlement count. Also tell me the count.\nAdditional table information: table: insurance_policies", "question": "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"} +{"answer": "How many settlements were made on the claim with the most recent claim settlement date? List the number and the claim id.\nAdditional table information: table: insurance_policies", "question": "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"} +{"answer": "Find the claim id and the number of settlements made for the claim with the most recent settlement date.\nAdditional table information: table: insurance_policies", "question": "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"} +{"answer": "Of all the claims, what was the earliest date when any claim was made?\nAdditional table information: table: insurance_policies", "question": "SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC NULLS FIRST LIMIT 1"} +{"answer": "Tell me the the date when the first claim was made.\nAdditional table information: table: insurance_policies", "question": "SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC NULLS FIRST LIMIT 1"} +{"answer": "What is the total amount of settlement made for all the settlements?\nAdditional table information: table: insurance_policies", "question": "SELECT SUM(Amount_Settled) FROM Settlements"} +{"answer": "Compute the total amount of settlement across all the settlements.\nAdditional table information: table: insurance_policies", "question": "SELECT SUM(Amount_Settled) FROM Settlements"} +{"answer": "Who are the customers that had more than 1 policy? List the customer details and id.\nAdditional table information: table: insurance_policies", "question": "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"} +{"answer": "Find the the customer details and id for the customers who had more than one policy.\nAdditional table information: table: insurance_policies", "question": "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"} +{"answer": "What are the claim dates and settlement dates of all the settlements?\nAdditional table information: table: insurance_policies", "question": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Settlements"} +{"answer": "Tell me the the claim date and settlement date for each settlement case.\nAdditional table information: table: insurance_policies", "question": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Settlements"} +{"answer": "What is the most popular payment method?\nAdditional table information: table: insurance_policies", "question": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which payment method is used the most often?\nAdditional table information: table: insurance_policies", "question": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "With which kind of payment method were the least number of payments processed?\nAdditional table information: table: insurance_policies", "question": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "What is the payment method that were used the least often?\nAdditional table information: table: insurance_policies", "question": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "What is the total amount of payment?\nAdditional table information: table: insurance_policies", "question": "SELECT SUM(Amount_Payment) FROM Payments"} +{"answer": "Compute the total amount of payment processed.\nAdditional table information: table: insurance_policies", "question": "SELECT SUM(Amount_Payment) FROM Payments"} +{"answer": "What are all the distinct details of the customers?\nAdditional table information: table: insurance_policies", "question": "SELECT DISTINCT customer_details FROM Customers"} +{"answer": "Return the distinct customer details.\nAdditional table information: table: insurance_policies", "question": "SELECT DISTINCT customer_details FROM Customers"} +{"answer": "Which kind of policy type was chosen by the most customers?\nAdditional table information: table: insurance_policies", "question": "SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the policy type the most customers choose.\nAdditional table information: table: insurance_policies", "question": "SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "How many settlements are there in total?\nAdditional table information: table: insurance_policies", "question": "SELECT COUNT(*) FROM Settlements"} +{"answer": "Count the total number of settlements made.\nAdditional table information: table: insurance_policies", "question": "SELECT COUNT(*) FROM Settlements"} +{"answer": "Which Payments were processed with Visa? List the payment Id, the date and the amount.\nAdditional table information: table: insurance_policies", "question": "SELECT Payment_ID, Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'"} +{"answer": "Give me the payment Id, the date and the amount for all the payments processed with Visa.\nAdditional table information: table: insurance_policies", "question": "SELECT Payment_ID, Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'"} +{"answer": "List the details of the customers who do not have any policies.\nAdditional table information: table: insurance_policies", "question": "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"} +{"answer": "Which customers do not have any policies? Find the details of these customers.\nAdditional table information: table: insurance_policies", "question": "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"} +{"answer": "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.\nAdditional table information: table: insurance_policies", "question": "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"} +{"answer": "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.\nAdditional table information: table: insurance_policies", "question": "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"} +{"answer": "Find the total claimed amount of all the claims.\nAdditional table information: table: insurance_policies", "question": "SELECT SUM(Amount_Claimed) FROM Claims"} +{"answer": "What is total amount claimed summed across all the claims?\nAdditional table information: table: insurance_policies", "question": "SELECT SUM(Amount_Claimed) FROM Claims"} +{"answer": "Which department has the largest number of employees?\nAdditional table information: table: hospital_1", "question": "SELECT name FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) DESC LIMIT 1"} +{"answer": "Find the department with the most employees.\nAdditional table information: table: hospital_1", "question": "SELECT name FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) DESC LIMIT 1"} +{"answer": "What is the employee id of the head whose department has the least number of employees?\nAdditional table information: table: hospital_1", "question": "SELECT head FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) NULLS FIRST LIMIT 1"} +{"answer": "Tell me the employee id of the head of the department with the least employees.\nAdditional table information: table: hospital_1", "question": "SELECT head FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) NULLS FIRST LIMIT 1"} +{"answer": "what is the name and position of the head whose department has least number of employees?\nAdditional table information: table: hospital_1", "question": "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) NULLS FIRST LIMIT 1"} +{"answer": "Find the name and position of the head of the department with the least employees.\nAdditional table information: table: hospital_1", "question": "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) NULLS FIRST LIMIT 1"} +{"answer": "What are names of patients who made an appointment?\nAdditional table information: table: hospital_1", "question": "SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn"} +{"answer": "List the names of patients who have made appointments.\nAdditional table information: table: hospital_1", "question": "SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn"} +{"answer": "what are name and phone number of patients who had more than one appointment?\nAdditional table information: table: hospital_1", "question": "SELECT name, phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING COUNT(*) > 1"} +{"answer": "Which patients made more than one appointment? Tell me the name and phone number of these patients.\nAdditional table information: table: hospital_1", "question": "SELECT name, phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING COUNT(*) > 1"} +{"answer": "Find the id of the appointment with the most recent start date?\nAdditional table information: table: hospital_1", "question": "SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1"} +{"answer": "What is the id of the appointment that started most recently?\nAdditional table information: table: hospital_1", "question": "SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1"} +{"answer": "List the name of physicians who took some appointment.\nAdditional table information: table: hospital_1", "question": "SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID"} +{"answer": "What are the names of all the physicians who took appointments.\nAdditional table information: table: hospital_1", "question": "SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID"} +{"answer": "List the name of physicians who never took any appointment.\nAdditional table information: table: hospital_1", "question": "SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID"} +{"answer": "Which physicians have never taken any appointment? Find their names.\nAdditional table information: table: hospital_1", "question": "SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID"} +{"answer": "Find the names of all physicians and their primary affiliated departments' names.\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "What are the name and primarily affiliated department name of each physician?\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "What is the name of the patient who made the most recent appointment?\nAdditional table information: table: hospital_1", "question": "SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1"} +{"answer": "Find the name of the patient who made the appointment with the most recent start date.\nAdditional table information: table: hospital_1", "question": "SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1"} +{"answer": "How many patients stay in room 112?\nAdditional table information: table: hospital_1", "question": "SELECT COUNT(patient) FROM stay WHERE room = 112"} +{"answer": "Count the number of patients who stayed in room 112.\nAdditional table information: table: hospital_1", "question": "SELECT COUNT(patient) FROM stay WHERE room = 112"} +{"answer": "How many patients' prescriptions are made by physician John Dorian?\nAdditional table information: table: hospital_1", "question": "SELECT COUNT(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'"} +{"answer": "Find the number of patients' prescriptions physician John Dorian made.\nAdditional table information: table: hospital_1", "question": "SELECT COUNT(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'"} +{"answer": "Find the name of medication used on the patient who stays in room 111?\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "What is the name of the medication used for the patient staying in room 111?\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "Find the patient who most recently stayed in room 111.\nAdditional table information: table: hospital_1", "question": "SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1"} +{"answer": "What is the id of the patient who stayed in room 111 most recently?\nAdditional table information: table: hospital_1", "question": "SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1"} +{"answer": "What is the name of the nurse has the most appointments?\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "Find the name of the nurse who has the largest number of appointments.\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "How many patients do each physician take care of? List their names and number of patients they take care of.\nAdditional table information: table: hospital_1", "question": "SELECT T1.name, COUNT(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid"} +{"answer": "Return the name of each physician and the number of patients he or she treats.\nAdditional table information: table: hospital_1", "question": "SELECT T1.name, COUNT(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid"} +{"answer": "Find the name of physicians who are in charge of more than one patient.\nAdditional table information: table: hospital_1", "question": "SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING COUNT(*) > 1"} +{"answer": "Which physicians are in charge of more than one patient? Give me their names.\nAdditional table information: table: hospital_1", "question": "SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING COUNT(*) > 1"} +{"answer": "Find the number of rooms located on each block floor.\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "How many rooms does each block floor have?\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "Find the number of rooms for different block code?\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "How many rooms are located for each block code?\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "What are the unique block codes that have available rooms?\nAdditional table information: table: hospital_1", "question": "SELECT DISTINCT blockcode FROM room WHERE unavailable = 0"} +{"answer": "Tell me the distinct block codes where some rooms are available.\nAdditional table information: table: hospital_1", "question": "SELECT DISTINCT blockcode FROM room WHERE unavailable = 0"} +{"answer": "How many different types of rooms are there?\nAdditional table information: table: hospital_1", "question": "SELECT COUNT(DISTINCT roomtype) FROM room"} +{"answer": "Find the number of distinct room types available.\nAdditional table information: table: hospital_1", "question": "SELECT COUNT(DISTINCT roomtype) FROM room"} +{"answer": "What is the names of the physicians who prescribe medication Thesisin?\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "List the names of all the physicians who prescribe Thesisin as medication.\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Find the name and position of physicians who prescribe some medication whose brand is X?\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Which physicians prescribe a medication of brand X? Tell me the name and position of those physicians.\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Find the number of medications prescribed for each brand.\nAdditional table information: table: hospital_1", "question": "SELECT COUNT(*), T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand"} +{"answer": "How many medications are prescribed for each brand?\nAdditional table information: table: hospital_1", "question": "SELECT COUNT(*), T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand"} +{"answer": "Find the name of physicians whose position title contains the word 'senior'.\nAdditional table information: table: hospital_1", "question": "SELECT name FROM physician WHERE POSITION LIKE '%senior%'"} +{"answer": "What are the names of the physicians who have 'senior' in their titles.\nAdditional table information: table: hospital_1", "question": "SELECT name FROM physician WHERE POSITION LIKE '%senior%'"} +{"answer": "Find the patient who has the most recent undergoing treatment?\nAdditional table information: table: hospital_1", "question": "SELECT patient FROM undergoes ORDER BY dateundergoes NULLS FIRST LIMIT 1"} +{"answer": "Which patient is undergoing the most recent treatment?\nAdditional table information: table: hospital_1", "question": "SELECT patient FROM undergoes ORDER BY dateundergoes NULLS FIRST LIMIT 1"} +{"answer": "Find the names of all patients who have an undergoing treatment and are staying in room 111.\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "What are the names of patients who are staying in room 111 and have an undergoing treatment?\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "List the names of all distinct nurses ordered by alphabetical order?\nAdditional table information: table: hospital_1", "question": "SELECT DISTINCT name FROM nurse ORDER BY name NULLS FIRST"} +{"answer": "What is the alphabetically ordered list of all the distinct names of nurses?\nAdditional table information: table: hospital_1", "question": "SELECT DISTINCT name FROM nurse ORDER BY name NULLS FIRST"} +{"answer": "Find the names of nurses who are nursing an undergoing treatment.\nAdditional table information: table: hospital_1", "question": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID"} +{"answer": "Which nurses are in charge of patients undergoing treatments?\nAdditional table information: table: hospital_1", "question": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID"} +{"answer": "List the names of all distinct medications, ordered in an alphabetical order.\nAdditional table information: table: hospital_1", "question": "SELECT DISTINCT name FROM medication ORDER BY name NULLS FIRST"} +{"answer": "What is the alphabetically ordered list of all distinct medications?\nAdditional table information: table: hospital_1", "question": "SELECT DISTINCT name FROM medication ORDER BY name NULLS FIRST"} +{"answer": "What are the names of the physician who prescribed the highest dose?\nAdditional table information: table: hospital_1", "question": "SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1"} +{"answer": "Find the physician who prescribed the highest dose. What is his or her name?\nAdditional table information: table: hospital_1", "question": "SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1"} +{"answer": "List the physicians' employee ids together with their primary affiliation departments' ids.\nAdditional table information: table: hospital_1", "question": "SELECT physician, department FROM affiliated_with WHERE primaryaffiliation = 1"} +{"answer": "What are each physician's employee id and department id primarily affiliated.\nAdditional table information: table: hospital_1", "question": "SELECT physician, department FROM affiliated_with WHERE primaryaffiliation = 1"} +{"answer": "List the names of departments where some physicians are primarily affiliated with.\nAdditional table information: table: hospital_1", "question": "SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1"} +{"answer": "What are the names of departments that have primarily affiliated physicians.\nAdditional table information: table: hospital_1", "question": "SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1"} +{"answer": "What nurses are on call with block floor 1 and block code 1? Tell me their names.\nAdditional table information: table: hospital_1", "question": "SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1"} +{"answer": "Find the ids of the nurses who are on call in block floor 1 and block code 1.\nAdditional table information: table: hospital_1", "question": "SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1"} +{"answer": "What are the highest cost, lowest cost and average cost of procedures?\nAdditional table information: table: hospital_1", "question": "SELECT MAX(cost), MIN(cost), AVG(cost) FROM procedures"} +{"answer": "Tell me the highest, lowest, and average cost of procedures.\nAdditional table information: table: hospital_1", "question": "SELECT MAX(cost), MIN(cost), AVG(cost) FROM procedures"} +{"answer": "List the name and cost of all procedures sorted by the cost from the highest to the lowest.\nAdditional table information: table: hospital_1", "question": "SELECT name, cost FROM procedures ORDER BY cost DESC"} +{"answer": "Sort the list of names and costs of all procedures in the descending order of cost.\nAdditional table information: table: hospital_1", "question": "SELECT name, cost FROM procedures ORDER BY cost DESC"} +{"answer": "Find the three most expensive procedures.\nAdditional table information: table: hospital_1", "question": "SELECT name FROM procedures ORDER BY cost NULLS FIRST LIMIT 3"} +{"answer": "What are the three most costly procedures?\nAdditional table information: table: hospital_1", "question": "SELECT name FROM procedures ORDER BY cost NULLS FIRST LIMIT 3"} +{"answer": "Find the physicians who are trained in a procedure that costs more than 5000.\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "Which physicians are trained in procedures that are more expensive than 5000?\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "Find the physician who was trained in the most expensive procedure?\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "Which physician was trained in the procedure that costs the most.\nAdditional table information: table: hospital_1", "question": "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"} +{"answer": "What is the average cost of procedures that physician John Wen was trained in?\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Compute the mean price of procedures physician John Wen was trained in.\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Find the names of procedures which physician John Wen was trained in.\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "What are the names of procedures physician John Wen was trained in?\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Find all procedures which cost more than 1000 or which physician John Wen was trained in.\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "What are the procedures that cost more than 1000 or are specialized in by physician John Wen?\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Find the names of all procedures which cost more than 1000 but which physician John Wen was not trained in?\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Among the procedures that cost more than 1000, which were not specialized in by physician John Wen?\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in.\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "What procedures cost less than 5000 and have John Wen as a trained physician?\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Which physicians are affiliated with both Surgery and Psychiatry departments? Tell me their names.\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Find the name of physicians who are affiliated with Surgery or Psychiatry department.\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Which physicians are affiliated with either Surgery or Psychiatry department? Give me their names.\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Find the names of patients who are not using the medication of Procrastin-X.\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "What are the names of patients who are not taking the medication of Procrastin-X.\nAdditional table information: table: hospital_1", "question": "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'"} +{"answer": "Find the number of patients who are not using the medication of Procrastin-X.\nAdditional table information: table: hospital_1", "question": "SELECT COUNT(*) FROM patient WHERE NOT SSN IN (SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X')"} +{"answer": "How many patients are not using Procrastin-X as medication?\nAdditional table information: table: hospital_1", "question": "SELECT COUNT(*) FROM patient WHERE NOT SSN IN (SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X')"} +{"answer": "How many appointments are there?\nAdditional table information: table: hospital_1", "question": "SELECT COUNT(*) FROM appointment"} +{"answer": "Count how many appointments have been made in total.\nAdditional table information: table: hospital_1", "question": "SELECT COUNT(*) FROM appointment"} +{"answer": "Find the names of nurses who are on call.\nAdditional table information: table: hospital_1", "question": "SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse"} +{"answer": "What are the distinct names of nurses on call?\nAdditional table information: table: hospital_1", "question": "SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse"} +{"answer": "How many ships are there?\nAdditional table information: table: ship_mission", "question": "SELECT COUNT(*) FROM ship"} +{"answer": "What is the number of ships?\nAdditional table information: table: ship_mission", "question": "SELECT COUNT(*) FROM ship"} +{"answer": "List the name of ships in ascending order of tonnage.\nAdditional table information: table: ship_mission", "question": "SELECT Name FROM ship ORDER BY Tonnage ASC NULLS FIRST"} +{"answer": "what are the names of the ships ordered by ascending tonnage?\nAdditional table information: table: ship_mission", "question": "SELECT Name FROM ship ORDER BY Tonnage ASC NULLS FIRST"} +{"answer": "What are the type and nationality of ships?\nAdditional table information: table: ship_mission", "question": "SELECT TYPE, Nationality FROM ship"} +{"answer": "What are the types and nationalities of every ship?\nAdditional table information: table: ship_mission", "question": "SELECT TYPE, Nationality FROM ship"} +{"answer": "List the name of ships whose nationality is not 'United States'.\nAdditional table information: table: ship_mission", "question": "SELECT Name FROM ship WHERE Nationality <> 'United States'"} +{"answer": "What are the names of the ships that are not from the United States?\nAdditional table information: table: ship_mission", "question": "SELECT Name FROM ship WHERE Nationality <> 'United States'"} +{"answer": "Show the name of ships whose nationality is either United States or United Kingdom.\nAdditional table information: table: ship_mission", "question": "SELECT Name FROM ship WHERE Nationality = 'United States' OR Nationality = 'United Kingdom'"} +{"answer": "What are the names of the ships that are from either the US or the UK?\nAdditional table information: table: ship_mission", "question": "SELECT Name FROM ship WHERE Nationality = 'United States' OR Nationality = 'United Kingdom'"} +{"answer": "What is the name of the ship with the largest tonnage?\nAdditional table information: table: ship_mission", "question": "SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1"} +{"answer": "What is the ship with the largest amount of tonnage called?\nAdditional table information: table: ship_mission", "question": "SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1"} +{"answer": "Show different types of ships and the number of ships of each type.\nAdditional table information: table: ship_mission", "question": "SELECT TYPE, COUNT(*) FROM ship GROUP BY TYPE"} +{"answer": "For each type, how many ships are there?\nAdditional table information: table: ship_mission", "question": "SELECT TYPE, COUNT(*) FROM ship GROUP BY TYPE"} +{"answer": "Please show the most common type of ships.\nAdditional table information: table: ship_mission", "question": "SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the most common type of ships?\nAdditional table information: table: ship_mission", "question": "SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the nations that have more than two ships.\nAdditional table information: table: ship_mission", "question": "SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2"} +{"answer": "What are the nations that have more than two ships?\nAdditional table information: table: ship_mission", "question": "SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2"} +{"answer": "Show different types of ships and the average tonnage of ships of each type.\nAdditional table information: table: ship_mission", "question": "SELECT TYPE, AVG(Tonnage) FROM ship GROUP BY TYPE"} +{"answer": "For each type, what is the average tonnage?\nAdditional table information: table: ship_mission", "question": "SELECT TYPE, AVG(Tonnage) FROM ship GROUP BY TYPE"} +{"answer": "Show codes and fates of missions, and names of ships involved.\nAdditional table information: table: ship_mission", "question": "SELECT T1.Code, T1.Fate, T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID"} +{"answer": "What are the mission codes, fates, and names of the ships involved?\nAdditional table information: table: ship_mission", "question": "SELECT T1.Code, T1.Fate, T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID"} +{"answer": "Show names of ships involved in a mission launched after 1928.\nAdditional table information: table: ship_mission", "question": "SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928"} +{"answer": "What are the names of ships that were involved in a mission launched after 1928?\nAdditional table information: table: ship_mission", "question": "SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928"} +{"answer": "Show the distinct fate of missions that involve ships with nationality 'United States'\nAdditional table information: table: ship_mission", "question": "SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = 'United States'"} +{"answer": "What are the different fates of the mission that involved ships from the United States?\nAdditional table information: table: ship_mission", "question": "SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = 'United States'"} +{"answer": "List the name of ships that are not involved in any mission\nAdditional table information: table: ship_mission", "question": "SELECT Name FROM ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM mission)"} +{"answer": "What are the names of the ships that are not involved in any missions?\nAdditional table information: table: ship_mission", "question": "SELECT Name FROM ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM mission)"} +{"answer": "Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000.\nAdditional table information: table: ship_mission", "question": "SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000"} +{"answer": "What are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000?\nAdditional table information: table: ship_mission", "question": "SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000"} +{"answer": "Find the number of students in total.\nAdditional table information: table: student_1", "question": "SELECT COUNT(*) FROM list"} +{"answer": "How many students are there?\nAdditional table information: table: student_1", "question": "SELECT COUNT(*) FROM list"} +{"answer": "Find the last names of students studying in room 111.\nAdditional table information: table: student_1", "question": "SELECT lastname FROM list WHERE classroom = 111"} +{"answer": "What are the last names of students in room 111?\nAdditional table information: table: student_1", "question": "SELECT lastname FROM list WHERE classroom = 111"} +{"answer": "Find the first names of students studying in room 108.\nAdditional table information: table: student_1", "question": "SELECT firstname FROM list WHERE classroom = 108"} +{"answer": "What are the first names of students in room 108?\nAdditional table information: table: student_1", "question": "SELECT firstname FROM list WHERE classroom = 108"} +{"answer": "What are the first names of students studying in room 107?\nAdditional table information: table: student_1", "question": "SELECT DISTINCT firstname FROM list WHERE classroom = 107"} +{"answer": "List the first names of all the students in room 107.\nAdditional table information: table: student_1", "question": "SELECT DISTINCT firstname FROM list WHERE classroom = 107"} +{"answer": "For each classroom report the grade that is taught in it. Report just the classroom number and the grade number.\nAdditional table information: table: student_1", "question": "SELECT DISTINCT classroom, grade FROM list"} +{"answer": "What are the grade number and classroom number of each class in the list?\nAdditional table information: table: student_1", "question": "SELECT DISTINCT classroom, grade FROM list"} +{"answer": "Which grade is studying in classroom 103?\nAdditional table information: table: student_1", "question": "SELECT DISTINCT grade FROM list WHERE classroom = 103"} +{"answer": "Find the grade taught in classroom 103.\nAdditional table information: table: student_1", "question": "SELECT DISTINCT grade FROM list WHERE classroom = 103"} +{"answer": "Find the grade studying in room 105.\nAdditional table information: table: student_1", "question": "SELECT DISTINCT grade FROM list WHERE classroom = 105"} +{"answer": "Which grade is studying in room 105?\nAdditional table information: table: student_1", "question": "SELECT DISTINCT grade FROM list WHERE classroom = 105"} +{"answer": "Which classrooms are used by grade 4?\nAdditional table information: table: student_1", "question": "SELECT DISTINCT classroom FROM list WHERE grade = 4"} +{"answer": "Find the classrooms in which grade 4 is studying.\nAdditional table information: table: student_1", "question": "SELECT DISTINCT classroom FROM list WHERE grade = 4"} +{"answer": "Which classrooms are used by grade 5?\nAdditional table information: table: student_1", "question": "SELECT DISTINCT classroom FROM list WHERE grade = 5"} +{"answer": "Show me the classrooms grade 5 is using.\nAdditional table information: table: student_1", "question": "SELECT DISTINCT classroom FROM list WHERE grade = 5"} +{"answer": "Find the last names of the teachers that teach fifth grade.\nAdditional table information: table: student_1", "question": "SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5"} +{"answer": "what are the last names of the teachers who teach grade 5?\nAdditional table information: table: student_1", "question": "SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5"} +{"answer": "Find the first names of the teachers that teach first grade.\nAdditional table information: table: student_1", "question": "SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1"} +{"answer": "What are the first names of the teachers who teach grade 1?\nAdditional table information: table: student_1", "question": "SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1"} +{"answer": "Find the first names of all the teachers that teach in classroom 110.\nAdditional table information: table: student_1", "question": "SELECT firstname FROM teachers WHERE classroom = 110"} +{"answer": "Which teachers teach in classroom 110? Give me their first names.\nAdditional table information: table: student_1", "question": "SELECT firstname FROM teachers WHERE classroom = 110"} +{"answer": "Find the last names of teachers teaching in classroom 109.\nAdditional table information: table: student_1", "question": "SELECT lastname FROM teachers WHERE classroom = 109"} +{"answer": "Which teachers teach in classroom 109? Give me their last names.\nAdditional table information: table: student_1", "question": "SELECT lastname FROM teachers WHERE classroom = 109"} +{"answer": "Report the first name and last name of all the teachers.\nAdditional table information: table: student_1", "question": "SELECT DISTINCT firstname, lastname FROM teachers"} +{"answer": "What are the first name and last name of all the teachers?\nAdditional table information: table: student_1", "question": "SELECT DISTINCT firstname, lastname FROM teachers"} +{"answer": "Report the first name and last name of all the students.\nAdditional table information: table: student_1", "question": "SELECT DISTINCT firstname, lastname FROM list"} +{"answer": "Show each student's first name and last name.\nAdditional table information: table: student_1", "question": "SELECT DISTINCT firstname, lastname FROM list"} +{"answer": "Find all students taught by OTHA MOYER. Output the first and last names of the students.\nAdditional table information: table: student_1", "question": "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'"} +{"answer": "Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students.\nAdditional table information: table: student_1", "question": "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'"} +{"answer": "Find all students taught by MARROTTE KIRK. Output first and last names of students.\nAdditional table information: table: student_1", "question": "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'"} +{"answer": "Which are the first and last names of the students taught by MARROTTE KIRK?\nAdditional table information: table: student_1", "question": "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'"} +{"answer": "Find the first and last name of all the teachers that teach EVELINA BROMLEY.\nAdditional table information: table: student_1", "question": "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'"} +{"answer": "Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name of the teachers.\nAdditional table information: table: student_1", "question": "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'"} +{"answer": "Find the last names of all the teachers that teach GELL TAMI.\nAdditional table information: table: student_1", "question": "SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'GELL' AND T1.lastname = 'TAMI'"} +{"answer": "What are the last names of the teachers who teach the student called GELL TAMI?\nAdditional table information: table: student_1", "question": "SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'GELL' AND T1.lastname = 'TAMI'"} +{"answer": "How many students does LORIA ONDERSMA teaches?\nAdditional table information: table: student_1", "question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'LORIA' AND T2.lastname = 'ONDERSMA'"} +{"answer": "Count the number of students the teacher LORIA ONDERSMA teaches.\nAdditional table information: table: student_1", "question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'LORIA' AND T2.lastname = 'ONDERSMA'"} +{"answer": "How many students does KAWA GORDON teaches?\nAdditional table information: table: student_1", "question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'KAWA' AND T2.lastname = 'GORDON'"} +{"answer": "Find the number of students taught by the teacher KAWA GORDON.\nAdditional table information: table: student_1", "question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'KAWA' AND T2.lastname = 'GORDON'"} +{"answer": "Find the number of students taught by TARRING LEIA.\nAdditional table information: table: student_1", "question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'TARRING' AND T2.lastname = 'LEIA'"} +{"answer": "How many students are taught by teacher TARRING LEIA?\nAdditional table information: table: student_1", "question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'TARRING' AND T2.lastname = 'LEIA'"} +{"answer": "How many teachers does the student named CHRISSY NABOZNY have?\nAdditional table information: table: student_1", "question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'CHRISSY' AND T1.lastname = 'NABOZNY'"} +{"answer": "Find the number of teachers who teach the student called CHRISSY NABOZNY.\nAdditional table information: table: student_1", "question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'CHRISSY' AND T1.lastname = 'NABOZNY'"} +{"answer": "How many teachers does the student named MADLOCK RAY have?\nAdditional table information: table: student_1", "question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'MADLOCK' AND T1.lastname = 'RAY'"} +{"answer": "Find the number of teachers who teach the student called MADLOCK RAY.\nAdditional table information: table: student_1", "question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'MADLOCK' AND T1.lastname = 'RAY'"} +{"answer": "Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names.\nAdditional table information: table: student_1", "question": "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'"} +{"answer": "What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER?\nAdditional table information: table: student_1", "question": "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'"} +{"answer": "Find the last names of the students in third grade that are not taught by COVIN JEROME.\nAdditional table information: table: student_1", "question": "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'"} +{"answer": "Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students.\nAdditional table information: table: student_1", "question": "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'"} +{"answer": "For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade.\nAdditional table information: table: student_1", "question": "SELECT grade, COUNT(DISTINCT classroom), COUNT(*) FROM list GROUP BY grade"} +{"answer": "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.\nAdditional table information: table: student_1", "question": "SELECT grade, COUNT(DISTINCT classroom), COUNT(*) FROM list GROUP BY grade"} +{"answer": "For each classroom, report the classroom number and the number of grades using it.\nAdditional table information: table: student_1", "question": "SELECT classroom, COUNT(DISTINCT grade) FROM list GROUP BY classroom"} +{"answer": "For each classroom, show the classroom number and count the number of distinct grades that use the room.\nAdditional table information: table: student_1", "question": "SELECT classroom, COUNT(DISTINCT grade) FROM list GROUP BY classroom"} +{"answer": "Which classroom has the most students?\nAdditional table information: table: student_1", "question": "SELECT classroom FROM list GROUP BY classroom ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the classroom that the most students use.\nAdditional table information: table: student_1", "question": "SELECT classroom FROM list GROUP BY classroom ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Report the number of students in each classroom.\nAdditional table information: table: student_1", "question": "SELECT classroom, COUNT(*) FROM list GROUP BY classroom"} +{"answer": "For each classroom, show the classroom number and find how many students are using it.\nAdditional table information: table: student_1", "question": "SELECT classroom, COUNT(*) FROM list GROUP BY classroom"} +{"answer": "For each grade 0 classroom, report the total number of students.\nAdditional table information: table: student_1", "question": "SELECT classroom, COUNT(*) FROM list WHERE grade = '0' GROUP BY classroom"} +{"answer": "For each grade 0 classroom, return the classroom number and the count of students.\nAdditional table information: table: student_1", "question": "SELECT classroom, COUNT(*) FROM list WHERE grade = '0' GROUP BY classroom"} +{"answer": "Report the total number of students for each fourth-grade classroom.\nAdditional table information: table: student_1", "question": "SELECT classroom, COUNT(*) FROM list WHERE grade = '4' GROUP BY classroom"} +{"answer": "For each fourth-grade classroom, show the classroom number and the total number of students using it.\nAdditional table information: table: student_1", "question": "SELECT classroom, COUNT(*) FROM list WHERE grade = '4' GROUP BY classroom"} +{"answer": "Find the name of the teacher who teaches the largest number of students.\nAdditional table information: table: student_1", "question": "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"} +{"answer": "Which teacher teaches the most students? Give me the first name and last name of the teacher.\nAdditional table information: table: student_1", "question": "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"} +{"answer": "Find the number of students in one classroom.\nAdditional table information: table: student_1", "question": "SELECT COUNT(*), classroom FROM list GROUP BY classroom"} +{"answer": "How many students does one classroom have?\nAdditional table information: table: student_1", "question": "SELECT COUNT(*), classroom FROM list GROUP BY classroom"} +{"answer": "How many companies are headquartered in the US?\nAdditional table information: table: company_employee", "question": "SELECT COUNT(*) FROM company WHERE Headquarters = 'USA'"} +{"answer": "List the names of companies by ascending number of sales.\nAdditional table information: table: company_employee", "question": "SELECT Name FROM company ORDER BY Sales_in_Billion ASC NULLS FIRST"} +{"answer": "What are the headquarters and industries of all companies?\nAdditional table information: table: company_employee", "question": "SELECT Headquarters, Industry FROM company"} +{"answer": "Show the names of companies in the banking or retailing industry?\nAdditional table information: table: company_employee", "question": "SELECT Name FROM company WHERE Industry = 'Banking' OR Industry = 'Retailing'"} +{"answer": "What is the maximum and minimum market value of companies?\nAdditional table information: table: company_employee", "question": "SELECT MAX(Market_Value_in_Billion), MIN(Market_Value_in_Billion) FROM company"} +{"answer": "What is the headquarter of the company with the largest sales?\nAdditional table information: table: company_employee", "question": "SELECT Headquarters FROM company ORDER BY Sales_in_Billion DESC LIMIT 1"} +{"answer": "Show the different headquarters and number of companies at each headquarter.\nAdditional table information: table: company_employee", "question": "SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters"} +{"answer": "Show the most common headquarter for companies.\nAdditional table information: table: company_employee", "question": "SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the headquarters that have at least two companies.\nAdditional table information: table: company_employee", "question": "SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2"} +{"answer": "Show the headquarters that have both companies in banking industry and companies in oil and gas industry.\nAdditional table information: table: company_employee", "question": "SELECT Headquarters FROM company WHERE Industry = 'Banking' INTERSECT SELECT Headquarters FROM company WHERE Industry = 'Oil and gas'"} +{"answer": "Show the names of companies and of employees.\nAdditional table information: table: company_employee", "question": "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"} +{"answer": "Show names of companies and that of employees in descending order of number of years working for that employee.\nAdditional table information: table: company_employee", "question": "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 NULLS FIRST"} +{"answer": "Show the names of employees that work for companies with sales bigger than 200.\nAdditional table information: table: company_employee", "question": "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"} +{"answer": "Show the names of companies and the number of employees they have\nAdditional table information: table: company_employee", "question": "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"} +{"answer": "List the names of people that are not employed by any company\nAdditional table information: table: company_employee", "question": "SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM employment)"} +{"answer": "list the names of the companies with more than 200 sales in the descending order of sales and profits.\nAdditional table information: table: company_employee", "question": "SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion NULLS FIRST, Profits_in_Billion DESC"} +{"answer": "How many film are there?\nAdditional table information: table: film_rank", "question": "SELECT COUNT(*) FROM film"} +{"answer": "Count the number of films.\nAdditional table information: table: film_rank", "question": "SELECT COUNT(*) FROM film"} +{"answer": "List the distinct director of all films.\nAdditional table information: table: film_rank", "question": "SELECT DISTINCT Director FROM film"} +{"answer": "What are the different film Directors?\nAdditional table information: table: film_rank", "question": "SELECT DISTINCT Director FROM film"} +{"answer": "What is the average ticket sales gross in dollars of films?\nAdditional table information: table: film_rank", "question": "SELECT AVG(Gross_in_dollar) FROM film"} +{"answer": "Return the average gross sales in dollars across all films.\nAdditional table information: table: film_rank", "question": "SELECT AVG(Gross_in_dollar) FROM film"} +{"answer": "What are the low and high estimates of film markets?\nAdditional table information: table: film_rank", "question": "SELECT Low_Estimate, High_Estimate FROM film_market_estimation"} +{"answer": "Return the low and high estimates for all film markets.\nAdditional table information: table: film_rank", "question": "SELECT Low_Estimate, High_Estimate FROM film_market_estimation"} +{"answer": "What are the types of film market estimations in year 1995?\nAdditional table information: table: film_rank", "question": "SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995"} +{"answer": "Return the types of film market estimations in 1995.\nAdditional table information: table: film_rank", "question": "SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995"} +{"answer": "What are the maximum and minimum number of cities in all markets.\nAdditional table information: table: film_rank", "question": "SELECT MAX(Number_cities), MIN(Number_cities) FROM market"} +{"answer": "Return the maximum and minimum number of cities across all markets.\nAdditional table information: table: film_rank", "question": "SELECT MAX(Number_cities), MIN(Number_cities) FROM market"} +{"answer": "How many markets have number of cities smaller than 300?\nAdditional table information: table: film_rank", "question": "SELECT COUNT(*) FROM market WHERE Number_cities < 300"} +{"answer": "Count the number of markets that have a number of cities lower than 300.\nAdditional table information: table: film_rank", "question": "SELECT COUNT(*) FROM market WHERE Number_cities < 300"} +{"answer": "List all countries of markets in ascending alphabetical order.\nAdditional table information: table: film_rank", "question": "SELECT Country FROM market ORDER BY Country ASC NULLS FIRST"} +{"answer": "What are the countries for each market, ordered alphabetically?\nAdditional table information: table: film_rank", "question": "SELECT Country FROM market ORDER BY Country ASC NULLS FIRST"} +{"answer": "List all countries of markets in descending order of number of cities.\nAdditional table information: table: film_rank", "question": "SELECT Country FROM market ORDER BY Number_cities DESC"} +{"answer": "What are the countries for each market ordered by decreasing number of cities?\nAdditional table information: table: film_rank", "question": "SELECT Country FROM market ORDER BY Number_cities DESC"} +{"answer": "Please show the titles of films and the types of market estimations.\nAdditional table information: table: film_rank", "question": "SELECT T1.Title, T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID"} +{"answer": "What are the titles of films and corresponding types of market estimations?\nAdditional table information: table: film_rank", "question": "SELECT T1.Title, T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID"} +{"answer": "Show the distinct director of films with market estimation in the year of 1995.\nAdditional table information: table: film_rank", "question": "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"} +{"answer": "Who are the different directors of films which had market estimation in 1995?\nAdditional table information: table: film_rank", "question": "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"} +{"answer": "What is the average number of cities of markets with low film market estimate bigger than 10000?\nAdditional table information: table: film_rank", "question": "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"} +{"answer": "Give the average number of cities within markets that had a low market estimation larger than 10000?\nAdditional table information: table: film_rank", "question": "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"} +{"answer": "Please list the countries and years of film market estimations.\nAdditional table information: table: film_rank", "question": "SELECT T2.Country, T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID"} +{"answer": "What are the countries of markets and their corresponding years of market estimation?\nAdditional table information: table: film_rank", "question": "SELECT T2.Country, T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID"} +{"answer": "Please list the years of film market estimations when the market is in country 'Japan' in descending order.\nAdditional table information: table: film_rank", "question": "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"} +{"answer": "What are the years of film market estimation for the market of Japan, ordered by year descending?\nAdditional table information: table: film_rank", "question": "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"} +{"answer": "List the studios of each film and the number of films produced by that studio.\nAdditional table information: table: film_rank", "question": "SELECT Studio, COUNT(*) FROM film GROUP BY Studio"} +{"answer": "How films are produced by each studio?\nAdditional table information: table: film_rank", "question": "SELECT Studio, COUNT(*) FROM film GROUP BY Studio"} +{"answer": "List the name of film studio that have the most number of films.\nAdditional table information: table: film_rank", "question": "SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the name of teh studio that created the most films?\nAdditional table information: table: film_rank", "question": "SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the names of studios that have at least two films.\nAdditional table information: table: film_rank", "question": "SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2"} +{"answer": "What are the names of studios that have made two or more films?\nAdditional table information: table: film_rank", "question": "SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2"} +{"answer": "List the title of films that do not have any market estimation.\nAdditional table information: table: film_rank", "question": "SELECT Title FROM film WHERE NOT Film_ID IN (SELECT Film_ID FROM film_market_estimation)"} +{"answer": "What are the titles of films that do not have a film market estimation?\nAdditional table information: table: film_rank", "question": "SELECT Title FROM film WHERE NOT Film_ID IN (SELECT Film_ID FROM film_market_estimation)"} +{"answer": "Show the studios that have produced films with director 'Nicholas Meyer' and 'Walter Hill'.\nAdditional table information: table: film_rank", "question": "SELECT Studio FROM film WHERE Director = 'Nicholas Meyer' INTERSECT SELECT Studio FROM film WHERE Director = 'Walter Hill'"} +{"answer": "What are the names of studios that have produced films with both Nicholas Meyer and Walter Hill?\nAdditional table information: table: film_rank", "question": "SELECT Studio FROM film WHERE Director = 'Nicholas Meyer' INTERSECT SELECT Studio FROM film WHERE Director = 'Walter Hill'"} +{"answer": "Find the titles and studios of the films that are produced by some film studios that contained the word 'Universal'.\nAdditional table information: table: film_rank", "question": "SELECT title, Studio FROM film WHERE Studio LIKE '%Universal%'"} +{"answer": "What are the titles and studios of films that have been produced by a studio whose name contains 'Universal'?\nAdditional table information: table: film_rank", "question": "SELECT title, Studio FROM film WHERE Studio LIKE '%Universal%'"} +{"answer": "Show the studios that have not produced films with director 'Walter Hill'.\nAdditional table information: table: film_rank", "question": "SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = 'Walter Hill'"} +{"answer": "Which studios have never worked with the director Walter Hill?\nAdditional table information: table: film_rank", "question": "SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = 'Walter Hill'"} +{"answer": "List the studios which average gross is above 4500000.\nAdditional table information: table: film_rank", "question": "SELECT Studio FROM film GROUP BY Studio HAVING AVG(Gross_in_dollar) >= 4500000"} +{"answer": "Which studios have an average gross of over 4500000?\nAdditional table information: table: film_rank", "question": "SELECT Studio FROM film GROUP BY Studio HAVING AVG(Gross_in_dollar) >= 4500000"} +{"answer": "What is the title of the film that has the highest high market estimation.\nAdditional table information: table: film_rank", "question": "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"} +{"answer": "Return the title of the film with the highest high estimate?\nAdditional table information: table: film_rank", "question": "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"} +{"answer": "What are the titles and directors of the films were never presented in China?\nAdditional table information: table: film_rank", "question": "SELECT title, director FROM film WHERE NOT film_id IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')"} +{"answer": "Return the titles and directors of films that were never in the market of China.\nAdditional table information: table: film_rank", "question": "SELECT title, director FROM film WHERE NOT film_id IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')"} +{"answer": "How many calendar items do we have?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT COUNT(*) FROM Ref_calendar"} +{"answer": "Count the number of all the calendar items.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT COUNT(*) FROM Ref_calendar"} +{"answer": "Show all calendar dates and day Numbers.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT calendar_date, day_Number FROM Ref_calendar"} +{"answer": "What are all the calendar dates and day Numbers?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT calendar_date, day_Number FROM Ref_calendar"} +{"answer": "Show the number of document types.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT COUNT(*) FROM Ref_document_types"} +{"answer": "How many document types are there?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT COUNT(*) FROM Ref_document_types"} +{"answer": "List all document type codes and document type names.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT document_type_code, document_type_name FROM Ref_document_types"} +{"answer": "What are all the document type codes and document type names?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT document_type_code, document_type_name FROM Ref_document_types"} +{"answer": "What is the name and description for document type code RV?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT document_type_name, document_type_description FROM Ref_document_types WHERE document_type_code = 'RV'"} +{"answer": "Give me the name and description of the document type code RV.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT document_type_name, document_type_description FROM Ref_document_types WHERE document_type_code = 'RV'"} +{"answer": "What is the document type code for document type 'Paper'?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT document_type_code FROM Ref_document_types WHERE document_type_name = 'Paper'"} +{"answer": "Find the code of the document type 'Paper'.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT document_type_code FROM Ref_document_types WHERE document_type_name = 'Paper'"} +{"answer": "Show the number of documents with document type code CV or BK.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT COUNT(*) FROM All_documents WHERE document_type_code = 'CV' OR document_type_code = 'BK'"} +{"answer": "How many documents have document type code CV or BK?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT COUNT(*) FROM All_documents WHERE document_type_code = 'CV' OR document_type_code = 'BK'"} +{"answer": "What is the date when the document 'Marry CV' was stored?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT date_stored FROM All_documents WHERE Document_name = 'Marry CV'"} +{"answer": "When was the document named 'Marry CV' stored? Give me the date.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT date_stored FROM All_documents WHERE Document_name = 'Marry CV'"} +{"answer": "What is the day Number and date of all the documents?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT T2.day_Number, T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date"} +{"answer": "Return the day Number and stored date for all the documents.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT T2.day_Number, T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date"} +{"answer": "What is the document type name for the document with name 'How to read a book'?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "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'"} +{"answer": "Find the document type name of the document named 'How to read a book'.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "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'"} +{"answer": "Show the number of locations.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT COUNT(*) FROM Ref_locations"} +{"answer": "How many locations are listed in the database?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT COUNT(*) FROM Ref_locations"} +{"answer": "List all location codes and location names.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT location_code, location_name FROM Ref_locations"} +{"answer": "What are all the location codes and location names?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT location_code, location_name FROM Ref_locations"} +{"answer": "What are the name and description for location code x?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT location_name, location_description FROM Ref_locations WHERE location_code = 'x'"} +{"answer": "Give me the name and description of the location with code x.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT location_name, location_description FROM Ref_locations WHERE location_code = 'x'"} +{"answer": "What is the location code for the country 'Canada'?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT location_code FROM Ref_locations WHERE location_name = 'Canada'"} +{"answer": "Show the location code of the country 'Canada'.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT location_code FROM Ref_locations WHERE location_name = 'Canada'"} +{"answer": "How many roles are there?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT COUNT(*) FROM ROLES"} +{"answer": "Count the total number of roles listed.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT COUNT(*) FROM ROLES"} +{"answer": "List all role codes, role names, and role descriptions.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT role_code, role_name, role_description FROM ROLES"} +{"answer": "What are all the role codes, role names, and role descriptions?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT role_code, role_name, role_description FROM ROLES"} +{"answer": "What are the name and description for role code 'MG'?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT role_name, role_description FROM ROLES WHERE role_code = 'MG'"} +{"answer": "Find the name and description of the role with code 'MG'.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT role_name, role_description FROM ROLES WHERE role_code = 'MG'"} +{"answer": "Show the description for role name 'Proof Reader'.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT role_description FROM ROLES WHERE role_name = 'Proof Reader'"} +{"answer": "What is the description of the role named 'Proof Reader'?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT role_description FROM ROLES WHERE role_name = 'Proof Reader'"} +{"answer": "How many employees do we have?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT COUNT(*) FROM Employees"} +{"answer": "Find the number of employees we have.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT COUNT(*) FROM Employees"} +{"answer": "Show the name, role code, and date of birth for the employee with name 'Armani'.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT employee_name, role_code, date_of_birth FROM Employees WHERE employee_Name = 'Armani'"} +{"answer": "What are the name, role code, and date of birth of the employee named 'Armani'?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT employee_name, role_code, date_of_birth FROM Employees WHERE employee_Name = 'Armani'"} +{"answer": "What is the id for the employee called Ebba?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT employee_ID FROM Employees WHERE employee_name = 'Ebba'"} +{"answer": "Show the id of the employee named Ebba.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT employee_ID FROM Employees WHERE employee_name = 'Ebba'"} +{"answer": "Show the names of all the employees with role 'HR'.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT employee_name FROM Employees WHERE role_code = 'HR'"} +{"answer": "Which employees have the role with code 'HR'? Find their names.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT employee_name FROM Employees WHERE role_code = 'HR'"} +{"answer": "Show all role codes and the number of employees in each role.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT role_code, COUNT(*) FROM Employees GROUP BY role_code"} +{"answer": "What is the code of each role and the number of employees in each role?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT role_code, COUNT(*) FROM Employees GROUP BY role_code"} +{"answer": "What is the role code with the largest number of employees?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the code of the role that have the most employees.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show all role codes with at least 3 employees.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3"} +{"answer": "What are the roles with three or more employees? Give me the role codes.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3"} +{"answer": "Show the role code with the least employees.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "What is the role with the smallest number of employees? Find the role codes.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "What is the role name and role description for employee called Ebba?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "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'"} +{"answer": "Show the name and description of the role played by the employee named Ebba.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "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'"} +{"answer": "Show the names of employees with role name Editor.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Editor'"} +{"answer": "Find the names of all the employees whose the role name is 'Editor'.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Editor'"} +{"answer": "Show the employee ids for all employees with role name 'Human Resource' or 'Manager'.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "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'"} +{"answer": "What are the employee ids of the employees whose role name is 'Human Resource' or 'Manager'?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "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'"} +{"answer": "What are the different location codes for documents?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT DISTINCT location_code FROM Document_locations"} +{"answer": "Give me all the distinct location codes for documents.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT DISTINCT location_code FROM Document_locations"} +{"answer": "Show the location name for document 'Robin CV'.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "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'"} +{"answer": "What is the location name of the document 'Robin CV'?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "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'"} +{"answer": "Show the location code, the starting date and ending data in that location for all the documents.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations"} +{"answer": "What are each document's location code, and starting date and ending data in that location?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations"} +{"answer": "What is 'the date in location from' and 'the date in location to' for the document with name 'Robin CV'?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "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'"} +{"answer": "Find the starting date and ending data in location for the document named 'Robin CV'.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "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'"} +{"answer": "Show the location codes and the number of documents in each location.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code"} +{"answer": "What is the code of each location and the number of documents in that location?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code"} +{"answer": "What is the location code with the most documents?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the code of the location with the largest number of documents.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the location codes with at least 3 documents.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3"} +{"answer": "What are the codes of the locations with at least three documents?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3"} +{"answer": "Show the location name and code with the least documents.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What are the name and code of the location with the smallest number of documents?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "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"} +{"answer": "List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "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"} +{"answer": "Show the id of each employee and the number of document destruction authorised by that employee.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID"} +{"answer": "What are the id of each employee and the number of document destruction authorised by that employee?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID"} +{"answer": "Show the employee ids and the number of documents destroyed by each employee.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID"} +{"answer": "What are the id of each employee and the number of document destroyed by that employee?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID"} +{"answer": "Show the ids of the employees who don't authorize destruction for any document.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed"} +{"answer": "Which employees do not authorize destruction for any document? Give me their employee ids.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed"} +{"answer": "Show the ids of all employees who have authorized destruction.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed"} +{"answer": "What are the ids of all the employees who authorize document destruction?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed"} +{"answer": "Show the ids of all employees who have destroyed a document.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed"} +{"answer": "What are the ids of all the employees who have destroyed documents?\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed"} +{"answer": "Show the ids of all employees who don't destroy any document.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed"} +{"answer": "Which employees do not destroy any document? Find their employee ids.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed"} +{"answer": "Show the ids of all employees who have either destroyed a document or made an authorization to do this.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed"} +{"answer": "Which employees have either destroyed a document or made an authorization to do so? Return their employee ids.\nAdditional table information: table: cre_Doc_Tracking_DB", "question": "SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed"} +{"answer": "How many clubs are there?\nAdditional table information: table: club_1", "question": "SELECT COUNT(*) FROM club"} +{"answer": "Count the total number of clubs.\nAdditional table information: table: club_1", "question": "SELECT COUNT(*) FROM club"} +{"answer": "What are the names of all clubs?\nAdditional table information: table: club_1", "question": "SELECT clubname FROM club"} +{"answer": "Give me the name of each club.\nAdditional table information: table: club_1", "question": "SELECT clubname FROM club"} +{"answer": "How many students are there?\nAdditional table information: table: club_1", "question": "SELECT COUNT(*) FROM student"} +{"answer": "Count the total number of students.\nAdditional table information: table: club_1", "question": "SELECT COUNT(*) FROM student"} +{"answer": "What are the first names of all the students?\nAdditional table information: table: club_1", "question": "SELECT DISTINCT fname FROM student"} +{"answer": "Find each student's first name.\nAdditional table information: table: club_1", "question": "SELECT DISTINCT fname FROM student"} +{"answer": "Find the last names of the members of the club 'Bootup Baltimore'.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Who are the members of the club named 'Bootup Baltimore'? Give me their last names.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Who are the members of the club named 'Hopkins Student Enterprises'? Show the last name.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Return the last name for the members of the club named 'Hopkins Student Enterprises'.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "How many members does the club 'Tennis Club' has?\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Count the members of the club 'Tennis Club'.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Find the number of members of club 'Pen and Paper Gaming'.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "How many people have membership in the club 'Pen and Paper Gaming'?\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "How many clubs does 'Linda Smith' belong to?\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "How many clubs does 'Linda Smith' have membership for?\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Find the number of clubs where 'Tracy Kim' is a member.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "For how many clubs is 'Tracy Kim' a member?\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Find all the female members of club 'Bootup Baltimore'. Show the first name and last name.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Give me the first name and last name for all the female members of the club 'Bootup Baltimore'.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Find all the male members of club 'Hopkins Student Enterprises'. Show the first name and last name.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "What are the first name and last name of each male member in club 'Hopkins Student Enterprises'?\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Find all members of 'Bootup Baltimore' whose major is '600'. Show the first name and last name.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Which members of 'Bootup Baltimore' major in '600'? Give me their first names and last names.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Which club has the most members majoring in '600'?\nAdditional table information: table: club_1", "question": "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"} +{"answer": "Find the club which has the largest number of members majoring in '600'.\nAdditional table information: table: club_1", "question": "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"} +{"answer": "Find the name of the club that has the most female students.\nAdditional table information: table: club_1", "question": "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"} +{"answer": "Which club has the most female students as their members? Give me the name of the club.\nAdditional table information: table: club_1", "question": "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"} +{"answer": "What is the description of the club named 'Tennis Club'?\nAdditional table information: table: club_1", "question": "SELECT clubdesc FROM club WHERE clubname = 'Tennis Club'"} +{"answer": "Find the description of the club called 'Tennis Club'.\nAdditional table information: table: club_1", "question": "SELECT clubdesc FROM club WHERE clubname = 'Tennis Club'"} +{"answer": "Find the description of the club 'Pen and Paper Gaming'.\nAdditional table information: table: club_1", "question": "SELECT clubdesc FROM club WHERE clubname = 'Pen and Paper Gaming'"} +{"answer": "What is the description of the club 'Pen and Paper Gaming'?\nAdditional table information: table: club_1", "question": "SELECT clubdesc FROM club WHERE clubname = 'Pen and Paper Gaming'"} +{"answer": "What is the location of the club named 'Tennis Club'?\nAdditional table information: table: club_1", "question": "SELECT clublocation FROM club WHERE clubname = 'Tennis Club'"} +{"answer": "Where us the club named 'Tennis Club' located?\nAdditional table information: table: club_1", "question": "SELECT clublocation FROM club WHERE clubname = 'Tennis Club'"} +{"answer": "Find the location of the club 'Pen and Paper Gaming'.\nAdditional table information: table: club_1", "question": "SELECT clublocation FROM club WHERE clubname = 'Pen and Paper Gaming'"} +{"answer": "Where is the club 'Pen and Paper Gaming' located?\nAdditional table information: table: club_1", "question": "SELECT clublocation FROM club WHERE clubname = 'Pen and Paper Gaming'"} +{"answer": "Where is the club 'Hopkins Student Enterprises' located?\nAdditional table information: table: club_1", "question": "SELECT clublocation FROM club WHERE clubname = 'Hopkins Student Enterprises'"} +{"answer": "Tell me the location of the club 'Hopkins Student Enterprises'.\nAdditional table information: table: club_1", "question": "SELECT clublocation FROM club WHERE clubname = 'Hopkins Student Enterprises'"} +{"answer": "Find the name of all the clubs at 'AKW'.\nAdditional table information: table: club_1", "question": "SELECT clubname FROM club WHERE clublocation = 'AKW'"} +{"answer": "Which clubs are located at 'AKW'? Return the club names.\nAdditional table information: table: club_1", "question": "SELECT clubname FROM club WHERE clublocation = 'AKW'"} +{"answer": "How many clubs are located at 'HHH'?\nAdditional table information: table: club_1", "question": "SELECT COUNT(*) FROM club WHERE clublocation = 'HHH'"} +{"answer": "Count the number of clubs located at 'HHH'.\nAdditional table information: table: club_1", "question": "SELECT COUNT(*) FROM club WHERE clublocation = 'HHH'"} +{"answer": "What are the first and last name of the president of the club 'Bootup Baltimore'?\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Who is the president of the club 'Bootup Baltimore'? Give me the first and last name.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Who is the 'CTO' of club 'Hopkins Student Enterprises'? Show the first name and last name.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Find the first name and last name for the 'CTO' of the club 'Hopkins Student Enterprises'?\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "How many different roles are there in the club 'Bootup Baltimore'?\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Count the number of different positions in the club 'Bootup Baltimore'.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "How many members of 'Bootup Baltimore' are older than 18?\nAdditional table information: table: club_1", "question": "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"} +{"answer": "Count the number of members in club 'Bootup Baltimore' whose age is above 18.\nAdditional table information: table: club_1", "question": "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"} +{"answer": "How many members of club 'Bootup Baltimore' are younger than 18?\nAdditional table information: table: club_1", "question": "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"} +{"answer": "Count the number of members in club 'Bootup Baltimore' whose age is below 18.\nAdditional table information: table: club_1", "question": "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"} +{"answer": "Find the names of all the clubs that have at least a member from the city with city code 'BAL'.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Which clubs have one or more members from the city with code 'BAL'? Give me the names of the clubs.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Find the names of the clubs that have at least a member from the city with city code 'HOU'.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Which clubs have one or more members from the city with code 'HOU'? Give me the names of the clubs.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "How many clubs does the student named 'Eric Tai' belong to?\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Count the number of clubs for which the student named 'Eric Tai' is a member.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "List the clubs having 'Davis Steven' as a member.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "What are the names of the clubs that have 'Davis Steven' as a member?\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "List the clubs that have at least a member with advisor '1121'.\nAdditional table information: table: club_1", "question": "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"} +{"answer": "Which clubs have one or more members whose advisor is '1121'?\nAdditional table information: table: club_1", "question": "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"} +{"answer": "What is the average age of the members of the club 'Bootup Baltimore'?\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Find the average age of the members in the club 'Bootup Baltimore'.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Find the average age of members of the club 'Hopkins Student Enterprises'.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "On average, how old are the members in the club 'Hopkins Student Enterprises'?\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Retrieve the average age of members of the club 'Tennis Club'.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "Compute the average age of the members in the club 'Tennis Club'.\nAdditional table information: table: club_1", "question": "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'"} +{"answer": "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'?\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "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'?\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "List the project details of the project both producing patent and paper as outcomes.\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "What are the details of the project that is producing both patents and papers as outcomes?\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "What is the total grant amount of the organisations described as research?\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "What is the total amount of grant money for research?\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "List from which date and to which date these staff work: project staff of the project which hires the most staffs\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "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?\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "Find the organisation ids and details of the organisations which are involved in\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "What are the ids and details for all organizations that have grants of more than 6000 dollars?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "What is the organisation type and id of the organisation which has the most number of research staff?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "What is the type and id of the organization that has the most research staff?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "Which organisation type hires most research staff?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "What is the type of the organization with the most research staff?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "What are the send dates for all documents that have a grant amount of more than 5000 and are involved in research?\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "What are the response received dates for the documents described as 'Regular' or granted with more than 100?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "What is the response received date for the document described as Regular that was granted more than 100 dollars?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "List the project details of the projects which did not hire any staff for a researcher role.\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_Staff WHERE role_code = 'researcher')"} +{"answer": "What are the details for all projects that did not hire any staff in a research role?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_Staff WHERE role_code = 'researcher')"} +{"answer": "What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "What are the task details, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "When do all the researcher role staff start to work, and when do they stop working?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'researcher'"} +{"answer": "When did researchers start and stop working?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'researcher'"} +{"answer": "How many kinds of roles are there for the staff?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT COUNT(DISTINCT role_code) FROM Project_Staff"} +{"answer": "How many different roles are there on the project staff?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT COUNT(DISTINCT role_code) FROM Project_Staff"} +{"answer": "What is the total amount of grants given by each organisations? Also list the organisation id.\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT SUM(grant_amount), organisation_id FROM Grants GROUP BY organisation_id"} +{"answer": "What is the total amount of grant money given to each organization and what is its id?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT SUM(grant_amount), organisation_id FROM Grants GROUP BY organisation_id"} +{"answer": "List the project details of the projects with the research outcome described with the substring 'Published'.\nAdditional table information: table: tracking_grants_for_research", "question": "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%'"} +{"answer": "What are the details for the project whose research has been published?\nAdditional table information: table: tracking_grants_for_research", "question": "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%'"} +{"answer": "How many staff does each project has? List the project id and the number in an ascending order.\nAdditional table information: table: tracking_grants_for_research", "question": "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 NULLS FIRST"} +{"answer": "For each project id, how many staff does it have? List them in increasing order.\nAdditional table information: table: tracking_grants_for_research", "question": "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 NULLS FIRST"} +{"answer": "What is the complete description of the researcher role.\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher'"} +{"answer": "What is the complete description of the job of a researcher?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher'"} +{"answer": "When did the first staff for the projects started working?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT date_from FROM Project_Staff ORDER BY date_from ASC NULLS FIRST LIMIT 1"} +{"answer": "When did the first staff member start working?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT date_from FROM Project_Staff ORDER BY date_from ASC NULLS FIRST LIMIT 1"} +{"answer": "Which project made the most number of outcomes? List the project details and the project id.\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "What are the details and id of the project with the most outcomes?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "Which projects have no outcome? List the project details.\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_outcomes)"} +{"answer": "What are the details of the project with no outcomes?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_outcomes)"} +{"answer": "Which organisation hired the most number of research staff? List the organisation id, type and detail.\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "What are the ids, types, and details of the organization with the most research staff?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "Show the role description and the id of the project staff involved in most number of project outcomes?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "For each staff id, what is the description of the role that is involved with the most number of projects?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "Which document type is described with the prefix 'Initial'?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'"} +{"answer": "What is the type of the document whose description starts with the word 'Initial'?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'"} +{"answer": "For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date.\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "For grants that have descriptions of Regular and Initial Applications, what are their start dates?\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "How many documents can one grant have at most? List the grant id and number.\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT grant_id, COUNT(*) FROM Documents GROUP BY grant_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "For each grant id, how many documents does it have, and which one has the most?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT grant_id, COUNT(*) FROM Documents GROUP BY grant_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the organisation type description of the organisation detailed as 'quo'.\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "What is the type description of the organization whose detail is listed as 'quo'?\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.\nAdditional table information: table: tracking_grants_for_research", "question": "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 NULLS FIRST"} +{"answer": "What are the details of all organizations that are described as Sponsors and sort the results in ascending order?\nAdditional table information: table: tracking_grants_for_research", "question": "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 NULLS FIRST"} +{"answer": "How many Patent outcomes are generated from all the projects?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT COUNT(*) FROM Project_outcomes WHERE outcome_code = 'Patent'"} +{"answer": "How many patents outcomes were listed for all the projects?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT COUNT(*) FROM Project_outcomes WHERE outcome_code = 'Patent'"} +{"answer": "How many project staff worked as leaders or started working before '1989-04-24 23:51:54'?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT COUNT(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'"} +{"answer": "How many project members were leaders or started working before '1989-04-24 23:51:54'?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT COUNT(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'"} +{"answer": "What is the last date of the staff leaving the projects?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1"} +{"answer": "What is the last date that a staff member left a project?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1"} +{"answer": "What are the result description of the project whose detail is 'sint'?\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "What is the description for the results whose project detail is 'sint'?\nAdditional table information: table: tracking_grants_for_research", "question": "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'"} +{"answer": "List the organisation id with the maximum outcome count, and the count.\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "What is the id of the organization with the maximum number of outcomes and how many outcomes are there?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "List the project details of the projects launched by the organisation\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT project_details FROM Projects WHERE organisation_id IN (SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY COUNT(*) DESC LIMIT 1)"} +{"answer": "What are the details for the projects which were launched by the organization with the most projects?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT project_details FROM Projects WHERE organisation_id IN (SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY COUNT(*) DESC LIMIT 1)"} +{"answer": "List the research staff details, and order in ascending order.\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC NULLS FIRST"} +{"answer": "What details are there on the research staff? List the result in ascending alphabetical order.\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC NULLS FIRST"} +{"answer": "How many tasks are there in total?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT COUNT(*) FROM Tasks"} +{"answer": "How many tasks are there?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT COUNT(*) FROM Tasks"} +{"answer": "How many tasks does each project have? List the task count and the project detail.\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "For each project id, how many tasks are there?\nAdditional table information: table: tracking_grants_for_research", "question": "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"} +{"answer": "What are the staff roles of the staff who\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'"} +{"answer": "What roles did staff members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'"} +{"answer": "What are the descriptions of all the project outcomes?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code"} +{"answer": "List the description of the outcomes for all projects.\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code"} +{"answer": "Which role is most common for the staff?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the most common role for the staff?\nAdditional table information: table: tracking_grants_for_research", "question": "SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "How many friends does Dan have?\nAdditional table information: table: network_2", "question": "SELECT COUNT(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'"} +{"answer": "How many friends does Dan have?\nAdditional table information: table: network_2", "question": "SELECT COUNT(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'"} +{"answer": "How many females does this network has?\nAdditional table information: table: network_2", "question": "SELECT COUNT(*) FROM Person WHERE gender = 'female'"} +{"answer": "How many females are in the network?\nAdditional table information: table: network_2", "question": "SELECT COUNT(*) FROM Person WHERE gender = 'female'"} +{"answer": "What is the average age for all person?\nAdditional table information: table: network_2", "question": "SELECT AVG(age) FROM Person"} +{"answer": "What is the average age for all people in the table?\nAdditional table information: table: network_2", "question": "SELECT AVG(age) FROM Person"} +{"answer": "How many different cities are they from?\nAdditional table information: table: network_2", "question": "SELECT COUNT(DISTINCT city) FROM Person"} +{"answer": "How many different cities do people originate from?\nAdditional table information: table: network_2", "question": "SELECT COUNT(DISTINCT city) FROM Person"} +{"answer": "How many type of jobs do they have?\nAdditional table information: table: network_2", "question": "SELECT COUNT(DISTINCT job) FROM Person"} +{"answer": "How many different jobs are listed?\nAdditional table information: table: network_2", "question": "SELECT COUNT(DISTINCT job) FROM Person"} +{"answer": "Who is the oldest person?\nAdditional table information: table: network_2", "question": "SELECT name FROM Person WHERE age = (SELECT MAX(age) FROM person)"} +{"answer": "What is the name of the person who is the oldest?\nAdditional table information: table: network_2", "question": "SELECT name FROM Person WHERE age = (SELECT MAX(age) FROM person)"} +{"answer": "Who is the oldest person whose job is student?\nAdditional table information: table: network_2", "question": "SELECT name FROM Person WHERE job = 'student' AND age = (SELECT MAX(age) FROM person WHERE job = 'student')"} +{"answer": "What is the name of the oldest student?\nAdditional table information: table: network_2", "question": "SELECT name FROM Person WHERE job = 'student' AND age = (SELECT MAX(age) FROM person WHERE job = 'student')"} +{"answer": "Who is the youngest male?\nAdditional table information: table: network_2", "question": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT MIN(age) FROM person WHERE gender = 'male')"} +{"answer": "What is the name of the youngest male?\nAdditional table information: table: network_2", "question": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT MIN(age) FROM person WHERE gender = 'male')"} +{"answer": "How old is the doctor named Zach?\nAdditional table information: table: network_2", "question": "SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach'"} +{"answer": "What is the age of the doctor named Zach?\nAdditional table information: table: network_2", "question": "SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach'"} +{"answer": "Who is the person whose age is below 30?\nAdditional table information: table: network_2", "question": "SELECT name FROM Person WHERE age < 30"} +{"answer": "What is the name of the person whose age is below 30?\nAdditional table information: table: network_2", "question": "SELECT name FROM Person WHERE age < 30"} +{"answer": "How many people whose age is greater 30 and job is engineer?\nAdditional table information: table: network_2", "question": "SELECT COUNT(*) FROM Person WHERE age > 30 AND job = 'engineer'"} +{"answer": "HOw many engineers are older than 30?\nAdditional table information: table: network_2", "question": "SELECT COUNT(*) FROM Person WHERE age > 30 AND job = 'engineer'"} +{"answer": "What is the average age for each gender?\nAdditional table information: table: network_2", "question": "SELECT AVG(age), gender FROM Person GROUP BY gender"} +{"answer": "How old is each gender, on average?\nAdditional table information: table: network_2", "question": "SELECT AVG(age), gender FROM Person GROUP BY gender"} +{"answer": "What is average age for different job title?\nAdditional table information: table: network_2", "question": "SELECT AVG(age), job FROM Person GROUP BY job"} +{"answer": "How old is the average person for each job?\nAdditional table information: table: network_2", "question": "SELECT AVG(age), job FROM Person GROUP BY job"} +{"answer": "What is average age of male for different job title?\nAdditional table information: table: network_2", "question": "SELECT AVG(age), job FROM Person WHERE gender = 'male' GROUP BY job"} +{"answer": "What is the average age for a male in each job?\nAdditional table information: table: network_2", "question": "SELECT AVG(age), job FROM Person WHERE gender = 'male' GROUP BY job"} +{"answer": "What is minimum age for different job title?\nAdditional table information: table: network_2", "question": "SELECT MIN(age), job FROM Person GROUP BY job"} +{"answer": "How old is the youngest person for each job?\nAdditional table information: table: network_2", "question": "SELECT MIN(age), job FROM Person GROUP BY job"} +{"answer": "Find the number of people who is under 40 for each gender.\nAdditional table information: table: network_2", "question": "SELECT COUNT(*), gender FROM Person WHERE age < 40 GROUP BY gender"} +{"answer": "How many people are under 40 for each gender?\nAdditional table information: table: network_2", "question": "SELECT COUNT(*), gender FROM Person WHERE age < 40 GROUP BY gender"} +{"answer": "Find the name of people whose age is greater than any engineer sorted by their age.\nAdditional table information: table: network_2", "question": "SELECT name FROM Person WHERE age > (SELECT MIN(age) FROM person WHERE job = 'engineer') ORDER BY age NULLS FIRST"} +{"answer": "What is the name of all the people who are older than at least one engineer? Order them by age.\nAdditional table information: table: network_2", "question": "SELECT name FROM Person WHERE age > (SELECT MIN(age) FROM person WHERE job = 'engineer') ORDER BY age NULLS FIRST"} +{"answer": "Find the number of people whose age is greater than all engineers.\nAdditional table information: table: network_2", "question": "SELECT COUNT(*) FROM Person WHERE age > (SELECT MAX(age) FROM person WHERE job = 'engineer')"} +{"answer": "How many people are older than every engineer?\nAdditional table information: table: network_2", "question": "SELECT COUNT(*) FROM Person WHERE age > (SELECT MAX(age) FROM person WHERE job = 'engineer')"} +{"answer": "list the name, job title of all people ordered by their names.\nAdditional table information: table: network_2", "question": "SELECT name, job FROM Person ORDER BY name NULLS FIRST"} +{"answer": "What are the names and job titles of every person ordered alphabetically by name?\nAdditional table information: table: network_2", "question": "SELECT name, job FROM Person ORDER BY name NULLS FIRST"} +{"answer": "Find the names of all person sorted in the descending order using age.\nAdditional table information: table: network_2", "question": "SELECT name FROM Person ORDER BY age DESC"} +{"answer": "What are the names of everybody sorted by age in descending order?\nAdditional table information: table: network_2", "question": "SELECT name FROM Person ORDER BY age DESC"} +{"answer": "Find the name and age of all males in order of their age.\nAdditional table information: table: network_2", "question": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age NULLS FIRST"} +{"answer": "What is the name and age of every male? Order the results by age.\nAdditional table information: table: network_2", "question": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age NULLS FIRST"} +{"answer": "Find the name and age of the person who is a friend of both Dan and Alice.\nAdditional table information: table: network_2", "question": "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'"} +{"answer": "What are the names and ages of every person who is a friend of both Dan and Alice?\nAdditional table information: table: network_2", "question": "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'"} +{"answer": "Find the name and age of the person who is a friend of Dan or Alice.\nAdditional table information: table: network_2", "question": "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'"} +{"answer": "What are the different names and ages of every friend of either Dan or alice?\nAdditional table information: table: network_2", "question": "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'"} +{"answer": "Find the name of the person who has friends with age above 40 and under age 30?\nAdditional table information: table: network_2", "question": "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)"} +{"answer": "What are the names of every person who has a friend over 40 and under 30?\nAdditional table information: table: network_2", "question": "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)"} +{"answer": "Find the name of the person who has friends with age above 40 but not under age 30?\nAdditional table information: table: network_2", "question": "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)"} +{"answer": "What are the names of the people who are older 40 but no friends under age 30?\nAdditional table information: table: network_2", "question": "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)"} +{"answer": "Find the name of the person who has no student friends.\nAdditional table information: table: network_2", "question": "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'"} +{"answer": "What are the names of the people who have no friends who are students?\nAdditional table information: table: network_2", "question": "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'"} +{"answer": "Find the person who has exactly one friend.\nAdditional table information: table: network_2", "question": "SELECT name FROM PersonFriend GROUP BY name HAVING COUNT(*) = 1"} +{"answer": "What are the names of everybody who has exactly one friend?\nAdditional table information: table: network_2", "question": "SELECT name FROM PersonFriend GROUP BY name HAVING COUNT(*) = 1"} +{"answer": "Who are the friends of Bob?\nAdditional table information: table: network_2", "question": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob'"} +{"answer": "Who are Bob's friends?\nAdditional table information: table: network_2", "question": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob'"} +{"answer": "Find the name of persons who are friends with Bob.\nAdditional table information: table: network_2", "question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob'"} +{"answer": "What are the names of all of Bob's friends?\nAdditional table information: table: network_2", "question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob'"} +{"answer": "Find the names of females who are friends with Zach\nAdditional table information: table: network_2", "question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female'"} +{"answer": "What are the names of all females who are friends with Zach?\nAdditional table information: table: network_2", "question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female'"} +{"answer": "Find the female friends of Alice.\nAdditional table information: table: network_2", "question": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female'"} +{"answer": "What are all the friends of Alice who are female?\nAdditional table information: table: network_2", "question": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female'"} +{"answer": "Find the male friend of Alice whose job is a doctor?\nAdditional table information: table: network_2", "question": "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'"} +{"answer": "Who are the friends of Alice that are doctors?\nAdditional table information: table: network_2", "question": "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'"} +{"answer": "Who has a friend that is from new york city?\nAdditional table information: table: network_2", "question": "SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city'"} +{"answer": "What are the names of all friends who are from New York?\nAdditional table information: table: network_2", "question": "SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city'"} +{"answer": "Who has friends that are younger than the average age?\nAdditional table information: table: network_2", "question": "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)"} +{"answer": "What are the different names of friends who are younger than the average age for a friend?\nAdditional table information: table: network_2", "question": "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)"} +{"answer": "Who has friends that are older than the average age? Print their friends and their ages as well\nAdditional table information: table: network_2", "question": "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)"} +{"answer": "Whare the names, friends, and ages of all people who are older than the average age of a person?\nAdditional table information: table: network_2", "question": "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)"} +{"answer": "Who is the friend of Zach with longest year relationship?\nAdditional table information: table: network_2", "question": "SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach')"} +{"answer": "Which friend of Zach has the longest-lasting friendship?\nAdditional table information: table: network_2", "question": "SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach')"} +{"answer": "What is the age of the friend of Zach with longest year relationship?\nAdditional table information: table: network_2", "question": "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')"} +{"answer": "What are the ages of all of Zach's friends who are in the longest relationship?\nAdditional table information: table: network_2", "question": "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')"} +{"answer": "Find the name of persons who are friends with Alice for the shortest years.\nAdditional table information: table: network_2", "question": "SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT MIN(YEAR) FROM PersonFriend WHERE friend = 'Alice')"} +{"answer": "What are the names of all people who are friends with Alice for the shortest amount of time?\nAdditional table information: table: network_2", "question": "SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT MIN(YEAR) FROM PersonFriend WHERE friend = 'Alice')"} +{"answer": "Find the name, age, and job title of persons who are friends with Alice for the longest years.\nAdditional table information: table: network_2", "question": "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')"} +{"answer": "What are the names, ages, and jobs of all people who are friends with Alice for the longest amount of time?\nAdditional table information: table: network_2", "question": "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')"} +{"answer": "Who is the person that has no friend?\nAdditional table information: table: network_2", "question": "SELECT name FROM person EXCEPT SELECT name FROM PersonFriend"} +{"answer": "What are the names of all people who do not have friends?\nAdditional table information: table: network_2", "question": "SELECT name FROM person EXCEPT SELECT name FROM PersonFriend"} +{"answer": "Which person whose friends have the oldest average age?\nAdditional table information: table: network_2", "question": "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"} +{"answer": "What is the name of the person who has the oldest average age for their friends, and what is that average age?\nAdditional table information: table: network_2", "question": "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"} +{"answer": "What is the total number of people who has no friend living in the city of Austin.\nAdditional table information: table: network_2", "question": "SELECT COUNT(DISTINCT name) FROM PersonFriend WHERE NOT friend IN (SELECT name FROM person WHERE city = 'Austin')"} +{"answer": "What is the total number of people who have no friends living in Austin?\nAdditional table information: table: network_2", "question": "SELECT COUNT(DISTINCT name) FROM PersonFriend WHERE NOT friend IN (SELECT name FROM person WHERE city = 'Austin')"} +{"answer": "Find Alice's friends of friends.\nAdditional table information: table: network_2", "question": "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'"} +{"answer": "What are the names of all of Alice's friends of friends?\nAdditional table information: table: network_2", "question": "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'"} +{"answer": "How many members are there?\nAdditional table information: table: decoration_competition", "question": "SELECT COUNT(*) FROM member"} +{"answer": "List the names of members in ascending alphabetical order.\nAdditional table information: table: decoration_competition", "question": "SELECT Name FROM member ORDER BY Name ASC NULLS FIRST"} +{"answer": "What are the names and countries of members?\nAdditional table information: table: decoration_competition", "question": "SELECT Name, Country FROM member"} +{"answer": "Show the names of members whose country is 'United States' or 'Canada'.\nAdditional table information: table: decoration_competition", "question": "SELECT Name FROM member WHERE Country = 'United States' OR Country = 'Canada'"} +{"answer": "Show the different countries and the number of members from each.\nAdditional table information: table: decoration_competition", "question": "SELECT Country, COUNT(*) FROM member GROUP BY Country"} +{"answer": "Show the most common country across members.\nAdditional table information: table: decoration_competition", "question": "SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which countries have more than two members?\nAdditional table information: table: decoration_competition", "question": "SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 2"} +{"answer": "Show the leader names and locations of colleges.\nAdditional table information: table: decoration_competition", "question": "SELECT Leader_Name, College_Location FROM college"} +{"answer": "Show the names of members and names of colleges they go to.\nAdditional table information: table: decoration_competition", "question": "SELECT T2.Name, T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID"} +{"answer": "Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names.\nAdditional table information: table: decoration_competition", "question": "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 NULLS FIRST"} +{"answer": "Show the distinct leader names of colleges associated with members from country 'Canada'.\nAdditional table information: table: decoration_competition", "question": "SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID WHERE T2.Country = 'Canada'"} +{"answer": "Show the names of members and the decoration themes they have.\nAdditional table information: table: decoration_competition", "question": "SELECT T1.Name, T2.Decoration_Theme FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID"} +{"answer": "Show the names of members that have a rank in round higher than 3.\nAdditional table information: table: decoration_competition", "question": "SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID WHERE T2.Rank_in_Round > 3"} +{"answer": "Show the names of members in ascending order of their rank in rounds.\nAdditional table information: table: decoration_competition", "question": "SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round ASC NULLS FIRST"} +{"answer": "List the names of members who did not participate in any round.\nAdditional table information: table: decoration_competition", "question": "SELECT Name FROM member WHERE NOT Member_ID IN (SELECT Member_ID FROM round)"} +{"answer": "Find the name and access counts of all documents, in alphabetic order of the document name.\nAdditional table information: table: document_management", "question": "SELECT document_name, access_count FROM documents ORDER BY document_name NULLS FIRST"} +{"answer": "What are the names of all the documents, as well as the access counts of each, ordered alphabetically?\nAdditional table information: table: document_management", "question": "SELECT document_name, access_count FROM documents ORDER BY document_name NULLS FIRST"} +{"answer": "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?\nAdditional table information: table: document_management", "question": "SELECT document_name, access_count FROM documents ORDER BY access_count DESC LIMIT 1"} +{"answer": "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?\nAdditional table information: table: document_management", "question": "SELECT document_name, access_count FROM documents ORDER BY access_count DESC LIMIT 1"} +{"answer": "Find the types of documents with more than 4 documents.\nAdditional table information: table: document_management", "question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 4"} +{"answer": "What are the codes of types of documents of which there are for or more?\nAdditional table information: table: document_management", "question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 4"} +{"answer": "Find the total access count of all documents in the most popular document type.\nAdditional table information: table: document_management", "question": "SELECT SUM(access_count) FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the total access count of documents that are of the most common document type?\nAdditional table information: table: document_management", "question": "SELECT SUM(access_count) FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the average access count of documents?\nAdditional table information: table: document_management", "question": "SELECT AVG(access_count) FROM documents"} +{"answer": "Find the average access count across all documents?\nAdditional table information: table: document_management", "question": "SELECT AVG(access_count) FROM documents"} +{"answer": "What is the structure of the document with the least number of accesses?\nAdditional table information: table: document_management", "question": "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"} +{"answer": "Return the structure description of the document that has been accessed the fewest number of times.\nAdditional table information: table: document_management", "question": "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"} +{"answer": "What is the type of the document named 'David CV'?\nAdditional table information: table: document_management", "question": "SELECT document_type_code FROM documents WHERE document_name = 'David CV'"} +{"answer": "Return the type code of the document named 'David CV'.\nAdditional table information: table: document_management", "question": "SELECT document_type_code FROM documents WHERE document_name = 'David CV'"} +{"answer": "Find the list of documents that are both in the most three popular type and have the most three popular structure.\nAdditional table information: table: document_management", "question": "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"} +{"answer": "What are the names of documents that have both one of the three most common types and one of three most common structures?\nAdditional table information: table: document_management", "question": "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"} +{"answer": "What document types do have more than 10000 total access number.\nAdditional table information: table: document_management", "question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000"} +{"answer": "Return the codes of the document types that do not have a total access count of over 10000.\nAdditional table information: table: document_management", "question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000"} +{"answer": "What are all the section titles of the document named 'David CV'?\nAdditional table information: table: document_management", "question": "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'"} +{"answer": "Give the section titles of the document with the name 'David CV'.\nAdditional table information: table: document_management", "question": "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'"} +{"answer": "Find all the name of documents without any sections.\nAdditional table information: table: document_management", "question": "SELECT document_name FROM documents WHERE NOT document_code IN (SELECT document_code FROM document_sections)"} +{"answer": "What are the names of documents that do not have any sections?\nAdditional table information: table: document_management", "question": "SELECT document_name FROM documents WHERE NOT document_code IN (SELECT document_code FROM document_sections)"} +{"answer": "List all the username and passwords of users with the most popular role.\nAdditional table information: table: document_management", "question": "SELECT user_name, password FROM users GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the usernames and passwords of users that have the most common role?\nAdditional table information: table: document_management", "question": "SELECT user_name, password FROM users GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the average access counts of documents with functional area 'Acknowledgement'.\nAdditional table information: table: document_management", "question": "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'"} +{"answer": "What are the average access counts of documents that have the functional area description 'Acknowledgement'?\nAdditional table information: table: document_management", "question": "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'"} +{"answer": "Find names of the document without any images.\nAdditional table information: table: document_management", "question": "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"} +{"answer": "What are the names of documents that do not have any images?\nAdditional table information: table: document_management", "question": "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"} +{"answer": "What is the name of the document with the most number of sections?\nAdditional table information: table: document_management", "question": "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"} +{"answer": "Return the name of the document that has the most sections.\nAdditional table information: table: document_management", "question": "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"} +{"answer": "List all the document names which contains 'CV'.\nAdditional table information: table: document_management", "question": "SELECT document_name FROM documents WHERE document_name LIKE '%CV%'"} +{"answer": "What are the names of documents that contain the substring 'CV'?\nAdditional table information: table: document_management", "question": "SELECT document_name FROM documents WHERE document_name LIKE '%CV%'"} +{"answer": "How many users are logged in?\nAdditional table information: table: document_management", "question": "SELECT COUNT(*) FROM users WHERE user_login = 1"} +{"answer": "Count the number of users that are logged in.\nAdditional table information: table: document_management", "question": "SELECT COUNT(*) FROM users WHERE user_login = 1"} +{"answer": "Find the description of the most popular role among the users that have logged in.\nAdditional table information: table: document_management", "question": "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)"} +{"answer": "What is the description of the most popular role among users that have logged in?\nAdditional table information: table: document_management", "question": "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)"} +{"answer": "Find the average access count of documents with the least popular structure.\nAdditional table information: table: document_management", "question": "SELECT AVG(access_count) FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "What is the average access count of documents that have the least common structure?\nAdditional table information: table: document_management", "question": "SELECT AVG(access_count) FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "List all the image name and URLs in the order of their names.\nAdditional table information: table: document_management", "question": "SELECT image_name, image_url FROM images ORDER BY image_name NULLS FIRST"} +{"answer": "What are the names and urls of images, sorted alphabetically?\nAdditional table information: table: document_management", "question": "SELECT image_name, image_url FROM images ORDER BY image_name NULLS FIRST"} +{"answer": "Find the number of users in each role.\nAdditional table information: table: document_management", "question": "SELECT COUNT(*), role_code FROM users GROUP BY role_code"} +{"answer": "What are the different role codes for users, and how many users have each?\nAdditional table information: table: document_management", "question": "SELECT COUNT(*), role_code FROM users GROUP BY role_code"} +{"answer": "What document types have more than 2 corresponding documents?\nAdditional table information: table: document_management", "question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 2"} +{"answer": "Give the codes of document types that have more than 2 corresponding documents.\nAdditional table information: table: document_management", "question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 2"} +{"answer": "How many companies are there?\nAdditional table information: table: company_office", "question": "SELECT COUNT(*) FROM Companies"} +{"answer": "Count the number of companies.\nAdditional table information: table: company_office", "question": "SELECT COUNT(*) FROM Companies"} +{"answer": "List the names of companies in descending order of market value.\nAdditional table information: table: company_office", "question": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC"} +{"answer": "Sort the company names in descending order of the company's market value.\nAdditional table information: table: company_office", "question": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC"} +{"answer": "What are the names of companies whose headquarters are not 'USA'?\nAdditional table information: table: company_office", "question": "SELECT name FROM Companies WHERE Headquarters <> 'USA'"} +{"answer": "Find the names of the companies whose headquarters are not located in 'USA'.\nAdditional table information: table: company_office", "question": "SELECT name FROM Companies WHERE Headquarters <> 'USA'"} +{"answer": "What are the name and assets of each company, sorted in ascending order of company name?\nAdditional table information: table: company_office", "question": "SELECT name, Assets_billion FROM Companies ORDER BY name ASC NULLS FIRST"} +{"answer": "List the name and assets of each company in ascending order of company name.\nAdditional table information: table: company_office", "question": "SELECT name, Assets_billion FROM Companies ORDER BY name ASC NULLS FIRST"} +{"answer": "What are the average profits of companies?\nAdditional table information: table: company_office", "question": "SELECT AVG(Profits_billion) FROM Companies"} +{"answer": "Compute the average profits companies make.\nAdditional table information: table: company_office", "question": "SELECT AVG(Profits_billion) FROM Companies"} +{"answer": "What are the maximum and minimum sales of the companies whose industries are not 'Banking'.\nAdditional table information: table: company_office", "question": "SELECT MAX(Sales_billion), MIN(Sales_billion) FROM Companies WHERE Industry <> 'Banking'"} +{"answer": "Find the maximum and minimum sales of the companies that are not in the 'Banking' industry.\nAdditional table information: table: company_office", "question": "SELECT MAX(Sales_billion), MIN(Sales_billion) FROM Companies WHERE Industry <> 'Banking'"} +{"answer": "How many different industries are the companies in?\nAdditional table information: table: company_office", "question": "SELECT COUNT(DISTINCT Industry) FROM Companies"} +{"answer": "Count the number of distinct company industries.\nAdditional table information: table: company_office", "question": "SELECT COUNT(DISTINCT Industry) FROM Companies"} +{"answer": "List the names of buildings in descending order of building height.\nAdditional table information: table: company_office", "question": "SELECT name FROM buildings ORDER BY Height DESC"} +{"answer": "What are the names of buildings sorted in descending order of building height?\nAdditional table information: table: company_office", "question": "SELECT name FROM buildings ORDER BY Height DESC"} +{"answer": "Find the stories of the building with the largest height.\nAdditional table information: table: company_office", "question": "SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1"} +{"answer": "What is the stories of highest building?\nAdditional table information: table: company_office", "question": "SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1"} +{"answer": "List the name of a building along with the name of a company whose office is in the building.\nAdditional table information: table: company_office", "question": "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"} +{"answer": "For each company, return the company name and the name of the building its office is located in.\nAdditional table information: table: company_office", "question": "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"} +{"answer": "Show the names of the buildings that have more than one company offices.\nAdditional table information: table: company_office", "question": "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"} +{"answer": "Which buildings have more than one company offices? Give me the building names.\nAdditional table information: table: company_office", "question": "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"} +{"answer": "Show the name of the building that has the most company offices.\nAdditional table information: table: company_office", "question": "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"} +{"answer": "Which building has the largest number of company offices? Give me the building name.\nAdditional table information: table: company_office", "question": "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"} +{"answer": "Please show the names of the buildings whose status is 'on-hold', in ascending order of stories.\nAdditional table information: table: company_office", "question": "SELECT name FROM buildings WHERE Status = 'on-hold' ORDER BY Stories ASC NULLS FIRST"} +{"answer": "Find the names of the buildings in 'on-hold' status, and sort them in ascending order of building stories.\nAdditional table information: table: company_office", "question": "SELECT name FROM buildings WHERE Status = 'on-hold' ORDER BY Stories ASC NULLS FIRST"} +{"answer": "Please show each industry and the corresponding number of companies in that industry.\nAdditional table information: table: company_office", "question": "SELECT Industry, COUNT(*) FROM Companies GROUP BY Industry"} +{"answer": "Whah are the name of each industry and the number of companies in that industry?\nAdditional table information: table: company_office", "question": "SELECT Industry, COUNT(*) FROM Companies GROUP BY Industry"} +{"answer": "Please show the industries of companies in descending order of the number of companies.\nAdditional table information: table: company_office", "question": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC"} +{"answer": "Sort all the industries in descending order of the count of companies in each industry\nAdditional table information: table: company_office", "question": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC"} +{"answer": "List the industry shared by the most companies.\nAdditional table information: table: company_office", "question": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which industry has the most companies?\nAdditional table information: table: company_office", "question": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the names of buildings that have no company office.\nAdditional table information: table: company_office", "question": "SELECT name FROM buildings WHERE NOT id IN (SELECT building_id FROM Office_locations)"} +{"answer": "Which buildings do not have any company office? Give me the building names.\nAdditional table information: table: company_office", "question": "SELECT name FROM buildings WHERE NOT id IN (SELECT building_id FROM Office_locations)"} +{"answer": "Show the industries shared by companies whose headquarters are 'USA' and companies whose headquarters are 'China'.\nAdditional table information: table: company_office", "question": "SELECT Industry FROM Companies WHERE Headquarters = 'USA' INTERSECT SELECT Industry FROM Companies WHERE Headquarters = 'China'"} +{"answer": "Which industries have both companies with headquarter in 'USA' and companies with headquarter in 'China'?\nAdditional table information: table: company_office", "question": "SELECT Industry FROM Companies WHERE Headquarters = 'USA' INTERSECT SELECT Industry FROM Companies WHERE Headquarters = 'China'"} +{"answer": "Find the number of companies whose industry is 'Banking' or 'Conglomerate',\nAdditional table information: table: company_office", "question": "SELECT COUNT(*) FROM Companies WHERE Industry = 'Banking' OR Industry = 'Conglomerate'"} +{"answer": "How many companies are in either 'Banking' industry or 'Conglomerate' industry?\nAdditional table information: table: company_office", "question": "SELECT COUNT(*) FROM Companies WHERE Industry = 'Banking' OR Industry = 'Conglomerate'"} +{"answer": "Show the headquarters shared by more than two companies.\nAdditional table information: table: company_office", "question": "SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2"} +{"answer": "Which headquarter locations are used by more than 2 companies?\nAdditional table information: table: company_office", "question": "SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2"} +{"answer": "How many products are there?\nAdditional table information: table: solvency_ii", "question": "SELECT COUNT(*) FROM Products"} +{"answer": "List the name of products in ascending order of price.\nAdditional table information: table: solvency_ii", "question": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC NULLS FIRST"} +{"answer": "What are the names and type codes of products?\nAdditional table information: table: solvency_ii", "question": "SELECT Product_Name, Product_Type_Code FROM Products"} +{"answer": "Show the prices of the products named 'Dining' or 'Trading Policy'.\nAdditional table information: table: solvency_ii", "question": "SELECT Product_Price FROM Products WHERE Product_Name = 'Dining' OR Product_Name = 'Trading Policy'"} +{"answer": "What is the average price for products?\nAdditional table information: table: solvency_ii", "question": "SELECT AVG(Product_Price) FROM Products"} +{"answer": "What is the name of the product with the highest price?\nAdditional table information: table: solvency_ii", "question": "SELECT Product_Name FROM Products ORDER BY Product_Price DESC LIMIT 1"} +{"answer": "Show different type codes of products and the number of products with each type code.\nAdditional table information: table: solvency_ii", "question": "SELECT Product_Type_Code, COUNT(*) FROM Products GROUP BY Product_Type_Code"} +{"answer": "Show the most common type code across products.\nAdditional table information: table: solvency_ii", "question": "SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the product type codes that have at least two products.\nAdditional table information: table: solvency_ii", "question": "SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code HAVING COUNT(*) >= 2"} +{"answer": "Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000.\nAdditional table information: table: solvency_ii", "question": "SELECT Product_Type_Code FROM Products WHERE Product_Price > 4500 INTERSECT SELECT Product_Type_Code FROM Products WHERE Product_Price < 3000"} +{"answer": "Show the names of products and the number of events they are in.\nAdditional table information: table: solvency_ii", "question": "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"} +{"answer": "Show the names of products and the number of events they are in, sorted by the number of events in descending order.\nAdditional table information: table: solvency_ii", "question": "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"} +{"answer": "Show the names of products that are in at least two events.\nAdditional table information: table: solvency_ii", "question": "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"} +{"answer": "Show the names of products that are in at least two events in ascending alphabetical order of product name.\nAdditional table information: table: solvency_ii", "question": "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 NULLS FIRST"} +{"answer": "List the names of products that are not in any event.\nAdditional table information: table: solvency_ii", "question": "SELECT Product_Name FROM Products WHERE NOT Product_ID IN (SELECT Product_ID FROM Products_in_Events)"} +{"answer": "How many artworks are there?\nAdditional table information: table: entertainment_awards", "question": "SELECT COUNT(*) FROM artwork"} +{"answer": "List the name of artworks in ascending alphabetical order.\nAdditional table information: table: entertainment_awards", "question": "SELECT Name FROM artwork ORDER BY Name ASC NULLS FIRST"} +{"answer": "List the name of artworks whose type is not 'Program Talent Show'.\nAdditional table information: table: entertainment_awards", "question": "SELECT Name FROM artwork WHERE TYPE <> 'Program Talent Show'"} +{"answer": "What are the names and locations of festivals?\nAdditional table information: table: entertainment_awards", "question": "SELECT Festival_Name, LOCATION FROM festival_detail"} +{"answer": "What are the names of the chairs of festivals, sorted in ascending order of the year held?\nAdditional table information: table: entertainment_awards", "question": "SELECT Chair_Name FROM festival_detail ORDER BY YEAR ASC NULLS FIRST"} +{"answer": "What is the location of the festival with the largest number of audience?\nAdditional table information: table: entertainment_awards", "question": "SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1"} +{"answer": "What are the names of festivals held in year 2007?\nAdditional table information: table: entertainment_awards", "question": "SELECT Festival_Name FROM festival_detail WHERE YEAR = 2007"} +{"answer": "What is the average number of audience for festivals?\nAdditional table information: table: entertainment_awards", "question": "SELECT AVG(Num_of_Audience) FROM festival_detail"} +{"answer": "Show the names of the three most recent festivals.\nAdditional table information: table: entertainment_awards", "question": "SELECT Festival_Name FROM festival_detail ORDER BY YEAR DESC LIMIT 3"} +{"answer": "For each nomination, show the name of the artwork and name of the festival where it is nominated.\nAdditional table information: table: entertainment_awards", "question": "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"} +{"answer": "Show distinct types of artworks that are nominated in festivals in 2007.\nAdditional table information: table: entertainment_awards", "question": "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"} +{"answer": "Show the names of artworks in ascending order of the year they are nominated in.\nAdditional table information: table: entertainment_awards", "question": "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 NULLS FIRST"} +{"answer": "Show the names of festivals that have nominated artworks of type 'Program Talent Show'.\nAdditional table information: table: entertainment_awards", "question": "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'"} +{"answer": "Show the ids and names of festivals that have at least two nominations for artworks.\nAdditional table information: table: entertainment_awards", "question": "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"} +{"answer": "Show the id, name of each festival and the number of artworks it has nominated.\nAdditional table information: table: entertainment_awards", "question": "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"} +{"answer": "Please show different types of artworks with the corresponding number of artworks of each type.\nAdditional table information: table: entertainment_awards", "question": "SELECT TYPE, COUNT(*) FROM artwork GROUP BY TYPE"} +{"answer": "List the most common type of artworks.\nAdditional table information: table: entertainment_awards", "question": "SELECT TYPE FROM artwork GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the year in which there are more than one festivals.\nAdditional table information: table: entertainment_awards", "question": "SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*) > 1"} +{"answer": "List the name of artworks that are not nominated.\nAdditional table information: table: entertainment_awards", "question": "SELECT Name FROM Artwork WHERE NOT Artwork_ID IN (SELECT Artwork_ID FROM nomination)"} +{"answer": "Show the number of audience in year 2008 or 2010.\nAdditional table information: table: entertainment_awards", "question": "SELECT Num_of_Audience FROM festival_detail WHERE YEAR = 2008 OR YEAR = 2010"} +{"answer": "What are the total number of the audiences who visited any of the festivals?\nAdditional table information: table: entertainment_awards", "question": "SELECT SUM(Num_of_Audience) FROM festival_detail"} +{"answer": "In which year are there festivals both inside the 'United States' and outside the 'United States'?\nAdditional table information: table: entertainment_awards", "question": "SELECT YEAR FROM festival_detail WHERE LOCATION = 'United States' INTERSECT SELECT YEAR FROM festival_detail WHERE LOCATION <> 'United States'"} +{"answer": "How many premises are there?\nAdditional table information: table: customers_campaigns_ecommerce", "question": "SELECT COUNT(*) FROM premises"} +{"answer": "What are all the distinct premise types?\nAdditional table information: table: customers_campaigns_ecommerce", "question": "SELECT DISTINCT premises_type FROM premises"} +{"answer": "Find the types and details for all premises and order by the premise type.\nAdditional table information: table: customers_campaigns_ecommerce", "question": "SELECT premises_type, premise_details FROM premises ORDER BY premises_type NULLS FIRST"} +{"answer": "Show each premise type and the number of premises in that type.\nAdditional table information: table: customers_campaigns_ecommerce", "question": "SELECT premises_type, COUNT(*) FROM premises GROUP BY premises_type"} +{"answer": "Show all distinct product categories along with the number of mailshots in each category.\nAdditional table information: table: customers_campaigns_ecommerce", "question": "SELECT product_category, COUNT(*) FROM mailshot_campaigns GROUP BY product_category"} +{"answer": "Show the name and phone of the customer without any mailshot.\nAdditional table information: table: customers_campaigns_ecommerce", "question": "SELECT customer_name, customer_phone FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM mailshot_customers)"} +{"answer": "Show the name and phone for customers with a mailshot with outcome code 'No Response'.\nAdditional table information: table: customers_campaigns_ecommerce", "question": "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'"} +{"answer": "Show the outcome code of mailshots along with the number of mailshots in each outcome code.\nAdditional table information: table: customers_campaigns_ecommerce", "question": "SELECT outcome_code, COUNT(*) FROM mailshot_customers GROUP BY outcome_code"} +{"answer": "Show the names of customers who have at least 2 mailshots with outcome code 'Order'.\nAdditional table information: table: customers_campaigns_ecommerce", "question": "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"} +{"answer": "Show the names of customers who have the most mailshots.\nAdditional table information: table: customers_campaigns_ecommerce", "question": "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"} +{"answer": "What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome.\nAdditional table information: table: customers_campaigns_ecommerce", "question": "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'"} +{"answer": "Show the premise type and address type code for all customer addresses.\nAdditional table information: table: customers_campaigns_ecommerce", "question": "SELECT T2.premises_type, T1.address_type_code FROM customer_addresses AS T1 JOIN premises AS T2 ON T1.premise_id = T2.premise_id"} +{"answer": "What are the distinct address type codes for all customer addresses?\nAdditional table information: table: customers_campaigns_ecommerce", "question": "SELECT DISTINCT address_type_code FROM customer_addresses"} +{"answer": "Show the shipping charge and customer id for customer orders with order status Cancelled or Paid.\nAdditional table information: table: customers_campaigns_ecommerce", "question": "SELECT order_shipping_charges, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' OR order_status_code = 'Paid'"} +{"answer": "Show the names of customers having an order with shipping method FedEx and order status Paid.\nAdditional table information: table: customers_campaigns_ecommerce", "question": "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'"} +{"answer": "How many courses are there in total?\nAdditional table information: table: college_3", "question": "SELECT COUNT(*) FROM COURSE"} +{"answer": "Count the number of courses.\nAdditional table information: table: college_3", "question": "SELECT COUNT(*) FROM COURSE"} +{"answer": "How many courses have more than 2 credits?\nAdditional table information: table: college_3", "question": "SELECT COUNT(*) FROM COURSE WHERE Credits > 2"} +{"answer": "Count the number of courses with more than 2 credits.\nAdditional table information: table: college_3", "question": "SELECT COUNT(*) FROM COURSE WHERE Credits > 2"} +{"answer": "List all names of courses with 1 credit?\nAdditional table information: table: college_3", "question": "SELECT CName FROM COURSE WHERE Credits = 1"} +{"answer": "What are the names of courses with 1 credit?\nAdditional table information: table: college_3", "question": "SELECT CName FROM COURSE WHERE Credits = 1"} +{"answer": "Which courses are taught on days MTW?\nAdditional table information: table: college_3", "question": "SELECT CName FROM COURSE WHERE Days = 'MTW'"} +{"answer": "What are the course names for courses taught on MTW?\nAdditional table information: table: college_3", "question": "SELECT CName FROM COURSE WHERE Days = 'MTW'"} +{"answer": "What is the number of departments in Division 'AS'?\nAdditional table information: table: college_3", "question": "SELECT COUNT(*) FROM DEPARTMENT WHERE Division = 'AS'"} +{"answer": "How many departments are in the division AS?\nAdditional table information: table: college_3", "question": "SELECT COUNT(*) FROM DEPARTMENT WHERE Division = 'AS'"} +{"answer": "What are the phones of departments in Room 268?\nAdditional table information: table: college_3", "question": "SELECT DPhone FROM DEPARTMENT WHERE Room = 268"} +{"answer": "Give the phones for departments in room 268.\nAdditional table information: table: college_3", "question": "SELECT DPhone FROM DEPARTMENT WHERE Room = 268"} +{"answer": "Find the number of students that have at least one grade 'B'.\nAdditional table information: table: college_3", "question": "SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = 'B'"} +{"answer": "How many students have had at least one 'B' grade?\nAdditional table information: table: college_3", "question": "SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = 'B'"} +{"answer": "Find the max and min grade point for all letter grade.\nAdditional table information: table: college_3", "question": "SELECT MAX(gradepoint), MIN(gradepoint) FROM GRADECONVERSION"} +{"answer": "What are the maximum and minumum grade points?\nAdditional table information: table: college_3", "question": "SELECT MAX(gradepoint), MIN(gradepoint) FROM GRADECONVERSION"} +{"answer": "Find the first names of students whose first names contain letter 'a'.\nAdditional table information: table: college_3", "question": "SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'"} +{"answer": "What are the first names for students who have an 'a' in their first name?\nAdditional table information: table: college_3", "question": "SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'"} +{"answer": "Find the first names and last names of male (sex is M) faculties who live in building NEB.\nAdditional table information: table: college_3", "question": "SELECT Fname, Lname FROM FACULTY WHERE sex = 'M' AND Building = 'NEB'"} +{"answer": "What are the full names of faculties with sex M and who live in building NEB?\nAdditional table information: table: college_3", "question": "SELECT Fname, Lname FROM FACULTY WHERE sex = 'M' AND Building = 'NEB'"} +{"answer": "Find the rooms of faculties with rank professor who live in building NEB.\nAdditional table information: table: college_3", "question": "SELECT Room FROM FACULTY WHERE Rank = 'Professor' AND Building = 'NEB'"} +{"answer": "What are the rooms for members of the faculty who are professors and who live in building NEB?\nAdditional table information: table: college_3", "question": "SELECT Room FROM FACULTY WHERE Rank = 'Professor' AND Building = 'NEB'"} +{"answer": "Find the department name that is in Building 'Mergenthaler'.\nAdditional table information: table: college_3", "question": "SELECT DName FROM DEPARTMENT WHERE Building = 'Mergenthaler'"} +{"answer": "What is the name of the department in the Building Mergenthaler?\nAdditional table information: table: college_3", "question": "SELECT DName FROM DEPARTMENT WHERE Building = 'Mergenthaler'"} +{"answer": "List all information about courses sorted by credits in the ascending order.\nAdditional table information: table: college_3", "question": "SELECT * FROM COURSE ORDER BY Credits NULLS FIRST"} +{"answer": "What is all the information about courses, ordered by credits ascending?\nAdditional table information: table: college_3", "question": "SELECT * FROM COURSE ORDER BY Credits NULLS FIRST"} +{"answer": "List the course name of courses sorted by credits.\nAdditional table information: table: college_3", "question": "SELECT CName FROM COURSE ORDER BY Credits NULLS FIRST"} +{"answer": "What are the course names, ordered by credits?\nAdditional table information: table: college_3", "question": "SELECT CName FROM COURSE ORDER BY Credits NULLS FIRST"} +{"answer": "Find the first name of students in the descending order of age.\nAdditional table information: table: college_3", "question": "SELECT Fname FROM STUDENT ORDER BY Age DESC"} +{"answer": "What are the first names of students, ordered by age from greatest to least?\nAdditional table information: table: college_3", "question": "SELECT Fname FROM STUDENT ORDER BY Age DESC"} +{"answer": "Find the last name of female (sex is F) students in the descending order of age.\nAdditional table information: table: college_3", "question": "SELECT LName FROM STUDENT WHERE Sex = 'F' ORDER BY Age DESC"} +{"answer": "What are the last names of female students, ordered by age descending?\nAdditional table information: table: college_3", "question": "SELECT LName FROM STUDENT WHERE Sex = 'F' ORDER BY Age DESC"} +{"answer": "Find the last names of faculties in building Barton in alphabetic order.\nAdditional table information: table: college_3", "question": "SELECT Lname FROM FACULTY WHERE Building = 'Barton' ORDER BY Lname NULLS FIRST"} +{"answer": "What are the last names of faculty in building Barton, sorted by last name?\nAdditional table information: table: college_3", "question": "SELECT Lname FROM FACULTY WHERE Building = 'Barton' ORDER BY Lname NULLS FIRST"} +{"answer": "Find the first names of faculties of rank Professor in alphabetic order.\nAdditional table information: table: college_3", "question": "SELECT Fname FROM FACULTY WHERE Rank = 'Professor' ORDER BY Fname NULLS FIRST"} +{"answer": "What are the first names for all faculty professors, ordered by first name?\nAdditional table information: table: college_3", "question": "SELECT Fname FROM FACULTY WHERE Rank = 'Professor' ORDER BY Fname NULLS FIRST"} +{"answer": "Find the name of the department that has the biggest number of students minored in?\nAdditional table information: table: college_3", "question": "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"} +{"answer": "What is the name of the department with the most students minoring in it?\nAdditional table information: table: college_3", "question": "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"} +{"answer": "Find the name of the department that has no students minored in?\nAdditional table information: table: college_3", "question": "SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO"} +{"answer": "What is the name of the department htat has no students minoring in it?\nAdditional table information: table: college_3", "question": "SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO"} +{"answer": "Find the name of the department that has the fewest members.\nAdditional table information: table: college_3", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the name of the department with the fewest members?\nAdditional table information: table: college_3", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Find the rank of the faculty that the fewest faculties belong to.\nAdditional table information: table: college_3", "question": "SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "What is the least common faculty rank?\nAdditional table information: table: college_3", "question": "SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "What are the first and last names of the instructors who teach the top 3 number of courses?\nAdditional table information: table: college_3", "question": "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"} +{"answer": "What are the full names of the 3 instructors who teach the most courses?\nAdditional table information: table: college_3", "question": "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"} +{"answer": "Which building does the instructor who teaches the most number of courses live in?\nAdditional table information: table: college_3", "question": "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"} +{"answer": "Give the building that the instructor who teaches the greatest number of courses lives in.\nAdditional table information: table: college_3", "question": "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"} +{"answer": "What are the name of courses that have at least five enrollments?\nAdditional table information: table: college_3", "question": "SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID HAVING COUNT(*) >= 5"} +{"answer": "Give the names of the courses with at least five enrollments.\nAdditional table information: table: college_3", "question": "SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID HAVING COUNT(*) >= 5"} +{"answer": "Find the first name and last name of the instructor of course that has course name\nAdditional table information: table: college_3", "question": "SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = 'COMPUTER LITERACY'"} +{"answer": "What is the full name of the instructor who has a course named COMPUTER LITERACY?\nAdditional table information: table: college_3", "question": "SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = 'COMPUTER LITERACY'"} +{"answer": "Find the department name and room of the course INTRODUCTION TO COMPUTER SCIENCE.\nAdditional table information: table: college_3", "question": "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'"} +{"answer": "What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE?\nAdditional table information: table: college_3", "question": "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'"} +{"answer": "Find the student first and last names and grade points of all enrollments.\nAdditional table information: table: college_3", "question": "SELECT T3.Fname, T3.LName, T2.gradepoint FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID"} +{"answer": "What are the full names and gradepoints for all enrollments?\nAdditional table information: table: college_3", "question": "SELECT T3.Fname, T3.LName, T2.gradepoint FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID"} +{"answer": "Find the distinct student first names of all students that have grade point at least 3.8 in one course.\nAdditional table information: table: college_3", "question": "SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T2.gradepoint >= 3.8"} +{"answer": "What are the distinct first names for students with a grade point of 3.8 or above in at least one course?\nAdditional table information: table: college_3", "question": "SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T2.gradepoint >= 3.8"} +{"answer": "Find the full names of faculties who are members of department with department number 520.\nAdditional table information: table: college_3", "question": "SELECT T1.Fname, T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520"} +{"answer": "What are the full names of faculty members who are a part of department 520?\nAdditional table information: table: college_3", "question": "SELECT T1.Fname, T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520"} +{"answer": "What are the first names and last names of the students that minor in the department with DNO 140.\nAdditional table information: table: college_3", "question": "SELECT T2.Fname, T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140"} +{"answer": "What are the full names of students minoring in department 140?\nAdditional table information: table: college_3", "question": "SELECT T2.Fname, T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140"} +{"answer": "Find the last names of faculties who are members of computer science department.\nAdditional table information: table: college_3", "question": "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'"} +{"answer": "What are the last names of faculty who are part of the computer science department?\nAdditional table information: table: college_3", "question": "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'"} +{"answer": "Find the average grade point of student whose last name is Smith.\nAdditional table information: table: college_3", "question": "SELECT AVG(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = 'Smith'"} +{"answer": "What is the average gradepoint for students with the last name Smith?\nAdditional table information: table: college_3", "question": "SELECT AVG(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = 'Smith'"} +{"answer": "What is the maximum and minimum grade point of students who live in NYC?\nAdditional table information: table: college_3", "question": "SELECT MAX(T2.gradepoint), MIN(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = 'NYC'"} +{"answer": "Give the maximum and minimum gradepoints for students living in NYC?\nAdditional table information: table: college_3", "question": "SELECT MAX(T2.gradepoint), MIN(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = 'NYC'"} +{"answer": "Find the names of courses that have either 3 credits or 1 credit but 4 hours.\nAdditional table information: table: college_3", "question": "SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4"} +{"answer": "What are the names of courses that give either 3 credits, or 1 credit and 4 hours?\nAdditional table information: table: college_3", "question": "SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4"} +{"answer": "Find the names of departments that are either in division AS or in division EN and in Building NEB.\nAdditional table information: table: college_3", "question": "SELECT DName FROM DEPARTMENT WHERE Division = 'AS' UNION SELECT DName FROM DEPARTMENT WHERE Division = 'EN' AND Building = 'NEB'"} +{"answer": "What are the names of departments either in division AS, or in division EN and in building NEB?\nAdditional table information: table: college_3", "question": "SELECT DName FROM DEPARTMENT WHERE Division = 'AS' UNION SELECT DName FROM DEPARTMENT WHERE Division = 'EN' AND Building = 'NEB'"} +{"answer": "Find the first name of students not enrolled in any course.\nAdditional table information: table: college_3", "question": "SELECT Fname FROM STUDENT WHERE NOT StuID IN (SELECT StuID FROM ENROLLED_IN)"} +{"answer": "What are the first names of all students that are not enrolled in courses?\nAdditional table information: table: college_3", "question": "SELECT Fname FROM STUDENT WHERE NOT StuID IN (SELECT StuID FROM ENROLLED_IN)"} +{"answer": "What are the ids of the top three products that were purchased in the largest amount?\nAdditional table information: table: department_store", "question": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3"} +{"answer": "Give the ids of the three products purchased in the largest amounts.\nAdditional table information: table: department_store", "question": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3"} +{"answer": "What are the product id and product type of the cheapest product?\nAdditional table information: table: department_store", "question": "SELECT product_id, product_type_code FROM products ORDER BY product_price NULLS FIRST LIMIT 1"} +{"answer": "Give the id and product type of the product with the lowest price.\nAdditional table information: table: department_store", "question": "SELECT product_id, product_type_code FROM products ORDER BY product_price NULLS FIRST LIMIT 1"} +{"answer": "Find the number of different product types.\nAdditional table information: table: department_store", "question": "SELECT COUNT(DISTINCT product_type_code) FROM products"} +{"answer": "Count the number of distinct product types.\nAdditional table information: table: department_store", "question": "SELECT COUNT(DISTINCT product_type_code) FROM products"} +{"answer": "Return the address of customer 10.\nAdditional table information: table: department_store", "question": "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"} +{"answer": "What is the address for the customer with id 10?\nAdditional table information: table: department_store", "question": "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"} +{"answer": "What are the staff ids and genders of all staffs whose job title is Department Manager?\nAdditional table information: table: department_store", "question": "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'"} +{"answer": "Return the staff ids and genders for any staff with the title Department Manager.\nAdditional table information: table: department_store", "question": "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'"} +{"answer": "For each payment method, return how many customers use it.\nAdditional table information: table: department_store", "question": "SELECT payment_method_code, COUNT(*) FROM customers GROUP BY payment_method_code"} +{"answer": "How many customers use each payment method?\nAdditional table information: table: department_store", "question": "SELECT payment_method_code, COUNT(*) FROM customers GROUP BY payment_method_code"} +{"answer": "What is the id of the product that was ordered the most often?\nAdditional table information: table: department_store", "question": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Give the product id for the product that was ordered most frequently.\nAdditional table information: table: department_store", "question": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the name, phone number and email address of the customer who made the largest number of orders?\nAdditional table information: table: department_store", "question": "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"} +{"answer": "Return the name, phone number and email address for the customer with the most orders.\nAdditional table information: table: department_store", "question": "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"} +{"answer": "What is the average price for each type of product?\nAdditional table information: table: department_store", "question": "SELECT product_type_code, AVG(product_price) FROM products GROUP BY product_type_code"} +{"answer": "Return the average price for each product type.\nAdditional table information: table: department_store", "question": "SELECT product_type_code, AVG(product_price) FROM products GROUP BY product_type_code"} +{"answer": "How many department stores does the store chain South have?\nAdditional table information: table: department_store", "question": "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'"} +{"answer": "Count the number of stores the chain South has.\nAdditional table information: table: department_store", "question": "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'"} +{"answer": "What is the name and job title of the staff who was assigned the latest?\nAdditional table information: table: department_store", "question": "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"} +{"answer": "Return the name and job title of the staff with the latest date assigned.\nAdditional table information: table: department_store", "question": "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"} +{"answer": "Give me the product type, name and price for all the products supplied by supplier id 3.\nAdditional table information: table: department_store", "question": "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"} +{"answer": "Return the product type, name, and price for products supplied by supplier 3.\nAdditional table information: table: department_store", "question": "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"} +{"answer": "Return the distinct name of customers whose order status is Pending, in the order of customer id.\nAdditional table information: table: department_store", "question": "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 NULLS FIRST"} +{"answer": "What are the distinct names of customers with an order status of Pending, sorted by customer id?\nAdditional table information: table: department_store", "question": "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 NULLS FIRST"} +{"answer": "Find the name and address of the customers who have both New and Pending orders.\nAdditional table information: table: department_store", "question": "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'"} +{"answer": "What are the names and addressed of customers who have both New and Pending orders?\nAdditional table information: table: department_store", "question": "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'"} +{"answer": "Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products.\nAdditional table information: table: department_store", "question": "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)"} +{"answer": "What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products?\nAdditional table information: table: department_store", "question": "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)"} +{"answer": "What is the id and name of the department store that has both marketing and managing department?\nAdditional table information: table: department_store", "question": "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'"} +{"answer": "What are the ids and names of department stores with both marketing and managing departments?\nAdditional table information: table: department_store", "question": "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'"} +{"answer": "What are the ids of the two department store chains with the largest number of department stores?\nAdditional table information: table: department_store", "question": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY COUNT(*) DESC LIMIT 2"} +{"answer": "Return the ids of the two department store chains with the most department stores.\nAdditional table information: table: department_store", "question": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY COUNT(*) DESC LIMIT 2"} +{"answer": "What is the id of the department with the least number of staff?\nAdditional table information: table: department_store", "question": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "Return the id of the department with the fewest staff assignments.\nAdditional table information: table: department_store", "question": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "For each product type, return the maximum and minimum price.\nAdditional table information: table: department_store", "question": "SELECT product_type_code, MAX(product_price), MIN(product_price) FROM products GROUP BY product_type_code"} +{"answer": "What are the maximum and minimum product prices for each product type?\nAdditional table information: table: department_store", "question": "SELECT product_type_code, MAX(product_price), MIN(product_price) FROM products GROUP BY product_type_code"} +{"answer": "Find the product type whose average price is higher than the average price of all products.\nAdditional table information: table: department_store", "question": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING AVG(product_price) > (SELECT AVG(product_price) FROM products)"} +{"answer": "What is the code of the product type with an average price higher than the average price of all products?\nAdditional table information: table: department_store", "question": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING AVG(product_price) > (SELECT AVG(product_price) FROM products)"} +{"answer": "Find the id and name of the staff who has been assigned for the shortest period.\nAdditional table information: table: department_store", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the id and name of the staff who has been assigned for the least amount of time?\nAdditional table information: table: department_store", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Return the names and ids of all products whose price is between 600 and 700.\nAdditional table information: table: department_store", "question": "SELECT product_name, product_id FROM products WHERE product_price BETWEEN 600 AND 700"} +{"answer": "What are the names and ids of products costing between 600 and 700?\nAdditional table information: table: department_store", "question": "SELECT product_name, product_id FROM products WHERE product_price BETWEEN 600 AND 700"} +{"answer": "Find the ids of all distinct customers who made order after some orders that were Cancelled.\nAdditional table information: table: department_store", "question": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT MIN(order_date) FROM Customer_Orders WHERE order_status_code = 'Cancelled')"} +{"answer": "What are the distinct ids of customers who made an order after any order that was Cancelled?\nAdditional table information: table: department_store", "question": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT MIN(order_date) FROM Customer_Orders WHERE order_status_code = 'Cancelled')"} +{"answer": "What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?\nAdditional table information: table: department_store", "question": "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')"} +{"answer": "Return the id of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff.\nAdditional table information: table: department_store", "question": "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')"} +{"answer": "What are the names and ids of customers whose address contains TN?\nAdditional table information: table: department_store", "question": "SELECT customer_name, customer_id FROM customers WHERE customer_address LIKE '%TN%'"} +{"answer": "Return the names and ids of customers who have TN in their address.\nAdditional table information: table: department_store", "question": "SELECT customer_name, customer_id FROM customers WHERE customer_address LIKE '%TN%'"} +{"answer": "Return the name and gender of the staff who was assigned in 2016.\nAdditional table information: table: department_store", "question": "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%'"} +{"answer": "What are the names and genders of staff who were assigned in 2016?\nAdditional table information: table: department_store", "question": "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%'"} +{"answer": "List the name of staff who has been assigned multiple jobs.\nAdditional table information: table: department_store", "question": "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"} +{"answer": "What are the names of staff who have been assigned multiple jobs?\nAdditional table information: table: department_store", "question": "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"} +{"answer": "List the name and phone number of all suppliers in the alphabetical order of their addresses.\nAdditional table information: table: department_store", "question": "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 NULLS FIRST"} +{"answer": "What are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed?\nAdditional table information: table: department_store", "question": "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 NULLS FIRST"} +{"answer": "What are the phone numbers of all customers and suppliers.\nAdditional table information: table: department_store", "question": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers"} +{"answer": "Return the phone numbers for all customers and suppliers.\nAdditional table information: table: department_store", "question": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers"} +{"answer": "Return the ids of all products that were ordered more than three times or supplied more than 80000.\nAdditional table information: table: department_store", "question": "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"} +{"answer": "What are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000?\nAdditional table information: table: department_store", "question": "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"} +{"answer": "What are id and name of the products whose price is lower than 600 or higher than 900?\nAdditional table information: table: department_store", "question": "SELECT product_id, product_name FROM products WHERE product_price < 600 OR product_price > 900"} +{"answer": "Give the ids and names of products with price lower than 600 or higher than 900.\nAdditional table information: table: department_store", "question": "SELECT product_id, product_name FROM products WHERE product_price < 600 OR product_price > 900"} +{"answer": "Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.\nAdditional table information: table: department_store", "question": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000"} +{"answer": "What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000?\nAdditional table information: table: department_store", "question": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000"} +{"answer": "What are the average amount purchased and value purchased for the supplier who supplies the most products.\nAdditional table information: table: department_store", "question": "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)"} +{"answer": "Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products.\nAdditional table information: table: department_store", "question": "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)"} +{"answer": "What is the largest and smallest customer codes?\nAdditional table information: table: department_store", "question": "SELECT MAX(customer_code), MIN(customer_code) FROM Customers"} +{"answer": "Return the maximum and minimum customer codes.\nAdditional table information: table: department_store", "question": "SELECT MAX(customer_code), MIN(customer_code) FROM Customers"} +{"answer": "List the names of all the distinct customers who bought a keyboard.\nAdditional table information: table: department_store", "question": "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'"} +{"answer": "What are the distinct names of customers who have purchased a keyboard?\nAdditional table information: table: department_store", "question": "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'"} +{"answer": "List the names and phone numbers of all the distinct suppliers who supply red jeans.\nAdditional table information: table: department_store", "question": "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'"} +{"answer": "What are the distinct names and phone numbers for suppliers who have red jeans?\nAdditional table information: table: department_store", "question": "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'"} +{"answer": "What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type?\nAdditional table information: table: department_store", "question": "SELECT MAX(product_price), MIN(product_price), product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code NULLS FIRST"} +{"answer": "Give the maximum and minimum product prices for each product type, grouped and ordered by product type.\nAdditional table information: table: department_store", "question": "SELECT MAX(product_price), MIN(product_price), product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code NULLS FIRST"} +{"answer": "List the order id, customer id for orders in Cancelled status, ordered by their order dates.\nAdditional table information: table: department_store", "question": "SELECT order_id, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' ORDER BY order_date NULLS FIRST"} +{"answer": "What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates?\nAdditional table information: table: department_store", "question": "SELECT order_id, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' ORDER BY order_date NULLS FIRST"} +{"answer": "Find the names of products that were bought by at least two distinct customers.\nAdditional table information: table: department_store", "question": "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"} +{"answer": "What are the distinct names of products purchased by at least two different customers?\nAdditional table information: table: department_store", "question": "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"} +{"answer": "Find the names of customers who have bought by at least three distinct products.\nAdditional table information: table: department_store", "question": "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"} +{"answer": "What are the distinct names of customers who have purchased at least three different products?\nAdditional table information: table: department_store", "question": "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"} +{"answer": "Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff.\nAdditional table information: table: department_store", "question": "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'"} +{"answer": "What are the names and genders of staff who have held the title Sales Person, but never Clerical Staff?\nAdditional table information: table: department_store", "question": "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'"} +{"answer": "Find the id and name of customers whose address contains WY state and do not use credit card for payment.\nAdditional table information: table: department_store", "question": "SELECT customer_id, customer_name FROM customers WHERE customer_address LIKE '%WY%' AND payment_method_code <> 'Credit Card'"} +{"answer": "What are the ids and names of customers with addressed that contain WY and who do not use a credit card for payment?\nAdditional table information: table: department_store", "question": "SELECT customer_id, customer_name FROM customers WHERE customer_address LIKE '%WY%' AND payment_method_code <> 'Credit Card'"} +{"answer": "Find the average price of all product clothes.\nAdditional table information: table: department_store", "question": "SELECT AVG(product_price) FROM products WHERE product_type_code = 'Clothes'"} +{"answer": "What is the average price of clothes?\nAdditional table information: table: department_store", "question": "SELECT AVG(product_price) FROM products WHERE product_type_code = 'Clothes'"} +{"answer": "Find the name of the most expensive hardware product.\nAdditional table information: table: department_store", "question": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1"} +{"answer": "What is the name of the hardware product with the greatest price?\nAdditional table information: table: department_store", "question": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1"} +{"answer": "How many aircrafts are there?\nAdditional table information: table: aircraft", "question": "SELECT COUNT(*) FROM aircraft"} +{"answer": "What is the number of aircraft?\nAdditional table information: table: aircraft", "question": "SELECT COUNT(*) FROM aircraft"} +{"answer": "List the description of all aircrafts.\nAdditional table information: table: aircraft", "question": "SELECT Description FROM aircraft"} +{"answer": "What are the descriptions for the aircrafts?\nAdditional table information: table: aircraft", "question": "SELECT Description FROM aircraft"} +{"answer": "What is the average number of international passengers of all airports?\nAdditional table information: table: aircraft", "question": "SELECT AVG(International_Passengers) FROM airport"} +{"answer": "What is the average number of international passengers for an airport?\nAdditional table information: table: aircraft", "question": "SELECT AVG(International_Passengers) FROM airport"} +{"answer": "What are the number of international and domestic passengers of the airport named London 'Heathrow'?\nAdditional table information: table: aircraft", "question": "SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = 'London Heathrow'"} +{"answer": "How many international and domestic passengers are there in the airport London Heathrow?\nAdditional table information: table: aircraft", "question": "SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = 'London Heathrow'"} +{"answer": "What are the total number of Domestic Passengers of airports that contain the word 'London'.\nAdditional table information: table: aircraft", "question": "SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE '%London%'"} +{"answer": "What are the total number of domestic passengers at all London airports?\nAdditional table information: table: aircraft", "question": "SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE '%London%'"} +{"answer": "What are the maximum and minimum number of transit passengers of all aiports.\nAdditional table information: table: aircraft", "question": "SELECT MAX(Transit_Passengers), MIN(Transit_Passengers) FROM airport"} +{"answer": "What is the maximum and mininum number of transit passengers for all airports?\nAdditional table information: table: aircraft", "question": "SELECT MAX(Transit_Passengers), MIN(Transit_Passengers) FROM airport"} +{"answer": "What are the name of pilots aged 25 or older?\nAdditional table information: table: aircraft", "question": "SELECT Name FROM pilot WHERE Age >= 25"} +{"answer": "what is the name of every pilot who is at least 25 years old?\nAdditional table information: table: aircraft", "question": "SELECT Name FROM pilot WHERE Age >= 25"} +{"answer": "List all pilot names in ascending alphabetical order.\nAdditional table information: table: aircraft", "question": "SELECT Name FROM pilot ORDER BY Name ASC NULLS FIRST"} +{"answer": "What are the names of the pilots in alphabetical order?\nAdditional table information: table: aircraft", "question": "SELECT Name FROM pilot ORDER BY Name ASC NULLS FIRST"} +{"answer": "List names of all pilot aged 30 or younger in descending alphabetical order.\nAdditional table information: table: aircraft", "question": "SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC"} +{"answer": "What are the names of all pilots 30 years old or young in descending alphabetical order?\nAdditional table information: table: aircraft", "question": "SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC"} +{"answer": "Please show the names of aircrafts associated with airport with name 'London Gatwick'.\nAdditional table information: table: aircraft", "question": "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'"} +{"answer": "What are the names of all the aircrafts associated with London Gatwick airport?\nAdditional table information: table: aircraft", "question": "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'"} +{"answer": "Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.\nAdditional table information: table: aircraft", "question": "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"} +{"answer": "What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?\nAdditional table information: table: aircraft", "question": "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"} +{"answer": "What is the average total number of passengers of airports that are associated with aircraft 'Robinson R-22'?\nAdditional table information: table: aircraft", "question": "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'"} +{"answer": "What is the average total number of passengers for all airports that the aircraft 'Robinson R-22' visits?\nAdditional table information: table: aircraft", "question": "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'"} +{"answer": "Please list the location and the winning aircraft name.\nAdditional table information: table: aircraft", "question": "SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft"} +{"answer": "What is the location and name of the winning aircraft?\nAdditional table information: table: aircraft", "question": "SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft"} +{"answer": "List the name of the aircraft that has been named winning aircraft the most number of times.\nAdditional table information: table: aircraft", "question": "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"} +{"answer": "What is the name of the aircraft that has won an award the most?\nAdditional table information: table: aircraft", "question": "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"} +{"answer": "List the names of aircrafts and the number of times it won matches.\nAdditional table information: table: aircraft", "question": "SELECT T1.Aircraft, COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft"} +{"answer": "For each aircraft that has won an award, what is its name and how many time has it won?\nAdditional table information: table: aircraft", "question": "SELECT T1.Aircraft, COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft"} +{"answer": "List names of all pilot in descending order of age.\nAdditional table information: table: aircraft", "question": "SELECT Name FROM pilot ORDER BY Age DESC"} +{"answer": "What are the names of all pilots listed by descending age?\nAdditional table information: table: aircraft", "question": "SELECT Name FROM pilot ORDER BY Age DESC"} +{"answer": "List the names of aircrafts and that won matches at least twice.\nAdditional table information: table: aircraft", "question": "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"} +{"answer": "What are the names of all aircrafts that have won a match at least twice?\nAdditional table information: table: aircraft", "question": "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"} +{"answer": "List the names of aircrafts and that did not win any match.\nAdditional table information: table: aircraft", "question": "SELECT Aircraft FROM aircraft WHERE NOT Aircraft_ID IN (SELECT Winning_Aircraft FROM MATCH)"} +{"answer": "What are the names of all aicrafts that have never won any match?\nAdditional table information: table: aircraft", "question": "SELECT Aircraft FROM aircraft WHERE NOT Aircraft_ID IN (SELECT Winning_Aircraft FROM MATCH)"} +{"answer": "Show the names of aircrafts that are associated with both an airport named 'London Heathrow' and an airport named 'London Gatwick'\nAdditional table information: table: aircraft", "question": "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'"} +{"answer": "What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports?\nAdditional table information: table: aircraft", "question": "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'"} +{"answer": "Show all information on the airport that has the largest number of international passengers.\nAdditional table information: table: aircraft", "question": "SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1"} +{"answer": "What is all the information on the airport with the largest number of international passengers?\nAdditional table information: table: aircraft", "question": "SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1"} +{"answer": "find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.\nAdditional table information: table: aircraft", "question": "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"} +{"answer": "What is the name and age of the pilot younger than 30 who has won the most number of times?\nAdditional table information: table: aircraft", "question": "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"} +{"answer": "what is the name and age of the youngest winning pilot?\nAdditional table information: table: aircraft", "question": "SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age NULLS FIRST LIMIT 1"} +{"answer": "How old is the youngest winning pilot and what is their name?\nAdditional table information: table: aircraft", "question": "SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age NULLS FIRST LIMIT 1"} +{"answer": "find the name of pilots who did not win the matches held in the country of Australia.\nAdditional table information: table: aircraft", "question": "SELECT name FROM pilot WHERE NOT pilot_id IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')"} +{"answer": "What are the names of the pilots that have not won any matches in Australia?\nAdditional table information: table: aircraft", "question": "SELECT name FROM pilot WHERE NOT pilot_id IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')"} +{"answer": "How many residents does each property have? List property id and resident count.\nAdditional table information: table: local_govt_and_lot", "question": "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"} +{"answer": "What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'?\nAdditional table information: table: local_govt_and_lot", "question": "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'"} +{"answer": "How many services has each resident requested? List the resident id, details, and the count in descending order of the count.\nAdditional table information: table: local_govt_and_lot", "question": "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"} +{"answer": "What is the maximum number that a certain service is provided? List the service id, details and number.\nAdditional table information: table: local_govt_and_lot", "question": "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"} +{"answer": "List the id and type of each thing, and the details of the organization that owns it.\nAdditional table information: table: local_govt_and_lot", "question": "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"} +{"answer": "What are the id and details of the customers who have at least 3 events?\nAdditional table information: table: local_govt_and_lot", "question": "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"} +{"answer": "What is each customer's move in date, and the corresponding customer id and details?\nAdditional table information: table: local_govt_and_lot", "question": "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"} +{"answer": "Which events have the number of notes between one and three? List the event id and the property id.\nAdditional table information: table: local_govt_and_lot", "question": "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"} +{"answer": "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'\nAdditional table information: table: local_govt_and_lot", "question": "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'"} +{"answer": "How many distinct locations have the things with service detail 'Unsatisfied' been located in?\nAdditional table information: table: local_govt_and_lot", "question": "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'"} +{"answer": "How many different status codes of things are there?\nAdditional table information: table: local_govt_and_lot", "question": "SELECT COUNT(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things"} +{"answer": "Which organizations are not a parent organization of others? List the organization id.\nAdditional table information: table: local_govt_and_lot", "question": "SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations"} +{"answer": "When is the last day any resident moved in?\nAdditional table information: table: local_govt_and_lot", "question": "SELECT MAX(date_moved_in) FROM Residents"} +{"answer": "What are the resident details containing the substring 'Miss'?\nAdditional table information: table: local_govt_and_lot", "question": "SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'"} +{"answer": "List the customer event id and the corresponding move in date and property id.\nAdditional table information: table: local_govt_and_lot", "question": "SELECT customer_event_id, date_moved_in, property_id FROM customer_events"} +{"answer": "How many customers did not have any event?\nAdditional table information: table: local_govt_and_lot", "question": "SELECT COUNT(*) FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM customer_events)"} +{"answer": "What are the distinct move in dates of the residents?\nAdditional table information: table: local_govt_and_lot", "question": "SELECT DISTINCT date_moved_in FROM residents"} +{"answer": "How many schools are there?\nAdditional table information: table: school_player", "question": "SELECT COUNT(*) FROM school"} +{"answer": "Count the number of schools.\nAdditional table information: table: school_player", "question": "SELECT COUNT(*) FROM school"} +{"answer": "List the locations of schools in ascending order of enrollment.\nAdditional table information: table: school_player", "question": "SELECT LOCATION FROM school ORDER BY Enrollment ASC NULLS FIRST"} +{"answer": "What is the list of school locations sorted in ascending order of school enrollment?\nAdditional table information: table: school_player", "question": "SELECT LOCATION FROM school ORDER BY Enrollment ASC NULLS FIRST"} +{"answer": "List the locations of schools in descending order of founded year.\nAdditional table information: table: school_player", "question": "SELECT LOCATION FROM school ORDER BY Founded DESC"} +{"answer": "What is the list of school locations sorted in descending order of school foundation year?\nAdditional table information: table: school_player", "question": "SELECT LOCATION FROM school ORDER BY Founded DESC"} +{"answer": "What are the enrollments of schools whose denomination is not 'Catholic'?\nAdditional table information: table: school_player", "question": "SELECT Enrollment FROM school WHERE Denomination <> 'Catholic'"} +{"answer": "List the enrollment for each school that does not have 'Catholic' as denomination.\nAdditional table information: table: school_player", "question": "SELECT Enrollment FROM school WHERE Denomination <> 'Catholic'"} +{"answer": "What is the average enrollment of schools?\nAdditional table information: table: school_player", "question": "SELECT AVG(Enrollment) FROM school"} +{"answer": "Take the average of the school enrollment.\nAdditional table information: table: school_player", "question": "SELECT AVG(Enrollment) FROM school"} +{"answer": "What are the teams of the players, sorted in ascending alphabetical order?\nAdditional table information: table: school_player", "question": "SELECT Team FROM player ORDER BY Team ASC NULLS FIRST"} +{"answer": "Find the team of each player and sort them in ascending alphabetical order.\nAdditional table information: table: school_player", "question": "SELECT Team FROM player ORDER BY Team ASC NULLS FIRST"} +{"answer": "How many different positions of players are there?\nAdditional table information: table: school_player", "question": "SELECT COUNT(DISTINCT POSITION) FROM player"} +{"answer": "Count the number of distinct player positions.\nAdditional table information: table: school_player", "question": "SELECT COUNT(DISTINCT POSITION) FROM player"} +{"answer": "Find the team of the player of the highest age.\nAdditional table information: table: school_player", "question": "SELECT Team FROM player ORDER BY Age DESC LIMIT 1"} +{"answer": "Which team has the oldest player?\nAdditional table information: table: school_player", "question": "SELECT Team FROM player ORDER BY Age DESC LIMIT 1"} +{"answer": "List the teams of the players with the top 5 largest ages.\nAdditional table information: table: school_player", "question": "SELECT Team FROM player ORDER BY Age DESC LIMIT 5"} +{"answer": "What are the teams that have the 5 oldest players?\nAdditional table information: table: school_player", "question": "SELECT Team FROM player ORDER BY Age DESC LIMIT 5"} +{"answer": "For each player, show the team and the location of school they belong to.\nAdditional table information: table: school_player", "question": "SELECT T1.Team, T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID"} +{"answer": "What are the team and the location of school each player belongs to?\nAdditional table information: table: school_player", "question": "SELECT T1.Team, T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID"} +{"answer": "Show the locations of schools that have more than 1 player.\nAdditional table information: table: school_player", "question": "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"} +{"answer": "Which schools have more than 1 player? Give me the school locations.\nAdditional table information: table: school_player", "question": "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"} +{"answer": "Show the denomination of the school that has the most players.\nAdditional table information: table: school_player", "question": "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"} +{"answer": "What is the denomination of the school the most players belong to?\nAdditional table information: table: school_player", "question": "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"} +{"answer": "Show locations and nicknames of schools.\nAdditional table information: table: school_player", "question": "SELECT T1.Location, T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID"} +{"answer": "What are the location and nickname of each school?\nAdditional table information: table: school_player", "question": "SELECT T1.Location, T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID"} +{"answer": "Please show different denominations and the corresponding number of schools.\nAdditional table information: table: school_player", "question": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination"} +{"answer": "For each denomination, return the denomination and the count of schools with that denomination.\nAdditional table information: table: school_player", "question": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination"} +{"answer": "Please show different denominations and the corresponding number of schools in descending order.\nAdditional table information: table: school_player", "question": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC"} +{"answer": "Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.\nAdditional table information: table: school_player", "question": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC"} +{"answer": "List the school color of the school that has the largest enrollment.\nAdditional table information: table: school_player", "question": "SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1"} +{"answer": "What is the school color of the school with the largest enrollment?\nAdditional table information: table: school_player", "question": "SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1"} +{"answer": "List the locations of schools that do not have any player.\nAdditional table information: table: school_player", "question": "SELECT LOCATION FROM school WHERE NOT School_ID IN (SELECT School_ID FROM Player)"} +{"answer": "Which schools do not have any player? Give me the school locations.\nAdditional table information: table: school_player", "question": "SELECT LOCATION FROM school WHERE NOT School_ID IN (SELECT School_ID FROM Player)"} +{"answer": "Show the denomination shared by schools founded before 1890 and schools founded after 1900\nAdditional table information: table: school_player", "question": "SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900"} +{"answer": "What are the denominations used by both schools founded before 1890 and schools founded after 1900?\nAdditional table information: table: school_player", "question": "SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900"} +{"answer": "Show the nicknames of schools that are not in division 1.\nAdditional table information: table: school_player", "question": "SELECT Nickname FROM school_details WHERE Division <> 'Division 1'"} +{"answer": "What are the nicknames of schools whose division is not 1?\nAdditional table information: table: school_player", "question": "SELECT Nickname FROM school_details WHERE Division <> 'Division 1'"} +{"answer": "Show the denomination shared by more than one school.\nAdditional table information: table: school_player", "question": "SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1"} +{"answer": "What are the denomination more than one school have?\nAdditional table information: table: school_player", "question": "SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1"} +{"answer": "Find all the distinct district names ordered by city area in descending.\nAdditional table information: table: store_product", "question": "SELECT DISTINCT District_name FROM district ORDER BY city_area DESC"} +{"answer": "What are the different district names in order of descending city area?\nAdditional table information: table: store_product", "question": "SELECT DISTINCT District_name FROM district ORDER BY city_area DESC"} +{"answer": "Find the list of page size which have more than 3 product listed\nAdditional table information: table: store_product", "question": "SELECT max_page_size FROM product GROUP BY max_page_size HAVING COUNT(*) > 3"} +{"answer": "What is the maximum page size for everything that has more than 3 products listed?\nAdditional table information: table: store_product", "question": "SELECT max_page_size FROM product GROUP BY max_page_size HAVING COUNT(*) > 3"} +{"answer": "Find the name and population of district with population between 200000 and 2000000\nAdditional table information: table: store_product", "question": "SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000"} +{"answer": "What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?\nAdditional table information: table: store_product", "question": "SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000"} +{"answer": "Find the name all districts with city area greater than 10 or population larger than 100000\nAdditional table information: table: store_product", "question": "SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000"} +{"answer": "What are the names of all districts with a city area greater than 10 or have more than 100000 people living there?\nAdditional table information: table: store_product", "question": "SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000"} +{"answer": "Which district has the largest population?\nAdditional table information: table: store_product", "question": "SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1"} +{"answer": "What is the name of the district with the most residents?\nAdditional table information: table: store_product", "question": "SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1"} +{"answer": "Which district has the least area?\nAdditional table information: table: store_product", "question": "SELECT district_name FROM district ORDER BY city_area ASC NULLS FIRST LIMIT 1"} +{"answer": "What is the name of the district with the smallest area?\nAdditional table information: table: store_product", "question": "SELECT district_name FROM district ORDER BY city_area ASC NULLS FIRST LIMIT 1"} +{"answer": "Find the total population of the top 3 districts with the largest area.\nAdditional table information: table: store_product", "question": "SELECT SUM(city_population) FROM district ORDER BY city_area DESC LIMIT 3"} +{"answer": "What is the total number of residents for the districts with the 3 largest areas?\nAdditional table information: table: store_product", "question": "SELECT SUM(city_population) FROM district ORDER BY city_area DESC LIMIT 3"} +{"answer": "Find all types of store and number of them.\nAdditional table information: table: store_product", "question": "SELECT TYPE, COUNT(*) FROM store GROUP BY TYPE"} +{"answer": "For each type of store, how many of them are there?\nAdditional table information: table: store_product", "question": "SELECT TYPE, COUNT(*) FROM store GROUP BY TYPE"} +{"answer": "Find the names of all stores in Khanewal District.\nAdditional table information: table: store_product", "question": "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'"} +{"answer": "What are the names of all the stores located in Khanewal District?\nAdditional table information: table: store_product", "question": "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'"} +{"answer": "Find all the stores in the district with the most population.\nAdditional table information: table: store_product", "question": "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)"} +{"answer": "What are the names of all the stores in the largest district by population?\nAdditional table information: table: store_product", "question": "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)"} +{"answer": "Which city is the headquarter of the store named 'Blackville' in?\nAdditional table information: table: store_product", "question": "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'"} +{"answer": "What city is the headquarter of the store Blackville?\nAdditional table information: table: store_product", "question": "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'"} +{"answer": "Find the number of stores in each city.\nAdditional table information: table: store_product", "question": "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"} +{"answer": "How many stores are headquarted in each city?\nAdditional table information: table: store_product", "question": "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"} +{"answer": "Find the city with the most number of stores.\nAdditional table information: table: store_product", "question": "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"} +{"answer": "What is the city with the most number of flagship stores?\nAdditional table information: table: store_product", "question": "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"} +{"answer": "What is the average pages per minute color?\nAdditional table information: table: store_product", "question": "SELECT AVG(pages_per_minute_color) FROM product"} +{"answer": "What is the average number of pages per minute color?\nAdditional table information: table: store_product", "question": "SELECT AVG(pages_per_minute_color) FROM product"} +{"answer": "What products are available at store named 'Miramichi'?\nAdditional table information: table: store_product", "question": "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'"} +{"answer": "What products are sold at the store named Miramichi?\nAdditional table information: table: store_product", "question": "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'"} +{"answer": "Find products with max page size as 'A4' and pages per minute color smaller than 5.\nAdditional table information: table: store_product", "question": "SELECT product FROM product WHERE max_page_size = 'A4' AND pages_per_minute_color < 5"} +{"answer": "What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5?\nAdditional table information: table: store_product", "question": "SELECT product FROM product WHERE max_page_size = 'A4' AND pages_per_minute_color < 5"} +{"answer": "Find products with max page size as 'A4' or pages per minute color smaller than 5.\nAdditional table information: table: store_product", "question": "SELECT product FROM product WHERE max_page_size = 'A4' OR pages_per_minute_color < 5"} +{"answer": "What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5?\nAdditional table information: table: store_product", "question": "SELECT product FROM product WHERE max_page_size = 'A4' OR pages_per_minute_color < 5"} +{"answer": "Find all the product whose name contains the word 'Scanner'.\nAdditional table information: table: store_product", "question": "SELECT product FROM product WHERE product LIKE '%Scanner%'"} +{"answer": "What are all of the products whose name includes the substring 'Scanner'?\nAdditional table information: table: store_product", "question": "SELECT product FROM product WHERE product LIKE '%Scanner%'"} +{"answer": "Find the most prominent max page size among all the products.\nAdditional table information: table: store_product", "question": "SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the most common maximum page size?\nAdditional table information: table: store_product", "question": "SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the name of the products that are not using the most frequently-used max page size.\nAdditional table information: table: store_product", "question": "SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1)"} +{"answer": "What are the names of all products that are not the most frequently-used maximum page size?\nAdditional table information: table: store_product", "question": "SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1)"} +{"answer": "Find the total population of the districts where the area is bigger than the average city area.\nAdditional table information: table: store_product", "question": "SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district)"} +{"answer": "What is the total population for all the districts that have an area larger tahn the average city area?\nAdditional table information: table: store_product", "question": "SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district)"} +{"answer": "Find the names of districts where have both city mall and village store type stores.\nAdditional table information: table: store_product", "question": "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'"} +{"answer": "What are the names of the districts that have both mall and village store style shops?\nAdditional table information: table: store_product", "question": "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'"} +{"answer": "What is the total enrollment number of all colleges?\nAdditional table information: table: soccer_2", "question": "SELECT SUM(enr) FROM College"} +{"answer": "How many students are enrolled in college?\nAdditional table information: table: soccer_2", "question": "SELECT SUM(enr) FROM College"} +{"answer": "What is the average enrollment number?\nAdditional table information: table: soccer_2", "question": "SELECT AVG(enr) FROM College"} +{"answer": "How many students, on average, does each college have enrolled?\nAdditional table information: table: soccer_2", "question": "SELECT AVG(enr) FROM College"} +{"answer": "How many colleges in total?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(*) FROM College"} +{"answer": "How many different colleges are there?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(*) FROM College"} +{"answer": "How many players have more than 1000 hours of training?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(*) FROM Player WHERE HS > 1000"} +{"answer": "How many different players trained for more than 1000 hours?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(*) FROM Player WHERE HS > 1000"} +{"answer": "How many colleges has more than 15000 students?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(*) FROM College WHERE enr > 15000"} +{"answer": "What is the number of colleges with a student population greater than 15000?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(*) FROM College WHERE enr > 15000"} +{"answer": "What is the average training hours of all players?\nAdditional table information: table: soccer_2", "question": "SELECT AVG(HS) FROM Player"} +{"answer": "How many hours do the players train on average?\nAdditional table information: table: soccer_2", "question": "SELECT AVG(HS) FROM Player"} +{"answer": "Find the name and training hours of players whose hours are below 1500.\nAdditional table information: table: soccer_2", "question": "SELECT pName, HS FROM Player WHERE HS < 1500"} +{"answer": "What are the names and number of hours spent training for each player who trains for less than 1500 hours?\nAdditional table information: table: soccer_2", "question": "SELECT pName, HS FROM Player WHERE HS < 1500"} +{"answer": "How many different colleges do attend the tryout test?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(DISTINCT cName) FROM tryout"} +{"answer": "How many different colleges were represented at tryouts?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(DISTINCT cName) FROM tryout"} +{"answer": "What are the unique types of player positions in the tryout?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(DISTINCT pPos) FROM tryout"} +{"answer": "What are the different types of player positions?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(DISTINCT pPos) FROM tryout"} +{"answer": "How many students got accepted after the tryout?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(*) FROM tryout WHERE decision = 'yes'"} +{"answer": "How many students received a yes from tryouts?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(*) FROM tryout WHERE decision = 'yes'"} +{"answer": "How many students whose are playing the role of goalie?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(*) FROM tryout WHERE pPos = 'goalie'"} +{"answer": "What is the number of students playing as a goalie?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(*) FROM tryout WHERE pPos = 'goalie'"} +{"answer": "Find the max, average and min training hours of all players.\nAdditional table information: table: soccer_2", "question": "SELECT AVG(HS), MAX(HS), MIN(HS) FROM Player"} +{"answer": "What is the average, maximum, and minimum for the number of hours spent training?\nAdditional table information: table: soccer_2", "question": "SELECT AVG(HS), MAX(HS), MIN(HS) FROM Player"} +{"answer": "What is average enrollment of colleges in the state FL?\nAdditional table information: table: soccer_2", "question": "SELECT AVG(enr) FROM College WHERE state = 'FL'"} +{"answer": "What is average number of students enrolled in Florida colleges?\nAdditional table information: table: soccer_2", "question": "SELECT AVG(enr) FROM College WHERE state = 'FL'"} +{"answer": "What are the names of players whose training hours is between 500 and 1500?\nAdditional table information: table: soccer_2", "question": "SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500"} +{"answer": "What are the names of players who train between 500 and 1500 hours?\nAdditional table information: table: soccer_2", "question": "SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500"} +{"answer": "Find the players whose names contain letter 'a'.\nAdditional table information: table: soccer_2", "question": "SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'"} +{"answer": "Who are the players that have names containing the letter a?\nAdditional table information: table: soccer_2", "question": "SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'"} +{"answer": "Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.\nAdditional table information: table: soccer_2", "question": "SELECT cName, enr FROM College WHERE enr > 10000 AND state = 'LA'"} +{"answer": "What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana?\nAdditional table information: table: soccer_2", "question": "SELECT cName, enr FROM College WHERE enr > 10000 AND state = 'LA'"} +{"answer": "List all information about college sorted by enrollment number in the ascending order.\nAdditional table information: table: soccer_2", "question": "SELECT * FROM College ORDER BY enr NULLS FIRST"} +{"answer": "What information do you have on colleges sorted by increasing enrollment numbers?\nAdditional table information: table: soccer_2", "question": "SELECT * FROM College ORDER BY enr NULLS FIRST"} +{"answer": "List the name of the colleges whose enrollment is greater 18000 sorted by the college's name.\nAdditional table information: table: soccer_2", "question": "SELECT cName FROM College WHERE enr > 18000 ORDER BY cName NULLS FIRST"} +{"answer": "What is the name of every college in alphabetical order that has more than 18000 students enrolled?\nAdditional table information: table: soccer_2", "question": "SELECT cName FROM College WHERE enr > 18000 ORDER BY cName NULLS FIRST"} +{"answer": "Find the name of players whose card is yes in the descending order of training hours.\nAdditional table information: table: soccer_2", "question": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC"} +{"answer": "What are the name of the players who received a card in descending order of the hours of training?\nAdditional table information: table: soccer_2", "question": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC"} +{"answer": "Find the name of different colleges involved in the tryout in alphabetical order.\nAdditional table information: table: soccer_2", "question": "SELECT DISTINCT cName FROM tryout ORDER BY cName NULLS FIRST"} +{"answer": "What are the different names of the colleges involved in the tryout in alphabetical order?\nAdditional table information: table: soccer_2", "question": "SELECT DISTINCT cName FROM tryout ORDER BY cName NULLS FIRST"} +{"answer": "Which position is most popular among players in the tryout?\nAdditional table information: table: soccer_2", "question": "SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What was the most popular position at tryouts?\nAdditional table information: table: soccer_2", "question": "SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the number of students who participate in the tryout for each college ordered by descending count.\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(*), cName FROM tryout GROUP BY cName ORDER BY COUNT(*) DESC"} +{"answer": "How many students participated in tryouts for each college by descennding count?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(*), cName FROM tryout GROUP BY cName ORDER BY COUNT(*) DESC"} +{"answer": "What is minimum hours of the students playing in different position?\nAdditional table information: table: soccer_2", "question": "SELECT MIN(T2.HS), T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos"} +{"answer": "For each position, what is the minimum time students spent practicing?\nAdditional table information: table: soccer_2", "question": "SELECT MIN(T2.HS), T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos"} +{"answer": "What are the names of schools with the top 3 largest size?\nAdditional table information: table: soccer_2", "question": "SELECT cName FROM college ORDER BY enr DESC LIMIT 3"} +{"answer": "What are the names of the schools with the top 3 largest class sizes?\nAdditional table information: table: soccer_2", "question": "SELECT cName FROM college ORDER BY enr DESC LIMIT 3"} +{"answer": "What is the name of school that has the smallest enrollment in each state?\nAdditional table information: table: soccer_2", "question": "SELECT cName, state, MIN(enr) FROM college GROUP BY state"} +{"answer": "What is the name of the school with smallest enrollment size per state?\nAdditional table information: table: soccer_2", "question": "SELECT cName, state, MIN(enr) FROM college GROUP BY state"} +{"answer": "Find the states where have some college students in tryout.\nAdditional table information: table: soccer_2", "question": "SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName"} +{"answer": "What are the different states that have students trying out?\nAdditional table information: table: soccer_2", "question": "SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName"} +{"answer": "Find the states where have some college students in tryout and their decisions are yes.\nAdditional table information: table: soccer_2", "question": "SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'"} +{"answer": "What are the different states that had students successfully try out?\nAdditional table information: table: soccer_2", "question": "SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'"} +{"answer": "Find the name and college of students whose decisions are yes in the tryout.\nAdditional table information: table: soccer_2", "question": "SELECT T1.pName, T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'"} +{"answer": "What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges?\nAdditional table information: table: soccer_2", "question": "SELECT T1.pName, T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'"} +{"answer": "Find the name of all students who were in the tryout sorted in alphabetic order.\nAdditional table information: table: soccer_2", "question": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName NULLS FIRST"} +{"answer": "What are the names of all students who tried out in alphabetical order?\nAdditional table information: table: soccer_2", "question": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName NULLS FIRST"} +{"answer": "Find the name and hours of the students whose tryout decision is yes.\nAdditional table information: table: soccer_2", "question": "SELECT T1.pName, T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'"} +{"answer": "What are the names and hours spent practicing of every student who received a yes at tryouts?\nAdditional table information: table: soccer_2", "question": "SELECT T1.pName, T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'"} +{"answer": "Find the states of the colleges that have students in the tryout who played in striker position.\nAdditional table information: table: soccer_2", "question": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'"} +{"answer": "What are the states of the colleges where students who tried out for the striker position attend?\nAdditional table information: table: soccer_2", "question": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'"} +{"answer": "Find the names of the students who are in the position of striker and got a yes tryout decision.\nAdditional table information: table: soccer_2", "question": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'"} +{"answer": "What are the names of all students who successfully tried out for the position of striker?\nAdditional table information: table: soccer_2", "question": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'"} +{"answer": "Find the state of the college which player Charles is attending.\nAdditional table information: table: soccer_2", "question": "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'"} +{"answer": "In which state is the college that Charles attends?\nAdditional table information: table: soccer_2", "question": "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'"} +{"answer": "Find the average and maximum hours for the students whose tryout decision is yes.\nAdditional table information: table: soccer_2", "question": "SELECT AVG(T1.HS), MAX(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'"} +{"answer": "What is the average and maximum number of hours students who made the team practiced?\nAdditional table information: table: soccer_2", "question": "SELECT AVG(T1.HS), MAX(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'"} +{"answer": "Find the average hours for the students whose tryout decision is no.\nAdditional table information: table: soccer_2", "question": "SELECT AVG(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'"} +{"answer": "What is the average number of hours spent practicing for students who got rejected?\nAdditional table information: table: soccer_2", "question": "SELECT AVG(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'"} +{"answer": "What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?\nAdditional table information: table: soccer_2", "question": "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"} +{"answer": "For each position, what is the maximum number of hours for students who spent more than 1000 hours training?\nAdditional table information: table: soccer_2", "question": "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"} +{"answer": "Which colleges do the tryout players whose name starts with letter D go to?\nAdditional table information: table: soccer_2", "question": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'"} +{"answer": "Which colleges does each player with a name that starts with the letter D who tried out go to?\nAdditional table information: table: soccer_2", "question": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'"} +{"answer": "Which college has any student who is a goalie and succeeded in the tryout.\nAdditional table information: table: soccer_2", "question": "SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'"} +{"answer": "What college has a student who successfully made the team in the role of a goalie?\nAdditional table information: table: soccer_2", "question": "SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'"} +{"answer": "Find the name of the tryout players who are from the college with largest size.\nAdditional table information: table: soccer_2", "question": "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)"} +{"answer": "What are the names of all tryout participants who are from the largest college?\nAdditional table information: table: soccer_2", "question": "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)"} +{"answer": "What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision.\nAdditional table information: table: soccer_2", "question": "SELECT DISTINCT T1.state, T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'"} +{"answer": "How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges?\nAdditional table information: table: soccer_2", "question": "SELECT DISTINCT T1.state, T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'"} +{"answer": "Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.\nAdditional table information: table: soccer_2", "question": "SELECT cName FROM College WHERE enr < 13000 AND state = 'AZ' UNION SELECT cName FROM College WHERE enr > 15000 AND state = 'LA'"} +{"answer": "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?\nAdditional table information: table: soccer_2", "question": "SELECT cName FROM College WHERE enr < 13000 AND state = 'AZ' UNION SELECT cName FROM College WHERE enr > 15000 AND state = 'LA'"} +{"answer": "Find the names of schools that have some students playing in goalie and mid positions.\nAdditional table information: table: soccer_2", "question": "SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'"} +{"answer": "What are the names of all schools that have students trying out for the position of goal and 'mid'-field.\nAdditional table information: table: soccer_2", "question": "SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'"} +{"answer": "Find the names of states that have some college students playing in goalie and mid positions.\nAdditional table information: table: soccer_2", "question": "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'"} +{"answer": "What are the names of the states that have some college students playing in the positions of goalie and mid-field?\nAdditional table information: table: soccer_2", "question": "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'"} +{"answer": "How many schools have some students playing in goalie and mid positions.\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')"} +{"answer": "How many schools have students playing in goalie and mid-field positions?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')"} +{"answer": "Find the names of schools that have some players in the mid position but not in the goalie position.\nAdditional table information: table: soccer_2", "question": "SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'"} +{"answer": "What are the names of the schools with some players in the mid position but no goalies?\nAdditional table information: table: soccer_2", "question": "SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'"} +{"answer": "Find the names of states that have some college students playing in the mid position but not in the goalie position.\nAdditional table information: table: soccer_2", "question": "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'"} +{"answer": "What are the names of all the states with college students playing in the mid position but no goalies?\nAdditional table information: table: soccer_2", "question": "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'"} +{"answer": "How many states that have some college students playing in the mid position but not in the goalie position.\nAdditional table information: table: soccer_2", "question": "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')"} +{"answer": "What is the count of states with college students playing in the mid position but not as goalies?\nAdditional table information: table: soccer_2", "question": "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')"} +{"answer": "Find the states where have the colleges whose enrollments are less than the largest size.\nAdditional table information: table: soccer_2", "question": "SELECT DISTINCT state FROM college WHERE enr < (SELECT MAX(enr) FROM college)"} +{"answer": "What are the states with colleges that have enrollments less than the some other college?\nAdditional table information: table: soccer_2", "question": "SELECT DISTINCT state FROM college WHERE enr < (SELECT MAX(enr) FROM college)"} +{"answer": "Find names of colleges with enrollment greater than that of some (at least one) college in the FL state.\nAdditional table information: table: soccer_2", "question": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT MIN(enr) FROM college WHERE state = 'FL')"} +{"answer": "What are the names of the colleges that are larger than at least one college in Florida?\nAdditional table information: table: soccer_2", "question": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT MIN(enr) FROM college WHERE state = 'FL')"} +{"answer": "Find names of all colleges whose enrollment is greater than that of all colleges in the FL state.\nAdditional table information: table: soccer_2", "question": "SELECT cName FROM college WHERE enr > (SELECT MAX(enr) FROM college WHERE state = 'FL')"} +{"answer": "What are the names of all colleges with a larger enrollment than the largest college in Florida?\nAdditional table information: table: soccer_2", "question": "SELECT cName FROM college WHERE enr > (SELECT MAX(enr) FROM college WHERE state = 'FL')"} +{"answer": "What is the total number of enrollment of schools that do not have any goalie player?\nAdditional table information: table: soccer_2", "question": "SELECT SUM(enr) FROM college WHERE NOT cName IN (SELECT cName FROM tryout WHERE pPos = 'goalie')"} +{"answer": "What is the total number of students enrolled in schools without any goalies?\nAdditional table information: table: soccer_2", "question": "SELECT SUM(enr) FROM college WHERE NOT cName IN (SELECT cName FROM tryout WHERE pPos = 'goalie')"} +{"answer": "What is the number of states that has some college whose enrollment is larger than the average enrollment?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(DISTINCT state) FROM college WHERE enr > (SELECT AVG(enr) FROM college)"} +{"answer": "How many states have a college with more students than average?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(DISTINCT state) FROM college WHERE enr > (SELECT AVG(enr) FROM college)"} +{"answer": "What is the number of states that has some colleges whose enrollment is smaller than the average enrollment?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(DISTINCT state) FROM college WHERE enr < (SELECT AVG(enr) FROM college)"} +{"answer": "How many states have smaller colleges than average?\nAdditional table information: table: soccer_2", "question": "SELECT COUNT(DISTINCT state) FROM college WHERE enr < (SELECT AVG(enr) FROM college)"} +{"answer": "How many devices are there?\nAdditional table information: table: device", "question": "SELECT COUNT(*) FROM device"} +{"answer": "Count the number of devices.\nAdditional table information: table: device", "question": "SELECT COUNT(*) FROM device"} +{"answer": "List the carriers of devices in ascending alphabetical order.\nAdditional table information: table: device", "question": "SELECT Carrier FROM device ORDER BY Carrier ASC NULLS FIRST"} +{"answer": "What are the different carriers for devices, listed in alphabetical order?\nAdditional table information: table: device", "question": "SELECT Carrier FROM device ORDER BY Carrier ASC NULLS FIRST"} +{"answer": "What are the carriers of devices whose software platforms are not 'Android'?\nAdditional table information: table: device", "question": "SELECT Carrier FROM device WHERE Software_Platform <> 'Android'"} +{"answer": "Return the device carriers that do not have Android as their software platform.\nAdditional table information: table: device", "question": "SELECT Carrier FROM device WHERE Software_Platform <> 'Android'"} +{"answer": "What are the names of shops in ascending order of open year?\nAdditional table information: table: device", "question": "SELECT Shop_Name FROM shop ORDER BY Open_Year ASC NULLS FIRST"} +{"answer": "Return the names of shops, ordered by year of opening ascending.\nAdditional table information: table: device", "question": "SELECT Shop_Name FROM shop ORDER BY Open_Year ASC NULLS FIRST"} +{"answer": "What is the average quantity of stocks?\nAdditional table information: table: device", "question": "SELECT AVG(Quantity) FROM stock"} +{"answer": "Give the average quantity of stocks.\nAdditional table information: table: device", "question": "SELECT AVG(Quantity) FROM stock"} +{"answer": "What are the names and location of the shops in ascending alphabetical order of name.\nAdditional table information: table: device", "question": "SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name ASC NULLS FIRST"} +{"answer": "Return the names and locations of shops, ordered by name in alphabetical order.\nAdditional table information: table: device", "question": "SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name ASC NULLS FIRST"} +{"answer": "How many different software platforms are there for devices?\nAdditional table information: table: device", "question": "SELECT COUNT(DISTINCT Software_Platform) FROM device"} +{"answer": "Count the number of different software platforms.\nAdditional table information: table: device", "question": "SELECT COUNT(DISTINCT Software_Platform) FROM device"} +{"answer": "List the open date of open year of the shop named 'Apple'.\nAdditional table information: table: device", "question": "SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = 'Apple'"} +{"answer": "What are the open dates and years for the shop named Apple?\nAdditional table information: table: device", "question": "SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = 'Apple'"} +{"answer": "List the name of the shop with the latest open year.\nAdditional table information: table: device", "question": "SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1"} +{"answer": "What is the shop name corresponding to the shop that opened in the most recent year?\nAdditional table information: table: device", "question": "SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1"} +{"answer": "Show names of shops and the carriers of devices they have in stock.\nAdditional table information: table: device", "question": "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"} +{"answer": "What are the names of device shops, and what are the carriers that they carry devices in stock for?\nAdditional table information: table: device", "question": "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"} +{"answer": "Show names of shops that have more than one kind of device in stock.\nAdditional table information: table: device", "question": "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"} +{"answer": "What are the names of shops that have more than a single kind of device in stock?\nAdditional table information: table: device", "question": "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"} +{"answer": "Show the name of the shop that has the most kind of devices in stock.\nAdditional table information: table: device", "question": "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"} +{"answer": "What is the name of the shop that has the most different kinds of devices in stock?\nAdditional table information: table: device", "question": "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"} +{"answer": "Show the name of the shop that have the largest quantity of devices in stock.\nAdditional table information: table: device", "question": "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"} +{"answer": "What is the name of the shop that has the greatest quantity of devices in stock?\nAdditional table information: table: device", "question": "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"} +{"answer": "Please show different software platforms and the corresponding number of devices using each.\nAdditional table information: table: device", "question": "SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform"} +{"answer": "What are the different software platforms for devices, and how many devices have each?\nAdditional table information: table: device", "question": "SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform"} +{"answer": "Please show the software platforms of devices in descending order of the count.\nAdditional table information: table: device", "question": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC"} +{"answer": "What are the different software platforms for devices, ordered by frequency descending?\nAdditional table information: table: device", "question": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC"} +{"answer": "List the software platform shared by the greatest number of devices.\nAdditional table information: table: device", "question": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the software platform that is most common amongst all devices?\nAdditional table information: table: device", "question": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the names of shops that have no devices in stock.\nAdditional table information: table: device", "question": "SELECT Shop_Name FROM shop WHERE NOT Shop_ID IN (SELECT Shop_ID FROM stock)"} +{"answer": "What are the names of shops that do not have any devices in stock?\nAdditional table information: table: device", "question": "SELECT Shop_Name FROM shop WHERE NOT Shop_ID IN (SELECT Shop_ID FROM stock)"} +{"answer": "Show the locations shared by shops with open year later than 2012 and shops with open year before 2008.\nAdditional table information: table: device", "question": "SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008"} +{"answer": "Which locations contains both shops that opened after the year 2012 and shops that opened before 2008?\nAdditional table information: table: device", "question": "SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008"} +{"answer": "List the carriers of devices that have no devices in stock.\nAdditional table information: table: device", "question": "SELECT Carrier FROM device WHERE NOT Device_ID IN (SELECT Device_ID FROM stock)"} +{"answer": "What are the carriers of devices that are not in stock anywhere?\nAdditional table information: table: device", "question": "SELECT Carrier FROM device WHERE NOT Device_ID IN (SELECT Device_ID FROM stock)"} +{"answer": "Show the carriers of devices in stock at more than one shop.\nAdditional table information: table: device", "question": "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"} +{"answer": "What are the carriers of devices that are in stock in more than a single shop?\nAdditional table information: table: device", "question": "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"} +{"answer": "How many bookings do we have?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT COUNT(*) FROM BOOKINGS"} +{"answer": "Count the total number of bookings made.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT COUNT(*) FROM BOOKINGS"} +{"answer": "List the order dates of all the bookings.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Order_Date FROM BOOKINGS"} +{"answer": "What is the order date of each booking?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Order_Date FROM BOOKINGS"} +{"answer": "Show all the planned delivery dates and actual delivery dates of bookings.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Planned_Delivery_Date, Actual_Delivery_Date FROM BOOKINGS"} +{"answer": "What are the planned delivery date and actual delivery date for each booking?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Planned_Delivery_Date, Actual_Delivery_Date FROM BOOKINGS"} +{"answer": "How many customers do we have?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT COUNT(*) FROM CUSTOMERS"} +{"answer": "Count the number of customers recorded.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT COUNT(*) FROM CUSTOMERS"} +{"answer": "What are the phone and email for customer Harold?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Customer_Phone, Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = 'Harold'"} +{"answer": "Find the phone number and email address of customer 'Harold'.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Customer_Phone, Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = 'Harold'"} +{"answer": "Show all the Store_Name of drama workshop groups.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Store_Name FROM Drama_Workshop_Groups"} +{"answer": "What are the store names of drama workshop groups?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Store_Name FROM Drama_Workshop_Groups"} +{"answer": "Show the minimum, average, maximum order quantity of all invoices.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT MIN(Order_Quantity), AVG(Order_Quantity), MAX(Order_Quantity) FROM INVOICES"} +{"answer": "What are the minimum, average, and maximum quantities ordered? Check all the invoices.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT MIN(Order_Quantity), AVG(Order_Quantity), MAX(Order_Quantity) FROM INVOICES"} +{"answer": "What are the distinct payment method codes in all the invoices?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT DISTINCT payment_method_code FROM INVOICES"} +{"answer": "Show me the distinct payment method codes from the invoice record.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT DISTINCT payment_method_code FROM INVOICES"} +{"answer": "What is the description of the marketing region China?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = 'China'"} +{"answer": "Find the marketing region description of China?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = 'China'"} +{"answer": "Show all the distinct product names with price higher than the average.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT AVG(Product_Price) FROM PRODUCTS)"} +{"answer": "What are the distinct names of the products that cost more than the average?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT AVG(Product_Price) FROM PRODUCTS)"} +{"answer": "What is the name of the most expensive product?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1"} +{"answer": "Tell me the name of the most pricy product.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1"} +{"answer": "List all product names in ascending order of price.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC NULLS FIRST"} +{"answer": "Sort the names of products in ascending order of their price.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC NULLS FIRST"} +{"answer": "What is the phone number of the performer Ashley?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = 'Ashley'"} +{"answer": "Find the phone number of performer 'Ashley'.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = 'Ashley'"} +{"answer": "Show all payment method codes and the number of orders for each code.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code"} +{"answer": "List the distinct payment method codes with the number of orders made\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code"} +{"answer": "What is the payment method code used by the most orders?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the payment method that is used the most often in all the invoices. Give me its code.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which city is the address of the store named 'FJA Filming' located in?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "Find the city the store named 'FJA Filming' is in.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "What are the states or counties of the address of the stores with marketing region code 'CA'?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "Find the states or counties where the stores with marketing region code 'CA' are located.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "What is the name of the marketing region that the store Rob Dinning belongs to?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "Return the name of the marketing region the store Rob Dinning is located in.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "What are the descriptions of the service types with product price above 100?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "Give me the descriptions of the service types that cost more than 100.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "What is the description, code and the corresponding count of each service type?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "List the description, code and the number of services for each service type.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "What is the description and code of the type of service that is performed the most often?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "Find the description and code of the service type that is performed the most times.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "What are the phones and emails of workshop groups in which services are performed?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "Give me all the phone numbers and email addresses of the workshop groups where services are performed.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "What are the names of workshop groups in which services with product name 'film' are performed?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "Find the names of the workshop groups where services with product name 'film' are performed.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "What are the different product names? What is the average product price for each of them?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Product_Name, AVG(Product_Price) FROM PRODUCTS GROUP BY Product_Name"} +{"answer": "For each distinct product name, show its average product price.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Product_Name, AVG(Product_Price) FROM PRODUCTS GROUP BY Product_Name"} +{"answer": "What are the product names with average product price smaller than 1000000?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING AVG(Product_Price) < 1000000"} +{"answer": "Find the product names whose average product price is below 1000000.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING AVG(Product_Price) < 1000000"} +{"answer": "What are the total order quantities of photo products?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "Compute the total order quantities of the product 'photo'.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "What are the order details of the products with price higher than 2000?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "Find the order detail for the products with price above 2000.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "What are the actual delivery dates of orders with quantity 1?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "List the actual delivery date for all the orders with quantity 1\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "What are the order dates of orders with price higher than 1000?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "Find the order dates of the orders with price above 1000.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "How many distinct currency codes are there for all drama workshop groups?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT COUNT(DISTINCT Currency_Code) FROM Drama_Workshop_Groups"} +{"answer": "Find the number of distinct currency codes used in drama workshop groups.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT COUNT(DISTINCT Currency_Code) FROM Drama_Workshop_Groups"} +{"answer": "What are the names of the drama workshop groups with address in Feliciaberg city?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "Return the the names of the drama workshop groups that are located in Feliciaberg city.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "What are the email addresses of the drama workshop groups with address in Alaska state?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "List the email addresses of the drama workshop groups located in Alaska state.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "Show all cities along with the number of drama workshop groups in each city.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "How many drama workshop groups are there in each city? Return both the city and the count.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "What is the marketing region code that has the most drama workshop groups?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which marketing region has the most drama workshop groups? Give me the region code.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show all cities where at least one customer lives in but no performer lives in.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "Which cities have at least one customer but no performer?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "What is the most frequent status of bookings?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which status code is the most common of all the bookings?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the names of the workshop groups that have bookings with status code 'stop'?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "Which workshop groups have bookings with status code 'stop'? Give me the names.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "Show the names of all the clients with no booking.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "What are the names of the clients who do not have any booking?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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"} +{"answer": "What is the average quantities ordered with payment method code 'MasterCard' on invoices?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT AVG(Order_Quantity) FROM Invoices WHERE payment_method_code = 'MasterCard'"} +{"answer": "Check the invoices record and compute the average quantities ordered with the payment method 'MasterCard'.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT AVG(Order_Quantity) FROM Invoices WHERE payment_method_code = 'MasterCard'"} +{"answer": "What is the product ID of the most frequently ordered item on invoices?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the id of the product ordered the most often on invoices.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the description of the service type which offers both the photo product and the film product?\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "Give me the description of the service type that offers not only the photo product but also the film product.\nAdditional table information: table: cre_Drama_Workshop_Groups", "question": "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'"} +{"answer": "How many bands are there?\nAdditional table information: table: music_2", "question": "SELECT COUNT(*) FROM Band"} +{"answer": "Find the number of bands.\nAdditional table information: table: music_2", "question": "SELECT COUNT(*) FROM Band"} +{"answer": "What are all the labels?\nAdditional table information: table: music_2", "question": "SELECT DISTINCT label FROM Albums"} +{"answer": "What are the different album labels listed?\nAdditional table information: table: music_2", "question": "SELECT DISTINCT label FROM Albums"} +{"answer": "Find all the albums in 2012.\nAdditional table information: table: music_2", "question": "SELECT * FROM Albums WHERE YEAR = 2012"} +{"answer": "return all columns of the albums created in the year of 2012.\nAdditional table information: table: music_2", "question": "SELECT * FROM Albums WHERE YEAR = 2012"} +{"answer": "Find all the stage positions of the musicians with first name 'Solveig'\nAdditional table information: table: music_2", "question": "SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = 'Solveig'"} +{"answer": "What are the different stage positions for all musicians whose first name is 'Solveig'?\nAdditional table information: table: music_2", "question": "SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = 'Solveig'"} +{"answer": "How many songs are there?\nAdditional table information: table: music_2", "question": "SELECT COUNT(*) FROM Songs"} +{"answer": "Count the number of songs.\nAdditional table information: table: music_2", "question": "SELECT COUNT(*) FROM Songs"} +{"answer": "Find all the songs performed by artist with last name 'Heilo'\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What are the names of the songs by the artist whose last name is 'Heilo'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "Hom many musicians performed in the song 'Flash'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "How many musicians play in the song 'Flash'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "Find all the songs produced by artists with first name 'Marianne'.\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What are the names of all songs produced by the artist with the first name 'Marianne'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "Who performed the song named 'Badlands'? Show the first name and the last name.\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What are the first and last names of the artist who perfomed the song 'Badlands'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "Who is performing in the back stage position for the song 'Badlands'? Show the first name and the last name.\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What are the first and last names of the performer who was in the back stage position for the song 'Badlands'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "How many unique labels are there for albums?\nAdditional table information: table: music_2", "question": "SELECT COUNT(DISTINCT label) FROM albums"} +{"answer": "What are the unique labels for the albums?\nAdditional table information: table: music_2", "question": "SELECT COUNT(DISTINCT label) FROM albums"} +{"answer": "What is the label that has the most albums?\nAdditional table information: table: music_2", "question": "SELECT label FROM albums GROUP BY label ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the label with the most albums?\nAdditional table information: table: music_2", "question": "SELECT label FROM albums GROUP BY label ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the last name of the musician that have produced the most number of songs?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "What is the last name of the musician who was in the most songs?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "What is the last name of the musician that has been at the back position the most?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "What is the last name of the musicians who has played back position the most?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "Find all the songs whose name contains the word 'the'.\nAdditional table information: table: music_2", "question": "SELECT title FROM songs WHERE title LIKE '% the %'"} +{"answer": "What are the names of the songs whose title has the word 'the'?\nAdditional table information: table: music_2", "question": "SELECT title FROM songs WHERE title LIKE '% the %'"} +{"answer": "What are all the instruments used?\nAdditional table information: table: music_2", "question": "SELECT DISTINCT instrument FROM Instruments"} +{"answer": "What are the different instruments listed in the database?\nAdditional table information: table: music_2", "question": "SELECT DISTINCT instrument FROM Instruments"} +{"answer": "What instrument did the musician with last name 'Heilo' use in the song 'Le Pop'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What instruments did the musician with the last name 'Heilo' play in the song 'Le Pop'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What is the most used instrument?\nAdditional table information: table: music_2", "question": "SELECT instrument FROM instruments GROUP BY instrument ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What instrument is used the most?\nAdditional table information: table: music_2", "question": "SELECT instrument FROM instruments GROUP BY instrument ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "How many songs have used the instrument 'drums'?\nAdditional table information: table: music_2", "question": "SELECT COUNT(*) FROM instruments WHERE instrument = 'drums'"} +{"answer": "How many songs use drums as an instrument?\nAdditional table information: table: music_2", "question": "SELECT COUNT(*) FROM instruments WHERE instrument = 'drums'"} +{"answer": "What instruments does the the song 'Le Pop' use?\nAdditional table information: table: music_2", "question": "SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'"} +{"answer": "What are the instruments are used in the song 'Le Pop'?\nAdditional table information: table: music_2", "question": "SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'"} +{"answer": "How many instruments does the song 'Le Pop' use?\nAdditional table information: table: music_2", "question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'"} +{"answer": "How many different instruments are used in the song 'Le Pop'?\nAdditional table information: table: music_2", "question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'"} +{"answer": "How many instrument does the musician with last name 'Heilo' use?\nAdditional table information: table: music_2", "question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo'"} +{"answer": "How many different instruments does the musician with the last name 'Heilo' use?\nAdditional table information: table: music_2", "question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo'"} +{"answer": "Find all the instruments ever used by the musician with last name 'Heilo'?\nAdditional table information: table: music_2", "question": "SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo'"} +{"answer": "What are all the instruments used by the musician with the last name 'Heilo'?\nAdditional table information: table: music_2", "question": "SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo'"} +{"answer": "Which song has the most vocals?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "What is the song with the most vocals?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "Which vocal type is the most frequently appearring type?\nAdditional table information: table: music_2", "question": "SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the type of vocables that appears most frequently?\nAdditional table information: table: music_2", "question": "SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which vocal type has the band mate with last name 'Heilo' played the most?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "What is the type of vocals that the band member with the last name 'Heilo' played the most?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "What are the vocal types used in song 'Le Pop'?\nAdditional table information: table: music_2", "question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'"} +{"answer": "What are the types of vocals used in the song 'Le Pop'?\nAdditional table information: table: music_2", "question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'"} +{"answer": "Find the number of vocal types used in song 'Demon Kitty Rag'?\nAdditional table information: table: music_2", "question": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Demon Kitty Rag'"} +{"answer": "What are the types of vocals used in the song 'Demon Kitty Rag'?\nAdditional table information: table: music_2", "question": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Demon Kitty Rag'"} +{"answer": "How many songs have a lead vocal?\nAdditional table information: table: music_2", "question": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'lead'"} +{"answer": "How many songs have vocals of type lead?\nAdditional table information: table: music_2", "question": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'lead'"} +{"answer": "Which vocal type did the musician with first name 'Solveig' played in the song with title 'A Bar in Amsterdam'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What are the types of vocals that the musician with the first name 'Solveig' played in the song 'A Bar in Amsterdam'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "Find all the songs that do not have a lead vocal.\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What are the names of the songs without a lead vocal?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "Find all the vocal types.\nAdditional table information: table: music_2", "question": "SELECT DISTINCT TYPE FROM vocals"} +{"answer": "What are the different types of vocals?\nAdditional table information: table: music_2", "question": "SELECT DISTINCT TYPE FROM vocals"} +{"answer": "What are the albums produced in year 2010?\nAdditional table information: table: music_2", "question": "SELECT * FROM Albums WHERE YEAR = 2010"} +{"answer": "What information is there on albums from 2010?\nAdditional table information: table: music_2", "question": "SELECT * FROM Albums WHERE YEAR = 2010"} +{"answer": "Who performed the song named 'Le Pop'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What is the first and last name of artist who performed 'Le Pop'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What is the last name of the musician that have produced the most songs?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "What is the last name of the artist who sang the most songs?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "What instrument did the musician with last name 'Heilo' use in the song 'Badlands'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What instruments did the musician with the last name 'Heilo' play in 'Badlands'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "How many instruments does the song 'Badlands' use?\nAdditional table information: table: music_2", "question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands'"} +{"answer": "How many different instruments are used in the song 'Badlands'?\nAdditional table information: table: music_2", "question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands'"} +{"answer": "What are the vocal types used in song 'Badlands'?\nAdditional table information: table: music_2", "question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands'"} +{"answer": "What types of vocals are used in the song 'Badlands'?\nAdditional table information: table: music_2", "question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands'"} +{"answer": "Find the number of vocal types used in song 'Le Pop'\nAdditional table information: table: music_2", "question": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'"} +{"answer": "How many vocal types are used in the song 'Le Pop'?\nAdditional table information: table: music_2", "question": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'"} +{"answer": "How many songs have a shared vocal?\nAdditional table information: table: music_2", "question": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'shared'"} +{"answer": "How many different songs have shared vocals?\nAdditional table information: table: music_2", "question": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'shared'"} +{"answer": "Find all the songs that do not have a back vocal.\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What are the different names of all songs without back vocals?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "Which vocal type has the band mate with first name 'Solveig' played the most?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "What are the types of vocals that the band member with the first name 'Solveig' played the most?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "Which vocal type did the musician with last name 'Heilo' played in the song with title 'Der Kapitan'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What are the types of vocals that the musician with the last name 'Heilo' played in 'Der Kapitan'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "Find the first name of the band mate that has performed in most songs.\nAdditional table information: table: music_2", "question": "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"} +{"answer": "What is the first name of the band mate who perfomed in the most songs?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "Which vocal type has the band mate with first name 'Marianne' played the most?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "What is the vocal type of the band mate whose first name is 'Marianne' played the most?\nAdditional table information: table: music_2", "question": "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"} +{"answer": "Who is performing in the back stage position for the song 'Der Kapitan'? Show the first name and last name.\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What is the first and last name of the artist who performed back stage for the song 'Der Kapitan'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "Find the name of songs that does not have a back vocal.\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What are the names of the songs that do not have back vocals?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What are the songs in album 'A Kiss Before You Go: Live in Hamburg'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What are the song titles on the album 'A Kiss Before You Go: Live in Hamburg'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What are all the songs in albums under label 'Universal Music Group'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "What are the names of all the songs whose album is under the label of 'Universal Music Group'?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "Find the number of songs in all the studio albums.\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "How many songs appear in studio albums?\nAdditional table information: table: music_2", "question": "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'"} +{"answer": "Who is the founder of Sony?\nAdditional table information: table: manufactory_1", "question": "SELECT founder FROM manufacturers WHERE name = 'Sony'"} +{"answer": "Return the founder of Sony.\nAdditional table information: table: manufactory_1", "question": "SELECT founder FROM manufacturers WHERE name = 'Sony'"} +{"answer": "Where is the headquarter of the company founded by James?\nAdditional table information: table: manufactory_1", "question": "SELECT headquarter FROM manufacturers WHERE founder = 'James'"} +{"answer": "What is the headquarter of the company whose founder is James?\nAdditional table information: table: manufactory_1", "question": "SELECT headquarter FROM manufacturers WHERE founder = 'James'"} +{"answer": "Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.\nAdditional table information: table: manufactory_1", "question": "SELECT name, headquarter FROM manufacturers ORDER BY revenue DESC"} +{"answer": "What are the names and headquarters of all manufacturers, ordered by revenue descending?\nAdditional table information: table: manufactory_1", "question": "SELECT name, headquarter FROM manufacturers ORDER BY revenue DESC"} +{"answer": "What are the average, maximum and total revenues of all companies?\nAdditional table information: table: manufactory_1", "question": "SELECT AVG(revenue), MAX(revenue), SUM(revenue) FROM manufacturers"} +{"answer": "Return the average, maximum, and total revenues across all manufacturers.\nAdditional table information: table: manufactory_1", "question": "SELECT AVG(revenue), MAX(revenue), SUM(revenue) FROM manufacturers"} +{"answer": "How many companies were created by Andy?\nAdditional table information: table: manufactory_1", "question": "SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy'"} +{"answer": "Return the number of companies created by Andy.\nAdditional table information: table: manufactory_1", "question": "SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy'"} +{"answer": "Find the total revenue created by the companies whose headquarter is located at Austin.\nAdditional table information: table: manufactory_1", "question": "SELECT SUM(revenue) FROM manufacturers WHERE headquarter = 'Austin'"} +{"answer": "What is the sum of revenue from companies with headquarters in Austin?\nAdditional table information: table: manufactory_1", "question": "SELECT SUM(revenue) FROM manufacturers WHERE headquarter = 'Austin'"} +{"answer": "What are the different cities listed?\nAdditional table information: table: manufactory_1", "question": "SELECT DISTINCT headquarter FROM manufacturers"} +{"answer": "Give the distinct headquarters of manufacturers.\nAdditional table information: table: manufactory_1", "question": "SELECT DISTINCT headquarter FROM manufacturers"} +{"answer": "Find the number of manufactures that are based in Tokyo or Beijing.\nAdditional table information: table: manufactory_1", "question": "SELECT COUNT(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing'"} +{"answer": "How many manufacturers have headquarters in either Tokyo or Beijing?\nAdditional table information: table: manufactory_1", "question": "SELECT COUNT(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing'"} +{"answer": "Find the founder of the company whose name begins with the letter 'S'.\nAdditional table information: table: manufactory_1", "question": "SELECT founder FROM manufacturers WHERE name LIKE 'S%'"} +{"answer": "Who is the founders of companies whose first letter is S?\nAdditional table information: table: manufactory_1", "question": "SELECT founder FROM manufacturers WHERE name LIKE 'S%'"} +{"answer": "Find the name of companies whose revenue is between 100 and 150.\nAdditional table information: table: manufactory_1", "question": "SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150"} +{"answer": "What are the names of companies with revenue between 100 and 150?\nAdditional table information: table: manufactory_1", "question": "SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150"} +{"answer": "What is the total revenue of all companies whose main office is at Tokyo or Taiwan?\nAdditional table information: table: manufactory_1", "question": "SELECT SUM(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan'"} +{"answer": "Return the total revenue of companies with headquarters in Tokyo or Taiwan.\nAdditional table information: table: manufactory_1", "question": "SELECT SUM(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan'"} +{"answer": "Find the name of product that is produced by both companies Creative Labs and Sony.\nAdditional table information: table: manufactory_1", "question": "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'"} +{"answer": "What are the names of products produced by both Creative Labs and Sony?\nAdditional table information: table: manufactory_1", "question": "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'"} +{"answer": "Find the name, headquarter and founder of the manufacturer that has the highest revenue.\nAdditional table information: table: manufactory_1", "question": "SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1"} +{"answer": "What are the names, headquarters and founders of the company with the highest revenue?\nAdditional table information: table: manufactory_1", "question": "SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1"} +{"answer": "Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order.\nAdditional table information: table: manufactory_1", "question": "SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC"} +{"answer": "What are the names, headquarters and revenues for manufacturers, sorted by revenue descending?\nAdditional table information: table: manufactory_1", "question": "SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC"} +{"answer": "Find the name of companies whose revenue is greater than the average revenue of all companies.\nAdditional table information: table: manufactory_1", "question": "SELECT name FROM manufacturers WHERE revenue > (SELECT AVG(revenue) FROM manufacturers)"} +{"answer": "What are the names of manufacturers with revenue greater than the average of all revenues?\nAdditional table information: table: manufactory_1", "question": "SELECT name FROM manufacturers WHERE revenue > (SELECT AVG(revenue) FROM manufacturers)"} +{"answer": "Find the name of companies whose revenue is smaller than the revenue of all companies based in Austin.\nAdditional table information: table: manufactory_1", "question": "SELECT name FROM manufacturers WHERE revenue < (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin')"} +{"answer": "What are the names of companies with revenue less than the lowest revenue of any manufacturer in Austin?\nAdditional table information: table: manufactory_1", "question": "SELECT name FROM manufacturers WHERE revenue < (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin')"} +{"answer": "Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin.\nAdditional table information: table: manufactory_1", "question": "SELECT SUM(revenue) FROM manufacturers WHERE revenue > (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin')"} +{"answer": "What is the total revenue of companies with revenue greater than the lowest revenue of any manufacturer in Austin?\nAdditional table information: table: manufactory_1", "question": "SELECT SUM(revenue) FROM manufacturers WHERE revenue > (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin')"} +{"answer": "Find the total revenue of companies of each founder.\nAdditional table information: table: manufactory_1", "question": "SELECT SUM(revenue), founder FROM manufacturers GROUP BY founder"} +{"answer": "What is the total revenue of companies started by founder?\nAdditional table information: table: manufactory_1", "question": "SELECT SUM(revenue), founder FROM manufacturers GROUP BY founder"} +{"answer": "Find the name and revenue of the company that earns the highest revenue in each city.\nAdditional table information: table: manufactory_1", "question": "SELECT name, MAX(revenue), Headquarter FROM manufacturers GROUP BY Headquarter"} +{"answer": "What are the names and revenues of the companies with the highest revenues in each headquarter city?\nAdditional table information: table: manufactory_1", "question": "SELECT name, MAX(revenue), Headquarter FROM manufacturers GROUP BY Headquarter"} +{"answer": "Find the total revenue for each manufacturer.\nAdditional table information: table: manufactory_1", "question": "SELECT SUM(revenue), name FROM manufacturers GROUP BY name"} +{"answer": "What is the total revenue of each manufacturer?\nAdditional table information: table: manufactory_1", "question": "SELECT SUM(revenue), name FROM manufacturers GROUP BY name"} +{"answer": "Find the average prices of all products from each manufacture, and list each company's name.\nAdditional table information: table: manufactory_1", "question": "SELECT AVG(T1.price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name"} +{"answer": "What are the average prices of products for each manufacturer?\nAdditional table information: table: manufactory_1", "question": "SELECT AVG(T1.price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name"} +{"answer": "Find the number of different products that are produced by companies at different headquarter cities.\nAdditional table information: table: manufactory_1", "question": "SELECT COUNT(DISTINCT T1.name), T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.Headquarter"} +{"answer": "How many different products are produced in each headquarter city?\nAdditional table information: table: manufactory_1", "question": "SELECT COUNT(DISTINCT T1.name), T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.Headquarter"} +{"answer": "Find number of products which Sony does not make.\nAdditional table information: table: manufactory_1", "question": "SELECT COUNT(DISTINCT name) FROM products WHERE NOT name IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Sony')"} +{"answer": "How many products are not made by Sony?\nAdditional table information: table: manufactory_1", "question": "SELECT COUNT(DISTINCT name) FROM products WHERE NOT name IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Sony')"} +{"answer": "Find the name of companies that do not make DVD drive.\nAdditional table information: table: manufactory_1", "question": "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'"} +{"answer": "What are the names of companies that do not make DVD drives?\nAdditional table information: table: manufactory_1", "question": "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'"} +{"answer": "Find the number of products for each manufacturer, showing the name of each company.\nAdditional table information: table: manufactory_1", "question": "SELECT COUNT(*), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name"} +{"answer": "How many products are there for each manufacturer?\nAdditional table information: table: manufactory_1", "question": "SELECT COUNT(*), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name"} +{"answer": "Select the names of all the products in the store.\nAdditional table information: table: manufactory_1", "question": "SELECT Name FROM Products"} +{"answer": "What are the names of all products?\nAdditional table information: table: manufactory_1", "question": "SELECT Name FROM Products"} +{"answer": "Select the names and the prices of all the products in the store.\nAdditional table information: table: manufactory_1", "question": "SELECT name, price FROM products"} +{"answer": "What are the names and prices of all products in the store?\nAdditional table information: table: manufactory_1", "question": "SELECT name, price FROM products"} +{"answer": "Select the name of the products with a price less than or equal to $200.\nAdditional table information: table: manufactory_1", "question": "SELECT name FROM products WHERE price <= 200"} +{"answer": "What are the names of products with price at most 200?\nAdditional table information: table: manufactory_1", "question": "SELECT name FROM products WHERE price <= 200"} +{"answer": "Find all information of all the products with a price between $60 and $120.\nAdditional table information: table: manufactory_1", "question": "SELECT * FROM products WHERE price BETWEEN 60 AND 120"} +{"answer": "What is all the information of all the products that have a price between 60 and 120?\nAdditional table information: table: manufactory_1", "question": "SELECT * FROM products WHERE price BETWEEN 60 AND 120"} +{"answer": "Compute the average price of all the products.\nAdditional table information: table: manufactory_1", "question": "SELECT AVG(price) FROM products"} +{"answer": "What is the average price across all products?\nAdditional table information: table: manufactory_1", "question": "SELECT AVG(price) FROM products"} +{"answer": "Compute the average price of all products with manufacturer code equal to 2.\nAdditional table information: table: manufactory_1", "question": "SELECT AVG(price) FROM products WHERE manufacturer = 2"} +{"answer": "What is the average price of products with manufacturer codes equal to 2?\nAdditional table information: table: manufactory_1", "question": "SELECT AVG(price) FROM products WHERE manufacturer = 2"} +{"answer": "Compute the number of products with a price larger than or equal to $180.\nAdditional table information: table: manufactory_1", "question": "SELECT COUNT(*) FROM products WHERE price >= 180"} +{"answer": "How many products have prices of at least 180?\nAdditional table information: table: manufactory_1", "question": "SELECT COUNT(*) FROM products WHERE price >= 180"} +{"answer": "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).\nAdditional table information: table: manufactory_1", "question": "SELECT name, price FROM products WHERE price >= 180 ORDER BY price DESC, name ASC NULLS FIRST"} +{"answer": "What are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending?\nAdditional table information: table: manufactory_1", "question": "SELECT name, price FROM products WHERE price >= 180 ORDER BY price DESC, name ASC NULLS FIRST"} +{"answer": "Select all the data from the products and each product's manufacturer.\nAdditional table information: table: manufactory_1", "question": "SELECT * FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code"} +{"answer": "What is all the product data, as well as each product's manufacturer?\nAdditional table information: table: manufactory_1", "question": "SELECT * FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code"} +{"answer": "Select the average price of each manufacturer's products, showing only the manufacturer's code.\nAdditional table information: table: manufactory_1", "question": "SELECT AVG(Price), manufacturer FROM Products GROUP BY manufacturer"} +{"answer": "What are the average prices of products, grouped by manufacturer code?\nAdditional table information: table: manufactory_1", "question": "SELECT AVG(Price), manufacturer FROM Products GROUP BY manufacturer"} +{"answer": "Select the average price of each manufacturer's products, showing the manufacturer's name.\nAdditional table information: table: manufactory_1", "question": "SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name"} +{"answer": "What are the average prices of products, grouped by manufacturer name?\nAdditional table information: table: manufactory_1", "question": "SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name"} +{"answer": "Select the names of manufacturer whose products have an average price higher than or equal to $150.\nAdditional table information: table: manufactory_1", "question": "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"} +{"answer": "What are the names and average prices of products for manufacturers whose products cost on average 150 or more?\nAdditional table information: table: manufactory_1", "question": "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"} +{"answer": "Select the name and price of the cheapest product.\nAdditional table information: table: manufactory_1", "question": "SELECT name, price FROM Products ORDER BY price ASC NULLS FIRST LIMIT 1"} +{"answer": "What is the name and price of the cheapest product?\nAdditional table information: table: manufactory_1", "question": "SELECT name, price FROM Products ORDER BY price ASC NULLS FIRST LIMIT 1"} +{"answer": "Select the name of each manufacturer along with the name and price of its most expensive product.\nAdditional table information: table: manufactory_1", "question": "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"} +{"answer": "For each manufacturer name, what are the names and prices of their most expensive product?\nAdditional table information: table: manufactory_1", "question": "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"} +{"answer": "Select the code of the product that is cheapest in each product category.\nAdditional table information: table: manufactory_1", "question": "SELECT code, name, MIN(price) FROM products GROUP BY name"} +{"answer": "What are the codes and names of the cheapest products in each category?\nAdditional table information: table: manufactory_1", "question": "SELECT code, name, MIN(price) FROM products GROUP BY name"} +{"answer": "What is the id of the problem log that is created most recently?\nAdditional table information: table: tracking_software_problems", "question": "SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1"} +{"answer": "Which problem log was created most recently? Give me the log id.\nAdditional table information: table: tracking_software_problems", "question": "SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1"} +{"answer": "What is the oldest log id and its corresponding problem id?\nAdditional table information: table: tracking_software_problems", "question": "SELECT problem_log_id, problem_id FROM problem_log ORDER BY log_entry_date NULLS FIRST LIMIT 1"} +{"answer": "Find the oldest log id and its corresponding problem id.\nAdditional table information: table: tracking_software_problems", "question": "SELECT problem_log_id, problem_id FROM problem_log ORDER BY log_entry_date NULLS FIRST LIMIT 1"} +{"answer": "Find all the ids and dates of the logs for the problem whose id is 10.\nAdditional table information: table: tracking_software_problems", "question": "SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10"} +{"answer": "For the problem with id 10, return the ids and dates of its problem logs.\nAdditional table information: table: tracking_software_problems", "question": "SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10"} +{"answer": "List all the log ids and their descriptions from the problem logs.\nAdditional table information: table: tracking_software_problems", "question": "SELECT problem_log_id, log_entry_description FROM problem_log"} +{"answer": "What are the log id and entry description of each problem?\nAdditional table information: table: tracking_software_problems", "question": "SELECT problem_log_id, log_entry_description FROM problem_log"} +{"answer": "List the first and last names of all distinct staff members who are assigned to the problem whose id is 1.\nAdditional table information: table: tracking_software_problems", "question": "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"} +{"answer": "Which staff members are assigned to the problem with id 1? Give me their first and last names.\nAdditional table information: table: tracking_software_problems", "question": "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"} +{"answer": "List the problem id and log id which are assigned to the staff named Rylan Homenick.\nAdditional table information: table: tracking_software_problems", "question": "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'"} +{"answer": "Which problem id and log id are assigned to the staff named Rylan Homenick?\nAdditional table information: table: tracking_software_problems", "question": "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'"} +{"answer": "How many problems are there for product voluptatem?\nAdditional table information: table: tracking_software_problems", "question": "SELECT COUNT(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = 'voluptatem'"} +{"answer": "How many problems did the product called 'voluptatem' have in record?\nAdditional table information: table: tracking_software_problems", "question": "SELECT COUNT(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = 'voluptatem'"} +{"answer": "How many problems does the product with the most problems have? List the number of the problems and product name.\nAdditional table information: table: tracking_software_problems", "question": "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"} +{"answer": "Which product has the most problems? Give me the number of problems and the product name.\nAdditional table information: table: tracking_software_problems", "question": "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"} +{"answer": "Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop.\nAdditional table information: table: tracking_software_problems", "question": "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'"} +{"answer": "Which problems are reported by the staff with first name 'Christop'? Show the descriptions of the problems.\nAdditional table information: table: tracking_software_problems", "question": "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'"} +{"answer": "Find the ids of the problems that are reported by the staff whose last name is Bosco.\nAdditional table information: table: tracking_software_problems", "question": "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'"} +{"answer": "Which problems are reported by the staff with last name 'Bosco'? Show the ids of the problems.\nAdditional table information: table: tracking_software_problems", "question": "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'"} +{"answer": "What are the ids of the problems which are reported after 1978-06-26?\nAdditional table information: table: tracking_software_problems", "question": "SELECT problem_id FROM problems WHERE date_problem_reported > '1978-06-26'"} +{"answer": "Find the ids of the problems reported after 1978-06-26.\nAdditional table information: table: tracking_software_problems", "question": "SELECT problem_id FROM problems WHERE date_problem_reported > '1978-06-26'"} +{"answer": "What are the ids of the problems which are reported before 1978-06-26?\nAdditional table information: table: tracking_software_problems", "question": "SELECT problem_id FROM problems WHERE date_problem_reported < '1978-06-26'"} +{"answer": "Which problems are reported before 1978-06-26? Give me the ids of the problems.\nAdditional table information: table: tracking_software_problems", "question": "SELECT problem_id FROM problems WHERE date_problem_reported < '1978-06-26'"} +{"answer": "For each product which has problems, what are the number of problems and the product id?\nAdditional table information: table: tracking_software_problems", "question": "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"} +{"answer": "For each product with some problems, list the count of problems and the product id.\nAdditional table information: table: tracking_software_problems", "question": "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"} +{"answer": "For each product that has problems, find the number of problems reported after 1986-11-13 and the product id?\nAdditional table information: table: tracking_software_problems", "question": "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"} +{"answer": "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.\nAdditional table information: table: tracking_software_problems", "question": "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"} +{"answer": "List the names of all the distinct product names in alphabetical order?\nAdditional table information: table: tracking_software_problems", "question": "SELECT DISTINCT product_name FROM product ORDER BY product_name NULLS FIRST"} +{"answer": "Sort all the distinct product names in alphabetical order.\nAdditional table information: table: tracking_software_problems", "question": "SELECT DISTINCT product_name FROM product ORDER BY product_name NULLS FIRST"} +{"answer": "List all the distinct product names ordered by product id?\nAdditional table information: table: tracking_software_problems", "question": "SELECT DISTINCT product_name FROM product ORDER BY product_id NULLS FIRST"} +{"answer": "What is the list of distinct product names sorted by product id?\nAdditional table information: table: tracking_software_problems", "question": "SELECT DISTINCT product_name FROM product ORDER BY product_id NULLS FIRST"} +{"answer": "What are the id of problems reported by the staff named Dameon Frami or Jolie Weber?\nAdditional table information: table: tracking_software_problems", "question": "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'"} +{"answer": "Which problems were reported by the staff named Dameon Frami or Jolie Weber? Give me the ids of the problems.\nAdditional table information: table: tracking_software_problems", "question": "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'"} +{"answer": "What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst?\nAdditional table information: table: tracking_software_problems", "question": "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'"} +{"answer": "For which product was there a problem reported by Christop Berge, with closure authorised by Ashley Medhurst? Return the product ids.\nAdditional table information: table: tracking_software_problems", "question": "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'"} +{"answer": "What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte?\nAdditional table information: table: tracking_software_problems", "question": "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')"} +{"answer": "Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems.\nAdditional table information: table: tracking_software_problems", "question": "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')"} +{"answer": "What are the ids of the problems reported after the date of any problems reported by Rylan Homenick?\nAdditional table information: table: tracking_software_problems", "question": "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')"} +{"answer": "Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick.\nAdditional table information: table: tracking_software_problems", "question": "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')"} +{"answer": "Find the top 3 products which have the largest number of problems?\nAdditional table information: table: tracking_software_problems", "question": "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"} +{"answer": "What are the three products that have the most problems?s\nAdditional table information: table: tracking_software_problems", "question": "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"} +{"answer": "List the ids of the problems from the product 'voluptatem' that are reported after 1995?\nAdditional table information: table: tracking_software_problems", "question": "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'"} +{"answer": "What are the ids of the problems that are from the product 'voluptatem' and are reported after 1995?\nAdditional table information: table: tracking_software_problems", "question": "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'"} +{"answer": "Find the first and last name of the staff members who reported problems from the product 'rem' but not 'aut'?\nAdditional table information: table: tracking_software_problems", "question": "SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1, 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, 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'"} +{"answer": "Which staff members who reported problems from the product 'rem' but not 'aut'? Give me their first and last names.\nAdditional table information: table: tracking_software_problems", "question": "SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1, 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, 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'"} +{"answer": "Find the products which have problems reported by both Lacey Bosco and Kenton Champlin?\nAdditional table information: table: tracking_software_problems", "question": "SELECT T2.product_name FROM problems AS T1, 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, 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'"} +{"answer": "Which products have problems reported by both the staff named Lacey Bosco and the staff named Kenton Champlin?\nAdditional table information: table: tracking_software_problems", "question": "SELECT T2.product_name FROM problems AS T1, 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, 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'"} +{"answer": "How many branches where have more than average number of memberships are there?\nAdditional table information: table: shop_membership", "question": "SELECT COUNT(*) FROM branch WHERE membership_amount > (SELECT AVG(membership_amount) FROM branch)"} +{"answer": "What is the number of branches that have more than the average number of memberships?\nAdditional table information: table: shop_membership", "question": "SELECT COUNT(*) FROM branch WHERE membership_amount > (SELECT AVG(membership_amount) FROM branch)"} +{"answer": "Show name, address road, and city for all branches sorted by open year.\nAdditional table information: table: shop_membership", "question": "SELECT name, address_road, city FROM branch ORDER BY open_year NULLS FIRST"} +{"answer": "What are the names, address roads, and cities of the branches ordered by opening year?\nAdditional table information: table: shop_membership", "question": "SELECT name, address_road, city FROM branch ORDER BY open_year NULLS FIRST"} +{"answer": "What are names for top three branches with most number of membership?\nAdditional table information: table: shop_membership", "question": "SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3"} +{"answer": "What are the names for the 3 branches that have the most memberships?\nAdditional table information: table: shop_membership", "question": "SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3"} +{"answer": "Show all distinct city where branches with at least 100 memberships are located.\nAdditional table information: table: shop_membership", "question": "SELECT DISTINCT city FROM branch WHERE membership_amount >= 100"} +{"answer": "What are the different cities that have more than 100 memberships?\nAdditional table information: table: shop_membership", "question": "SELECT DISTINCT city FROM branch WHERE membership_amount >= 100"} +{"answer": "List all open years when at least two shops are opened.\nAdditional table information: table: shop_membership", "question": "SELECT open_year FROM branch GROUP BY open_year HAVING COUNT(*) >= 2"} +{"answer": "What are the opening years in which at least two shops opened?\nAdditional table information: table: shop_membership", "question": "SELECT open_year FROM branch GROUP BY open_year HAVING COUNT(*) >= 2"} +{"answer": "Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London.\nAdditional table information: table: shop_membership", "question": "SELECT MIN(membership_amount), MAX(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London'"} +{"answer": "What are the minimum and maximum membership amounts for all branches that either opened in 2011 or are located in London?\nAdditional table information: table: shop_membership", "question": "SELECT MIN(membership_amount), MAX(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London'"} +{"answer": "Show the city and the number of branches opened before 2010 for each city.\nAdditional table information: table: shop_membership", "question": "SELECT city, COUNT(*) FROM branch WHERE open_year < 2010 GROUP BY city"} +{"answer": "For each city, how many branches opened before 2010?\nAdditional table information: table: shop_membership", "question": "SELECT city, COUNT(*) FROM branch WHERE open_year < 2010 GROUP BY city"} +{"answer": "How many different levels do members have?\nAdditional table information: table: shop_membership", "question": "SELECT COUNT(DISTINCT LEVEL) FROM member"} +{"answer": "What are the different membership levels?\nAdditional table information: table: shop_membership", "question": "SELECT COUNT(DISTINCT LEVEL) FROM member"} +{"answer": "Show card number, name, and hometown for all members in a descending order of level.\nAdditional table information: table: shop_membership", "question": "SELECT card_number, name, hometown FROM member ORDER BY LEVEL DESC"} +{"answer": "What are the card numbers, names, and hometowns of every member ordered by descending level?\nAdditional table information: table: shop_membership", "question": "SELECT card_number, name, hometown FROM member ORDER BY LEVEL DESC"} +{"answer": "Show the membership level with most number of members.\nAdditional table information: table: shop_membership", "question": "SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the membership level with the most people?\nAdditional table information: table: shop_membership", "question": "SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show all member names and registered branch names sorted by register year.\nAdditional table information: table: shop_membership", "question": "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 NULLS FIRST"} +{"answer": "What are the names of the members and branches at which they are registered sorted by year of registration?\nAdditional table information: table: shop_membership", "question": "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 NULLS FIRST"} +{"answer": "Show all branch names with the number of members in each branch registered after 2015.\nAdditional table information: table: shop_membership", "question": "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"} +{"answer": "For each branch id, what are the names of the branches that were registered after 2015?\nAdditional table information: table: shop_membership", "question": "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"} +{"answer": "Show member names without any registered branch.\nAdditional table information: table: shop_membership", "question": "SELECT name FROM member WHERE NOT member_id IN (SELECT member_id FROM membership_register_branch)"} +{"answer": "What are the names of the members that have never registered at any branch?\nAdditional table information: table: shop_membership", "question": "SELECT name FROM member WHERE NOT member_id IN (SELECT member_id FROM membership_register_branch)"} +{"answer": "List the branch name and city without any registered members.\nAdditional table information: table: shop_membership", "question": "SELECT name, city FROM branch WHERE NOT branch_id IN (SELECT branch_id FROM membership_register_branch)"} +{"answer": "What are the names and cities of the branches that do not have any registered members?\nAdditional table information: table: shop_membership", "question": "SELECT name, city FROM branch WHERE NOT branch_id IN (SELECT branch_id FROM membership_register_branch)"} +{"answer": "What is the name and open year for the branch with most number of memberships registered in 2016?\nAdditional table information: table: shop_membership", "question": "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"} +{"answer": "What is the name and opening year for the branch that registered the most members in 2016?\nAdditional table information: table: shop_membership", "question": "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"} +{"answer": "Show the member name and hometown who registered a branch in 2016.\nAdditional table information: table: shop_membership", "question": "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"} +{"answer": "What are the member names and hometowns of those who registered at a branch in 2016?\nAdditional table information: table: shop_membership", "question": "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"} +{"answer": "Show all city with a branch opened in 2001 and a branch with more than 100 membership.\nAdditional table information: table: shop_membership", "question": "SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100"} +{"answer": "What are the cities that have a branch that opened in 2001 and a branch with more than 100 members?\nAdditional table information: table: shop_membership", "question": "SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100"} +{"answer": "Show all cities without a branch having more than 100 memberships.\nAdditional table information: table: shop_membership", "question": "SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100"} +{"answer": "What are the cities that do not have any branches with more than 100 members?\nAdditional table information: table: shop_membership", "question": "SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100"} +{"answer": "What is the sum of total pounds of purchase in year 2018 for all branches in London?\nAdditional table information: table: shop_membership", "question": "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"} +{"answer": "How many total pounds were purchased in the year 2018 at all London branches?\nAdditional table information: table: shop_membership", "question": "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"} +{"answer": "What is the total number of purchases for members with level 6?\nAdditional table information: table: shop_membership", "question": "SELECT COUNT(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6"} +{"answer": "What are the total purchases for members rated at level 6?\nAdditional table information: table: shop_membership", "question": "SELECT COUNT(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6"} +{"answer": "Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia.\nAdditional table information: table: shop_membership", "question": "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'"} +{"answer": "What are the names of the branches that have some members with a hometown in Louisville, Kentucky and also those from Hiram, Goergia?\nAdditional table information: table: shop_membership", "question": "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'"} +{"answer": "list the card number of all members whose hometown address includes word 'Kentucky'.\nAdditional table information: table: shop_membership", "question": "SELECT card_number FROM member WHERE Hometown LIKE '%Kentucky%'"} +{"answer": "What are the card numbers of members from Kentucky?\nAdditional table information: table: shop_membership", "question": "SELECT card_number FROM member WHERE Hometown LIKE '%Kentucky%'"} +{"answer": "Find the number of students in total.\nAdditional table information: table: voter_2", "question": "SELECT COUNT(*) FROM STUDENT"} +{"answer": "How many students are there in total?\nAdditional table information: table: voter_2", "question": "SELECT COUNT(*) FROM STUDENT"} +{"answer": "Find the number of voting records in total.\nAdditional table information: table: voter_2", "question": "SELECT COUNT(*) FROM VOTING_RECORD"} +{"answer": "How many voting records do we have?\nAdditional table information: table: voter_2", "question": "SELECT COUNT(*) FROM VOTING_RECORD"} +{"answer": "Find the distinct number of president votes.\nAdditional table information: table: voter_2", "question": "SELECT COUNT(DISTINCT President_Vote) FROM VOTING_RECORD"} +{"answer": "How many distinct president votes are recorded?\nAdditional table information: table: voter_2", "question": "SELECT COUNT(DISTINCT President_Vote) FROM VOTING_RECORD"} +{"answer": "Find the maximum age of all the students.\nAdditional table information: table: voter_2", "question": "SELECT MAX(Age) FROM STUDENT"} +{"answer": "What is the oldest age among the students?\nAdditional table information: table: voter_2", "question": "SELECT MAX(Age) FROM STUDENT"} +{"answer": "Find the last names of students with major 50.\nAdditional table information: table: voter_2", "question": "SELECT LName FROM STUDENT WHERE Major = 50"} +{"answer": "What are the last names of students studying major 50?\nAdditional table information: table: voter_2", "question": "SELECT LName FROM STUDENT WHERE Major = 50"} +{"answer": "Find the first names of students with age above 22.\nAdditional table information: table: voter_2", "question": "SELECT Fname FROM STUDENT WHERE Age > 22"} +{"answer": "What are the first names of all the students aged above 22?\nAdditional table information: table: voter_2", "question": "SELECT Fname FROM STUDENT WHERE Age > 22"} +{"answer": "What are the majors of male (sex is M) students?\nAdditional table information: table: voter_2", "question": "SELECT Major FROM STUDENT WHERE Sex = 'M'"} +{"answer": "List the major of each male student.\nAdditional table information: table: voter_2", "question": "SELECT Major FROM STUDENT WHERE Sex = 'M'"} +{"answer": "What is the average age of female (sex is F) students?\nAdditional table information: table: voter_2", "question": "SELECT AVG(Age) FROM STUDENT WHERE Sex = 'F'"} +{"answer": "Find the average age of female students.\nAdditional table information: table: voter_2", "question": "SELECT AVG(Age) FROM STUDENT WHERE Sex = 'F'"} +{"answer": "What are the maximum and minimum age of students with major 600?\nAdditional table information: table: voter_2", "question": "SELECT MAX(Age), MIN(Age) FROM STUDENT WHERE Major = 600"} +{"answer": "Tell me the ages of the oldest and youngest students studying major 600.\nAdditional table information: table: voter_2", "question": "SELECT MAX(Age), MIN(Age) FROM STUDENT WHERE Major = 600"} +{"answer": "Who are the advisors for students that live in a city with city code 'BAL'?\nAdditional table information: table: voter_2", "question": "SELECT Advisor FROM STUDENT WHERE city_code = 'BAL'"} +{"answer": "Show the advisors of the students whose city of residence has city code 'BAL'.\nAdditional table information: table: voter_2", "question": "SELECT Advisor FROM STUDENT WHERE city_code = 'BAL'"} +{"answer": "What are the distinct secretary votes in the fall election cycle?\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = 'Fall'"} +{"answer": "Return all the distinct secretary votes made in the fall election cycle.\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = 'Fall'"} +{"answer": "What are the distinct president votes on 08/30/2015?\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = '08/30/2015'"} +{"answer": "Show all the distinct president votes made on 08/30/2015.\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = '08/30/2015'"} +{"answer": "Report the distinct registration date and the election cycle.\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT Registration_Date, Election_Cycle FROM VOTING_RECORD"} +{"answer": "What are the distinct registration dates and the election cycles?\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT Registration_Date, Election_Cycle FROM VOTING_RECORD"} +{"answer": "Report the distinct president vote and the vice president vote.\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT President_Vote, VICE_President_Vote FROM VOTING_RECORD"} +{"answer": "List all the distinct president votes and the vice president votes.\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT President_Vote, VICE_President_Vote FROM VOTING_RECORD"} +{"answer": "Find the distinct last names of the students who have class president votes.\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE"} +{"answer": "What are the distinct last names of the students who have class president votes?\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE"} +{"answer": "Find the distinct first names of the students who have class senator votes.\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE"} +{"answer": "What are the distinct first names of the students who have class president votes?\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE"} +{"answer": "Find the distinct ages of students who have secretary votes in the fall election cycle.\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = 'Fall'"} +{"answer": "What are the distinct ages of students who have secretary votes in the fall election cycle?\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = 'Fall'"} +{"answer": "Find the distinct Advisor of students who have treasurer votes in the spring election cycle.\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = 'Spring'"} +{"answer": "Who served as an advisor for students who have treasurer votes in the spring election cycle?\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = 'Spring'"} +{"answer": "Find the distinct majors of students who have treasurer votes.\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote"} +{"answer": "What are the distinct majors that students with treasurer votes are studying?\nAdditional table information: table: voter_2", "question": "SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote"} +{"answer": "Find the first and last names of all the female (sex is F) students who have president votes.\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "What are the first and last names of all the female students who have president votes?\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "Find the first and last name of all the students of age 18 who have vice president votes.\nAdditional table information: table: voter_2", "question": "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"} +{"answer": "What are the first names and last names of the students who are 18 years old and have vice president votes.\nAdditional table information: table: voter_2", "question": "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"} +{"answer": "How many male (sex is M) students have class senator votes in the fall election cycle?\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "Count the number of male students who had class senator votes in the fall election cycle.\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle.\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "Which students live in the city with code 'NYC' and have class senator votes in the spring election cycle? Count the numbers.\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "Find the average age of students who live in the city with code 'NYC' and have secretary votes in the spring election cycle.\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "What is the average age of students who have city code 'NYC' and have secretary votes for the spring election cycle?\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "What is the average age of the female students with secretary votes in the spring election cycle?\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "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?\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "Find the distinct last names of all the students who have president votes and whose advisor is not 2192.\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "What are the distinct last names of the students who have president votes but do not have 2192 as the advisor?\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "Find the distinct last names of all the students who have president votes and whose advisor is 8741.\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "What are the distinct last names of the students who have president votes and have 8741 as the advisor?\nAdditional table information: table: voter_2", "question": "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'"} +{"answer": "For each advisor, report the total number of students advised by him or her.\nAdditional table information: table: voter_2", "question": "SELECT Advisor, COUNT(*) FROM STUDENT GROUP BY Advisor"} +{"answer": "How many students does each advisor have?\nAdditional table information: table: voter_2", "question": "SELECT Advisor, COUNT(*) FROM STUDENT GROUP BY Advisor"} +{"answer": "Report all advisors that advise more than 2 students.\nAdditional table information: table: voter_2", "question": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2"} +{"answer": "Which advisors have more than two students?\nAdditional table information: table: voter_2", "question": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2"} +{"answer": "Report all majors that have less than 3 students.\nAdditional table information: table: voter_2", "question": "SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3"} +{"answer": "What are the majors only less than three students are studying?\nAdditional table information: table: voter_2", "question": "SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3"} +{"answer": "For each election cycle, report the number of voting records.\nAdditional table information: table: voter_2", "question": "SELECT Election_Cycle, COUNT(*) FROM VOTING_RECORD GROUP BY Election_Cycle"} +{"answer": "Count the number of voting records for each election cycle.\nAdditional table information: table: voter_2", "question": "SELECT Election_Cycle, COUNT(*) FROM VOTING_RECORD GROUP BY Election_Cycle"} +{"answer": "Which major has the most students?\nAdditional table information: table: voter_2", "question": "SELECT Major FROM STUDENT GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the major that is studied by the largest number of students.\nAdditional table information: table: voter_2", "question": "SELECT Major FROM STUDENT GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the most common major among female (sex is F) students?\nAdditional table information: table: voter_2", "question": "SELECT Major FROM STUDENT WHERE Sex = 'F' GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the major that is studied by the most female students.\nAdditional table information: table: voter_2", "question": "SELECT Major FROM STUDENT WHERE Sex = 'F' GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the city_code of the city that the most students live in?\nAdditional table information: table: voter_2", "question": "SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Return the code of the city that has the most students.\nAdditional table information: table: voter_2", "question": "SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Report the distinct advisors who have more than 2 students.\nAdditional table information: table: voter_2", "question": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2"} +{"answer": "Which advisors are advising more than 2 students?\nAdditional table information: table: voter_2", "question": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2"} +{"answer": "How many products are there?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT COUNT(*) FROM products"} +{"answer": "Count the number of products.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT COUNT(*) FROM products"} +{"answer": "How many colors are there?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT COUNT(*) FROM ref_colors"} +{"answer": "Count the number of colors.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT COUNT(*) FROM ref_colors"} +{"answer": "How many characteristics are there?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT COUNT(*) FROM CHARACTERISTICS"} +{"answer": "Count the number of characteristics.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT COUNT(*) FROM CHARACTERISTICS"} +{"answer": "What are the names and buying prices of all the products?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT product_name, typical_buying_price FROM products"} +{"answer": "Return the names and typical buying prices for all products.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT product_name, typical_buying_price FROM products"} +{"answer": "List the description of all the colors.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT color_description FROM ref_colors"} +{"answer": "What are the descriptions for each color?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT color_description FROM ref_colors"} +{"answer": "Find the names of all the product characteristics.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT DISTINCT characteristic_name FROM CHARACTERISTICS"} +{"answer": "What are the different names of the product characteristics?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT DISTINCT characteristic_name FROM CHARACTERISTICS"} +{"answer": "What are the names of products with category 'Spices'?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT product_name FROM products WHERE product_category_code = 'Spices'"} +{"answer": "Return the names of products in the category 'Spices'.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT product_name FROM products WHERE product_category_code = 'Spices'"} +{"answer": "List the names, color descriptions and product descriptions of products with category 'Herbs'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "What are the names, color descriptions, and product descriptions for products in the 'Herbs' category?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "How many products are there under the category 'Seeds'?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT COUNT(*) FROM products WHERE product_category_code = 'Seeds'"} +{"answer": "Count the number of products in the category 'Seeds'.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT COUNT(*) FROM products WHERE product_category_code = 'Seeds'"} +{"answer": "Find the number of products with category 'Spices' and typically sold above 1000.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT COUNT(*) FROM products WHERE product_category_code = 'Spices' AND typical_buying_price > 1000"} +{"answer": "How many products are in the 'Spices' category and have a typical price of over 1000?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT COUNT(*) FROM products WHERE product_category_code = 'Spices' AND typical_buying_price > 1000"} +{"answer": "What is the category and typical buying price of the product with name 'cumin'?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT product_category_code, typical_buying_price FROM products WHERE product_name = 'cumin'"} +{"answer": "Return the category code and typical price of 'cumin'.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT product_category_code, typical_buying_price FROM products WHERE product_name = 'cumin'"} +{"answer": "Which category does the product named 'flax' belong to?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT product_category_code FROM products WHERE product_name = 'flax'"} +{"answer": "What is the code of the category that the product with the name 'flax' belongs to?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT product_category_code FROM products WHERE product_name = 'flax'"} +{"answer": "What is the name of the product with the color description 'yellow'?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Give the name of the products that have a color description 'yellow'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Find the category descriptions of the products whose descriptions include letter 't'.\nAdditional table information: table: products_gen_characteristics", "question": "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%'"} +{"answer": "What are the descriptions of the categories that products with product descriptions that contain the letter t are in?\nAdditional table information: table: products_gen_characteristics", "question": "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%'"} +{"answer": "What is the color description of the product with name 'catnip'?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Give the color description for the product 'catnip'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "What is the color code and description of the product named 'chervil'?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Return the color code and description for the product with the name 'chervil'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Find the id and color description of the products with at least 2 characteristics.\nAdditional table information: table: products_gen_characteristics", "question": "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"} +{"answer": "What are the product ids and color descriptions for products with two or more characteristics?\nAdditional table information: table: products_gen_characteristics", "question": "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"} +{"answer": "List all the product names with the color description 'white'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "What are the names of products with 'white' as their color description?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "What are the name and typical buying and selling prices of the products that have color described as 'yellow'?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Return the names and typical buying and selling prices for products that have 'yellow' as their color description.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "How many characteristics does the product named 'sesame' have?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = 'sesame'"} +{"answer": "Count the number of characteristics the product 'sesame' has.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = 'sesame'"} +{"answer": "How many distinct characteristic names does the product 'cumin' have?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Count the number of different characteristic names the product 'cumin' has.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "What are all the characteristic names of product 'sesame'?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Return the characteristic names of the 'sesame' product.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "List all the characteristic names and data types of product 'cumin'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "What are the names and data types of the characteristics of the 'cumin' product?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "List all characteristics of product named 'sesame' with type code 'Grade'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "How many characteristics does the product named 'laurel' have?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Count the number of characteristics of the product named 'laurel'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Find the number of characteristics that the product 'flax' has.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Count the number of characteristics of the 'flax' product.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Find the name of the products that have the color description 'red' and have the characteristic name 'fast'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "What are the names of the products that have a color description of 'red' and the 'fast' characteristic?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "How many products have the characteristic named 'hot'?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Count the number of products with the 'hot' charactersitic.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "List the all the distinct names of the products with the characteristic name 'warm'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "What are the different product names for products that have the 'warm' characteristic:?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Find the number of the products that have their color described as 'red' and have a characteristic named 'slow'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "How many products have the color description 'red' and the characteristic name 'slow'?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Count the products that have the color description 'white' or have the characteristic name 'hot'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "How many products have their color described as 'white' or have a characteristic with the name 'hot'?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "What is the unit of measuerment of the product category code 'Herbs'?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs'"} +{"answer": "Return the unit of measure for 'Herb' products.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs'"} +{"answer": "Find the product category description of the product category with code 'Spices'.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT product_category_description FROM ref_product_categories WHERE product_category_code = 'Spices'"} +{"answer": "What is the description of the product category with the code 'Spices'?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT product_category_description FROM ref_product_categories WHERE product_category_code = 'Spices'"} +{"answer": "What is the product category description and unit of measurement of category 'Herbs'?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT product_category_description, unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs'"} +{"answer": "Return the description and unit of measurement for products in the 'Herbs' category.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT product_category_description, unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs'"} +{"answer": "What is the unit of measurement of product named 'cumin'?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Give the unit of measure for the product with the name 'cumin'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Find the unit of measurement and product category code of product named 'chervil'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "What are the unit of measure and category code for the 'chervil' product?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "Find the product names that are colored 'white' but do not have unit of measurement 'Handful'.\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'?\nAdditional table information: table: products_gen_characteristics", "question": "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'"} +{"answer": "What is the description of the color for most products?\nAdditional table information: table: products_gen_characteristics", "question": "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"} +{"answer": "Return the color description that is most common across all products.\nAdditional table information: table: products_gen_characteristics", "question": "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"} +{"answer": "What is the description of the color used by least products?\nAdditional table information: table: products_gen_characteristics", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Give the color description that is least common across products.\nAdditional table information: table: products_gen_characteristics", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the characteristic name used by most number of the products?\nAdditional table information: table: products_gen_characteristics", "question": "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"} +{"answer": "Return the name of the characteristic that is most common across all products.\nAdditional table information: table: products_gen_characteristics", "question": "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"} +{"answer": "What are the names, details and data types of the characteristics which are never used by any product?\nAdditional table information: table: products_gen_characteristics", "question": "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"} +{"answer": "Give the names, details, and data types of characteristics that are not found in any product.\nAdditional table information: table: products_gen_characteristics", "question": "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"} +{"answer": "What are characteristic names used at least twice across all products?\nAdditional table information: table: products_gen_characteristics", "question": "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"} +{"answer": "Give the names of characteristics that are in two or more products?\nAdditional table information: table: products_gen_characteristics", "question": "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"} +{"answer": "How many colors are never used by any product?\nAdditional table information: table: products_gen_characteristics", "question": "SELECT COUNT(*) FROM Ref_colors WHERE NOT color_code IN (SELECT color_code FROM products)"} +{"answer": "Count the number of colors that are not used in any products.\nAdditional table information: table: products_gen_characteristics", "question": "SELECT COUNT(*) FROM Ref_colors WHERE NOT color_code IN (SELECT color_code FROM products)"} +{"answer": "How many events are there?\nAdditional table information: table: swimming", "question": "SELECT COUNT(*) FROM event"} +{"answer": "List all the event names by year from the most recent to the oldest.\nAdditional table information: table: swimming", "question": "SELECT name FROM event ORDER BY YEAR DESC"} +{"answer": "What is the name of the event that happened in the most recent year?\nAdditional table information: table: swimming", "question": "SELECT name FROM event ORDER BY YEAR DESC LIMIT 1"} +{"answer": "How many stadiums are there?\nAdditional table information: table: swimming", "question": "SELECT COUNT(*) FROM stadium"} +{"answer": "Find the name of the stadium that has the maximum capacity.\nAdditional table information: table: swimming", "question": "SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1"} +{"answer": "Find the names of stadiums whose capacity is smaller than the average capacity.\nAdditional table information: table: swimming", "question": "SELECT name FROM stadium WHERE capacity < (SELECT AVG(capacity) FROM stadium)"} +{"answer": "Find the country that has the most stadiums.\nAdditional table information: table: swimming", "question": "SELECT country FROM stadium GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which country has at most 3 stadiums listed?\nAdditional table information: table: swimming", "question": "SELECT country FROM stadium GROUP BY country HAVING COUNT(*) <= 3"} +{"answer": "Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?\nAdditional table information: table: swimming", "question": "SELECT country FROM stadium WHERE capacity > 60000 INTERSECT SELECT country FROM stadium WHERE capacity < 50000"} +{"answer": "How many cities have a stadium that was opened before the year of 2006?\nAdditional table information: table: swimming", "question": "SELECT COUNT(DISTINCT city) FROM stadium WHERE opening_year < 2006"} +{"answer": "How many stadiums does each country have?\nAdditional table information: table: swimming", "question": "SELECT country, COUNT(*) FROM stadium GROUP BY country"} +{"answer": "Which countries do not have a stadium that was opened after 2006?\nAdditional table information: table: swimming", "question": "SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year > 2006"} +{"answer": "How many stadiums are not in country 'Russia'?\nAdditional table information: table: swimming", "question": "SELECT COUNT(*) FROM stadium WHERE country <> 'Russia'"} +{"answer": "Find the names of all swimmers, sorted by their 100 meter scores in ascending order.\nAdditional table information: table: swimming", "question": "SELECT name FROM swimmer ORDER BY meter_100 NULLS FIRST"} +{"answer": "How many different countries are all the swimmers from?\nAdditional table information: table: swimming", "question": "SELECT COUNT(DISTINCT nationality) FROM swimmer"} +{"answer": "List countries that have more than one swimmer.\nAdditional table information: table: swimming", "question": "SELECT nationality, COUNT(*) FROM swimmer GROUP BY nationality HAVING COUNT(*) > 1"} +{"answer": "Find all 200 meter and 300 meter results of swimmers with nationality 'Australia'.\nAdditional table information: table: swimming", "question": "SELECT meter_200, meter_300 FROM swimmer WHERE nationality = 'Australia'"} +{"answer": "Find the names of swimmers who has a result of 'win'.\nAdditional table information: table: swimming", "question": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win'"} +{"answer": "What is the name of the stadium which held the most events?\nAdditional table information: table: swimming", "question": "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"} +{"answer": "Find the name and capacity of the stadium where the event named 'World Junior' happened.\nAdditional table information: table: swimming", "question": "SELECT t1.name, t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id WHERE t2.name = 'World Junior'"} +{"answer": "Find the names of stadiums which have never had any event.\nAdditional table information: table: swimming", "question": "SELECT name FROM stadium WHERE NOT id IN (SELECT stadium_id FROM event)"} +{"answer": "Find the name of the swimmer who has the most records.\nAdditional table information: table: swimming", "question": "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"} +{"answer": "Find the name of the swimmer who has at least 2 records.\nAdditional table information: table: swimming", "question": "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"} +{"answer": "Find the name and nationality of the swimmer who has won (i.e., has a result of 'win') more than 1 time.\nAdditional table information: table: swimming", "question": "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"} +{"answer": "Find the names of the swimmers who have no record.\nAdditional table information: table: swimming", "question": "SELECT name FROM swimmer WHERE NOT id IN (SELECT swimmer_id FROM record)"} +{"answer": "Find the names of the swimmers who have both 'win' and 'loss' results in the record.\nAdditional table information: table: swimming", "question": "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'"} +{"answer": "Find the names of stadiums that some Australian swimmers have been to.\nAdditional table information: table: swimming", "question": "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'"} +{"answer": "Find the names of stadiums that the most swimmers have been to.\nAdditional table information: table: swimming", "question": "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"} +{"answer": "Find all details for each swimmer.\nAdditional table information: table: swimming", "question": "SELECT * FROM swimmer"} +{"answer": "What is the average capacity of the stadiums that were opened in year 2005?\nAdditional table information: table: swimming", "question": "SELECT AVG(capacity) FROM stadium WHERE opening_year = 2005"} +{"answer": "How many railways are there?\nAdditional table information: table: railway", "question": "SELECT COUNT(*) FROM railway"} +{"answer": "List the builders of railways in ascending alphabetical order.\nAdditional table information: table: railway", "question": "SELECT Builder FROM railway ORDER BY Builder ASC NULLS FIRST"} +{"answer": "List the wheels and locations of the railways.\nAdditional table information: table: railway", "question": "SELECT Wheels, LOCATION FROM railway"} +{"answer": "What is the maximum level of managers in countries that are not 'Australia'?\nAdditional table information: table: railway", "question": "SELECT MAX(LEVEL) FROM manager WHERE Country <> 'Australia\t'"} +{"answer": "What is the average age for all managers?\nAdditional table information: table: railway", "question": "SELECT AVG(Age) FROM manager"} +{"answer": "What are the names of managers in ascending order of level?\nAdditional table information: table: railway", "question": "SELECT Name FROM manager ORDER BY LEVEL ASC NULLS FIRST"} +{"answer": "What are the names and arrival times of trains?\nAdditional table information: table: railway", "question": "SELECT Name, Arrival FROM train"} +{"answer": "What is the name of the oldest manager?\nAdditional table information: table: railway", "question": "SELECT Name FROM manager ORDER BY Age DESC LIMIT 1"} +{"answer": "Show the names of trains and locations of railways they are in.\nAdditional table information: table: railway", "question": "SELECT T2.Name, T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID"} +{"answer": "Show the builder of railways associated with the trains named 'Andaman Exp'.\nAdditional table information: table: railway", "question": "SELECT T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID WHERE T2.Name = 'Andaman Exp'"} +{"answer": "Show id and location of railways that are associated with more than one train.\nAdditional table information: table: railway", "question": "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"} +{"answer": "Show the id and builder of the railway that are associated with the most trains.\nAdditional table information: table: railway", "question": "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"} +{"answer": "Show different builders of railways, along with the corresponding number of railways using each builder.\nAdditional table information: table: railway", "question": "SELECT Builder, COUNT(*) FROM railway GROUP BY Builder"} +{"answer": "Show the most common builder of railways.\nAdditional table information: table: railway", "question": "SELECT Builder FROM railway GROUP BY Builder ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show different locations of railways along with the corresponding number of railways at each location.\nAdditional table information: table: railway", "question": "SELECT LOCATION, COUNT(*) FROM railway GROUP BY LOCATION"} +{"answer": "Show the locations that have more than one railways.\nAdditional table information: table: railway", "question": "SELECT LOCATION FROM railway GROUP BY LOCATION HAVING COUNT(*) > 1"} +{"answer": "List the object number of railways that do not have any trains.\nAdditional table information: table: railway", "question": "SELECT ObjectNumber FROM railway WHERE NOT Railway_ID IN (SELECT Railway_ID FROM train)"} +{"answer": "Show the countries that have both managers of age above 50 and managers of age below 46.\nAdditional table information: table: railway", "question": "SELECT Country FROM manager WHERE Age > 50 INTERSECT SELECT Country FROM manager WHERE Age < 46"} +{"answer": "Show the distinct countries of managers.\nAdditional table information: table: railway", "question": "SELECT DISTINCT Country FROM manager"} +{"answer": "Show the working years of managers in descending order of their level.\nAdditional table information: table: railway", "question": "SELECT Working_year_starts FROM manager ORDER BY LEVEL DESC"} +{"answer": "Show the countries that have managers of age above 50 or below 46.\nAdditional table information: table: railway", "question": "SELECT Country FROM manager WHERE Age > 50 OR Age < 46"} +{"answer": "How many addresses are there in country USA?\nAdditional table information: table: customers_and_products_contacts", "question": "SELECT COUNT(*) FROM addresses WHERE country = 'USA'"} +{"answer": "Show all distinct cities in the address record.\nAdditional table information: table: customers_and_products_contacts", "question": "SELECT DISTINCT city FROM addresses"} +{"answer": "Show each state and the number of addresses in each state.\nAdditional table information: table: customers_and_products_contacts", "question": "SELECT state_province_county, COUNT(*) FROM addresses GROUP BY state_province_county"} +{"answer": "Show names and phones of customers who do not have address information.\nAdditional table information: table: customers_and_products_contacts", "question": "SELECT customer_name, customer_phone FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM customer_address_history)"} +{"answer": "Show the name of the customer who has the most orders.\nAdditional table information: table: customers_and_products_contacts", "question": "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"} +{"answer": "Show the product type codes which have at least two products.\nAdditional table information: table: customers_and_products_contacts", "question": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING COUNT(*) >= 2"} +{"answer": "Show the names of customers who have both an order in completed status and an order in part status.\nAdditional table information: table: customers_and_products_contacts", "question": "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'"} +{"answer": "Show the name, phone, and payment method code for all customers in descending order of customer number.\nAdditional table information: table: customers_and_products_contacts", "question": "SELECT customer_name, customer_phone, payment_method_code FROM customers ORDER BY customer_number DESC"} +{"answer": "Show the product name and total order quantity for each product.\nAdditional table information: table: customers_and_products_contacts", "question": "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"} +{"answer": "Show the minimum, maximum, average price for all products.\nAdditional table information: table: customers_and_products_contacts", "question": "SELECT MIN(product_price), MAX(product_price), AVG(product_price) FROM products"} +{"answer": "How many products have a price higher than the average?\nAdditional table information: table: customers_and_products_contacts", "question": "SELECT COUNT(*) FROM products WHERE product_price > (SELECT AVG(product_price) FROM products)"} +{"answer": "Show the customer name, customer address city, date from, and date to for each customer address history.\nAdditional table information: table: customers_and_products_contacts", "question": "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"} +{"answer": "Show the names of customers who use Credit Card payment method and have more than 2 orders.\nAdditional table information: table: customers_and_products_contacts", "question": "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"} +{"answer": "What are the name and phone of the customer with the most ordered product quantity?\nAdditional table information: table: customers_and_products_contacts", "question": "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"} +{"answer": "Show the product type and name for the products with price higher than 1000 or lower than 500.\nAdditional table information: table: customers_and_products_contacts", "question": "SELECT product_type_code, product_name FROM products WHERE product_price > 1000 OR product_price < 500"} +{"answer": "Find the name of dorms only for female (F gender).\nAdditional table information: table: dorm_1", "question": "SELECT dorm_name FROM dorm WHERE gender = 'F'"} +{"answer": "What are the names of the all-female dorms?\nAdditional table information: table: dorm_1", "question": "SELECT dorm_name FROM dorm WHERE gender = 'F'"} +{"answer": "Find the name of dorms that can accommodate more than 300 students.\nAdditional table information: table: dorm_1", "question": "SELECT dorm_name FROM dorm WHERE student_capacity > 300"} +{"answer": "What are the names of all the dorms that can accomdate more than 300 students?\nAdditional table information: table: dorm_1", "question": "SELECT dorm_name FROM dorm WHERE student_capacity > 300"} +{"answer": "How many female students (sex is F) whose age is below 25?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*) FROM student WHERE sex = 'F' AND age < 25"} +{"answer": "How many girl students who are younger than 25?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*) FROM student WHERE sex = 'F' AND age < 25"} +{"answer": "Find the first name of students who is older than 20.\nAdditional table information: table: dorm_1", "question": "SELECT fname FROM student WHERE age > 20"} +{"answer": "What are the first names of all students who are older than 20?\nAdditional table information: table: dorm_1", "question": "SELECT fname FROM student WHERE age > 20"} +{"answer": "Find the first name of students living in city PHL whose age is between 20 and 25.\nAdditional table information: table: dorm_1", "question": "SELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25"} +{"answer": "What is the first name of the students who are in age 20 to 25 and living in PHL city?\nAdditional table information: table: dorm_1", "question": "SELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25"} +{"answer": "How many dorms are there?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*) FROM dorm"} +{"answer": "How many dorms are in the database?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*) FROM dorm"} +{"answer": "Find the number of distinct amenities.\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*) FROM dorm_amenity"} +{"answer": "How many diffrent dorm amenities are there?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*) FROM dorm_amenity"} +{"answer": "Find the total capacity of all dorms.\nAdditional table information: table: dorm_1", "question": "SELECT SUM(student_capacity) FROM dorm"} +{"answer": "What is the total student capacity of all dorms?\nAdditional table information: table: dorm_1", "question": "SELECT SUM(student_capacity) FROM dorm"} +{"answer": "How many students are there?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*) FROM student"} +{"answer": "How many students exist?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*) FROM student"} +{"answer": "Find the average age of all students living in the each city.\nAdditional table information: table: dorm_1", "question": "SELECT AVG(age), city_code FROM student GROUP BY city_code"} +{"answer": "What is the average age for each city and what are those cities?\nAdditional table information: table: dorm_1", "question": "SELECT AVG(age), city_code FROM student GROUP BY city_code"} +{"answer": "Find the average and total capacity of dorms for the students with gender X.\nAdditional table information: table: dorm_1", "question": "SELECT AVG(student_capacity), SUM(student_capacity) FROM dorm WHERE gender = 'X'"} +{"answer": "What is the average and total capacity for all dorms who are of gender X?\nAdditional table information: table: dorm_1", "question": "SELECT AVG(student_capacity), SUM(student_capacity) FROM dorm WHERE gender = 'X'"} +{"answer": "Find the number of dorms that have some amenity.\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(DISTINCT dormid) FROM has_amenity"} +{"answer": "How many dorms have amenities?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(DISTINCT dormid) FROM has_amenity"} +{"answer": "Find the name of dorms that do not have any amenity\nAdditional table information: table: dorm_1", "question": "SELECT dorm_name FROM dorm WHERE NOT dormid IN (SELECT dormid FROM has_amenity)"} +{"answer": "What are the names of all the dorms that don't have any amenities?\nAdditional table information: table: dorm_1", "question": "SELECT dorm_name FROM dorm WHERE NOT dormid IN (SELECT dormid FROM has_amenity)"} +{"answer": "Find the number of distinct gender for dorms.\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(DISTINCT gender) FROM dorm"} +{"answer": "How many different genders are there in the dorms?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(DISTINCT gender) FROM dorm"} +{"answer": "Find the capacity and gender type of the dorm whose name has substring \u2018Donor\u2019.\nAdditional table information: table: dorm_1", "question": "SELECT student_capacity, gender FROM dorm WHERE dorm_name LIKE '%Donor%'"} +{"answer": "What is the student capacity and type of gender for the dorm whose name as the phrase Donor in it?\nAdditional table information: table: dorm_1", "question": "SELECT student_capacity, gender FROM dorm WHERE dorm_name LIKE '%Donor%'"} +{"answer": "Find the name and gender type of the dorms whose capacity is greater than 300 or less than 100.\nAdditional table information: table: dorm_1", "question": "SELECT dorm_name, gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100"} +{"answer": "What are the names and types of the dorms that have a capacity greater than 300 or less than 100?\nAdditional table information: table: dorm_1", "question": "SELECT dorm_name, gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100"} +{"answer": "Find the numbers of different majors and cities.\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(DISTINCT major), COUNT(DISTINCT city_code) FROM student"} +{"answer": "How many different majors are there and how many different city codes are there for each student?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(DISTINCT major), COUNT(DISTINCT city_code) FROM student"} +{"answer": "Find the name of dorms which have both TV Lounge and Study Room as amenities.\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "What is the name of the dorm with both a TV Lounge and Study Room listed as amenities?\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "Find the name of dorms which have TV Lounge but no Study Room as amenity.\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "What is the name of each dorm that has a TV Lounge but no study rooms?\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "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.\nAdditional table information: table: dorm_1", "question": "SELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20"} +{"answer": "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?\nAdditional table information: table: dorm_1", "question": "SELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20"} +{"answer": "Find the name of the dorm with the largest capacity.\nAdditional table information: table: dorm_1", "question": "SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1"} +{"answer": "What are the names of the dorm with the largest capacity?\nAdditional table information: table: dorm_1", "question": "SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1"} +{"answer": "List in alphabetic order all different amenities.\nAdditional table information: table: dorm_1", "question": "SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name NULLS FIRST"} +{"answer": "What are the different dorm amenity names in alphabetical order?\nAdditional table information: table: dorm_1", "question": "SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name NULLS FIRST"} +{"answer": "Find the code of city where most of students are living in.\nAdditional table information: table: dorm_1", "question": "SELECT city_code FROM student GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the code of the city with the most students?\nAdditional table information: table: dorm_1", "question": "SELECT city_code FROM student GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the first and last name of students whose age is younger than the average age.\nAdditional table information: table: dorm_1", "question": "SELECT fname, lname FROM student WHERE age < (SELECT AVG(age) FROM student)"} +{"answer": "What is the first and last name of all students who are younger than average?\nAdditional table information: table: dorm_1", "question": "SELECT fname, lname FROM student WHERE age < (SELECT AVG(age) FROM student)"} +{"answer": "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.\nAdditional table information: table: dorm_1", "question": "SELECT fname, lname FROM student WHERE city_code <> 'HKG' ORDER BY age NULLS FIRST"} +{"answer": "What are the first and last names of all students who are not living in the city HKG and order the results by age?\nAdditional table information: table: dorm_1", "question": "SELECT fname, lname FROM student WHERE city_code <> 'HKG' ORDER BY age NULLS FIRST"} +{"answer": "List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order.\nAdditional table information: table: dorm_1", "question": "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 NULLS FIRST"} +{"answer": "What are the amenities in alphabetical order that Anonymous Donor Hall has?\nAdditional table information: table: dorm_1", "question": "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 NULLS FIRST"} +{"answer": "Find the number of dorms and total capacity for each gender.\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*), SUM(student_capacity), gender FROM dorm GROUP BY gender"} +{"answer": "How many dorms are there and what is the total capacity for each gender?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*), SUM(student_capacity), gender FROM dorm GROUP BY gender"} +{"answer": "Find the average and oldest age for students with different sex.\nAdditional table information: table: dorm_1", "question": "SELECT AVG(age), MAX(age), sex FROM student GROUP BY sex"} +{"answer": "What is the average and oldest age for each gender of student?\nAdditional table information: table: dorm_1", "question": "SELECT AVG(age), MAX(age), sex FROM student GROUP BY sex"} +{"answer": "Find the number of students in each major.\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*), major FROM student GROUP BY major"} +{"answer": "How many students are there in each major?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*), major FROM student GROUP BY major"} +{"answer": "Find the number and average age of students living in each city.\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*), AVG(age), city_code FROM student GROUP BY city_code"} +{"answer": "How many students live in each city and what are their average ages?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*), AVG(age), city_code FROM student GROUP BY city_code"} +{"answer": "Find the average age and number of male students (with sex M) from each city.\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*), AVG(age), city_code FROM student WHERE sex = 'M' GROUP BY city_code"} +{"answer": "What is the average age and how many male students are there in each city?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*), AVG(age), city_code FROM student WHERE sex = 'M' GROUP BY city_code"} +{"answer": "Find the number of students for the cities where have more than one student.\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*), city_code FROM student GROUP BY city_code HAVING COUNT(*) > 1"} +{"answer": "How many students are from each city, and which cities have more than one cities?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*), city_code FROM student GROUP BY city_code HAVING COUNT(*) > 1"} +{"answer": "Find the first and last name of students who are not in the largest major.\nAdditional table information: table: dorm_1", "question": "SELECT fname, lname FROM student WHERE major <> (SELECT major FROM student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1)"} +{"answer": "What is the first and last name of the students who are not in the largest major?\nAdditional table information: table: dorm_1", "question": "SELECT fname, lname FROM student WHERE major <> (SELECT major FROM student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1)"} +{"answer": "Find the number of students whose age is older than the average age for each gender.\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*), sex FROM student WHERE age > (SELECT AVG(age) FROM student) GROUP BY sex"} +{"answer": "How many students are older than average for each gender?\nAdditional table information: table: dorm_1", "question": "SELECT COUNT(*), sex FROM student WHERE age > (SELECT AVG(age) FROM student) GROUP BY sex"} +{"answer": "Find the average age of students living in each dorm and the name of dorm.\nAdditional table information: table: dorm_1", "question": "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"} +{"answer": "What is the average age for each dorm and what are the names of each dorm?\nAdditional table information: table: dorm_1", "question": "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"} +{"answer": "Find the number of amenities for each of the dorms that can accommodate more than 100 students.\nAdditional table information: table: dorm_1", "question": "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"} +{"answer": "For each dorm, how many amenities does it have?\nAdditional table information: table: dorm_1", "question": "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"} +{"answer": "Find the number of students who is older than 20 in each dorm.\nAdditional table information: table: dorm_1", "question": "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"} +{"answer": "How many students are older than 20 in each dorm?\nAdditional table information: table: dorm_1", "question": "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"} +{"answer": "Find the first name of students who are living in the Smith Hall.\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "What are the first names of all students in Smith Hall?\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "Find the average age of students who are living in the dorm with the largest capacity.\nAdditional table information: table: dorm_1", "question": "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)"} +{"answer": "What is the average age of students who are living in the dorm with the largest capacity?\nAdditional table information: table: dorm_1", "question": "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)"} +{"answer": "Find the total number of students living in the male dorm (with gender M).\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "What are the total number of students who are living in a male dorm?\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "Find the number of female students (with F sex) living in Smith Hall\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "How many female students live in Smith Hall?\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "Find the name of amenities Smith Hall dorm have.\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "What are the names of the amenities that Smith Hall has?\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "Find the name of amenities Smith Hall dorm have. ordered the results by amenity names.\nAdditional table information: table: dorm_1", "question": "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 NULLS FIRST"} +{"answer": "What amenities does Smith Hall have in alphabetical order?\nAdditional table information: table: dorm_1", "question": "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 NULLS FIRST"} +{"answer": "Find the name of amenity that is most common in all dorms.\nAdditional table information: table: dorm_1", "question": "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"} +{"answer": "What is the most common amenity in the dorms?\nAdditional table information: table: dorm_1", "question": "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"} +{"answer": "Find the first name of students who are living in the dorm that has most number of amenities.\nAdditional table information: table: dorm_1", "question": "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)"} +{"answer": "What are the first names of all students who live in the dorm with the most amenities?\nAdditional table information: table: dorm_1", "question": "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)"} +{"answer": "Find the name and capacity of the dorm with least number of amenities.\nAdditional table information: table: dorm_1", "question": "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(*) NULLS FIRST LIMIT 1"} +{"answer": "What is the name and capacity of the dorm with the fewest amount of amenities?\nAdditional table information: table: dorm_1", "question": "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(*) NULLS FIRST LIMIT 1"} +{"answer": "Find the name of dorms that do not have amenity TV Lounge.\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "What are the names of the dorm that does not have a TV Lounge?\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "Find the first and last name of students who are living in the dorms that have amenity TV Lounge.\nAdditional table information: table: dorm_1", "question": "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')"} +{"answer": "What are the first and last names of all students who are living in a dorm with a TV Lounge?\nAdditional table information: table: dorm_1", "question": "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')"} +{"answer": "Find the first name and age of students who are living in the dorms that do not have amenity TV Lounge.\nAdditional table information: table: dorm_1", "question": "SELECT T1.fname, T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE NOT 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')"} +{"answer": "What is the first name and age of every student who lives in a dorm with a TV Lounge?\nAdditional table information: table: dorm_1", "question": "SELECT T1.fname, T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE NOT 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')"} +{"answer": "Find the name of amenities of the dorm where the student with last name Smith is living in.\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "What are the amenities in the dorm that a student who has the last name of Smith lives in?\nAdditional table information: table: dorm_1", "question": "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'"} +{"answer": "How many customers are there?\nAdditional table information: table: customer_complaints", "question": "SELECT COUNT(*) FROM customers"} +{"answer": "Count the number of customers.\nAdditional table information: table: customer_complaints", "question": "SELECT COUNT(*) FROM customers"} +{"answer": "Find the emails and phone numbers of all the customers, ordered by email address and phone number.\nAdditional table information: table: customer_complaints", "question": "SELECT email_address, phone_number FROM customers ORDER BY email_address NULLS FIRST, phone_number NULLS FIRST"} +{"answer": "What are the emails and phone numbers of all customers, sorted by email address and phone number?\nAdditional table information: table: customer_complaints", "question": "SELECT email_address, phone_number FROM customers ORDER BY email_address NULLS FIRST, phone_number NULLS FIRST"} +{"answer": "Which city has the least number of customers whose type code is 'Good Credit Rating'?\nAdditional table information: table: customer_complaints", "question": "SELECT town_city FROM customers WHERE customer_type_code = 'Good Credit Rating' GROUP BY town_city ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "Return the city with the customer type code 'Good Credit Rating' that had the fewest customers.\nAdditional table information: table: customer_complaints", "question": "SELECT town_city FROM customers WHERE customer_type_code = 'Good Credit Rating' GROUP BY town_city ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "List the name of all products along with the number of complaints that they have received.\nAdditional table information: table: customer_complaints", "question": "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"} +{"answer": "What are all the different product names, and how many complains has each received?\nAdditional table information: table: customer_complaints", "question": "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"} +{"answer": "Find the emails of customers who has filed a complaints of the product with the most complaints.\nAdditional table information: table: customer_complaints", "question": "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(*) NULLS FIRST LIMIT 1"} +{"answer": "What are the emails of customers who have filed complaints on the product which has had the greatest number of complaints?\nAdditional table information: table: customer_complaints", "question": "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(*) NULLS FIRST LIMIT 1"} +{"answer": "Which products has been complained by the customer who has filed least amount of complaints?\nAdditional table information: table: customer_complaints", "question": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id, customers AS t3 GROUP BY t3.customer_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "Return the names of products that have had complaints filed by the customer who has filed the fewest complaints.\nAdditional table information: table: customer_complaints", "question": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id, customers AS t3 GROUP BY t3.customer_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "What is the phone number of the customer who has filed the most recent complaint?\nAdditional table information: table: customer_complaints", "question": "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"} +{"answer": "Return the phone number of the customer who filed the complaint that was raised most recently.\nAdditional table information: table: customer_complaints", "question": "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"} +{"answer": "Find the email and phone number of the customers who have never filed a complaint before.\nAdditional table information: table: customer_complaints", "question": "SELECT email_address, phone_number FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM complaints)"} +{"answer": "What are the emails and phone numbers of custoemrs who have never filed a complaint?\nAdditional table information: table: customer_complaints", "question": "SELECT email_address, phone_number FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM complaints)"} +{"answer": "Find the phone number of all the customers and staff.\nAdditional table information: table: customer_complaints", "question": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff"} +{"answer": "What are the phone numbers of all customers and all staff members?\nAdditional table information: table: customer_complaints", "question": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff"} +{"answer": "What is the description of the product named 'Chocolate'?\nAdditional table information: table: customer_complaints", "question": "SELECT product_description FROM products WHERE product_name = 'Chocolate'"} +{"answer": "Return the description of the product called 'Chocolate'.\nAdditional table information: table: customer_complaints", "question": "SELECT product_description FROM products WHERE product_name = 'Chocolate'"} +{"answer": "Find the name and category of the most expensive product.\nAdditional table information: table: customer_complaints", "question": "SELECT product_name, product_category_code FROM products ORDER BY product_price DESC LIMIT 1"} +{"answer": "What is the name and category code of the product with the highest price?\nAdditional table information: table: customer_complaints", "question": "SELECT product_name, product_category_code FROM products ORDER BY product_price DESC LIMIT 1"} +{"answer": "Find the prices of products which has never received a single complaint.\nAdditional table information: table: customer_complaints", "question": "SELECT product_price FROM products WHERE NOT product_id IN (SELECT product_id FROM complaints)"} +{"answer": "What are the prices of products that have never gotten a complaint?\nAdditional table information: table: customer_complaints", "question": "SELECT product_price FROM products WHERE NOT product_id IN (SELECT product_id FROM complaints)"} +{"answer": "What is the average price of the products for each category?\nAdditional table information: table: customer_complaints", "question": "SELECT AVG(product_price), product_category_code FROM products GROUP BY product_category_code"} +{"answer": "Return the average price of products that have each category code.\nAdditional table information: table: customer_complaints", "question": "SELECT AVG(product_price), product_category_code FROM products GROUP BY product_category_code"} +{"answer": "Find the last name of the staff member who processed the complaint of the cheapest product.\nAdditional table information: table: customer_complaints", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the last name of the staff member in charge of the complaint on the product with the lowest price?\nAdditional table information: table: customer_complaints", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Which complaint status has more than 3 records on file?\nAdditional table information: table: customer_complaints", "question": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING COUNT(*) > 3"} +{"answer": "Return complaint status codes have more than 3 corresponding complaints?\nAdditional table information: table: customer_complaints", "question": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING COUNT(*) > 3"} +{"answer": "Find the last name of the staff whose email address contains 'wrau'.\nAdditional table information: table: customer_complaints", "question": "SELECT last_name FROM staff WHERE email_address LIKE '%wrau%'"} +{"answer": "What are the last names of staff with email addressed containing the substring 'wrau'?\nAdditional table information: table: customer_complaints", "question": "SELECT last_name FROM staff WHERE email_address LIKE '%wrau%'"} +{"answer": "How many customers are there in the customer type with the most customers?\nAdditional table information: table: customer_complaints", "question": "SELECT COUNT(*) FROM customers GROUP BY customer_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Count the number of customers that have the customer type that is most common.\nAdditional table information: table: customer_complaints", "question": "SELECT COUNT(*) FROM customers GROUP BY customer_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the last name of the staff who has handled the first ever complaint?\nAdditional table information: table: customer_complaints", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "Return the last name of the staff member who handled the complaint with the earliest date raised.\nAdditional table information: table: customer_complaints", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "How many distinct complaint type codes are there in the database?\nAdditional table information: table: customer_complaints", "question": "SELECT COUNT(DISTINCT complaint_type_code) FROM complaints"} +{"answer": "Count the number of different complaint type codes.\nAdditional table information: table: customer_complaints", "question": "SELECT COUNT(DISTINCT complaint_type_code) FROM complaints"} +{"answer": "Find the address line 1 and 2 of the customer with email 'vbogisich@example.org'.\nAdditional table information: table: customer_complaints", "question": "SELECT address_line_1, address_line_2 FROM customers WHERE email_address = 'vbogisich@example.org'"} +{"answer": "What are lines 1 and 2 of the addressed of the customer with the email 'vbogisich@example.org'?\nAdditional table information: table: customer_complaints", "question": "SELECT address_line_1, address_line_2 FROM customers WHERE email_address = 'vbogisich@example.org'"} +{"answer": "Find the number of complaints with Product Failure type for each complaint status.\nAdditional table information: table: customer_complaints", "question": "SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = 'Product Failure' GROUP BY complaint_status_code"} +{"answer": "Of complaints with the type code 'Product Failure', how many had each different status code?\nAdditional table information: table: customer_complaints", "question": "SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = 'Product Failure' GROUP BY complaint_status_code"} +{"answer": "What is first names of the top 5 staff who have handled the greatest number of complaints?\nAdditional table information: table: customer_complaints", "question": "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(*) NULLS FIRST LIMIT 5"} +{"answer": "Return the first names of the 5 staff members who have handled the most complaints.\nAdditional table information: table: customer_complaints", "question": "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(*) NULLS FIRST LIMIT 5"} +{"answer": "Which state has the most customers?\nAdditional table information: table: customer_complaints", "question": "SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "Give the state that has the most customers.\nAdditional table information: table: customer_complaints", "question": "SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "How many submissions are there?\nAdditional table information: table: workshop_paper", "question": "SELECT COUNT(*) FROM submission"} +{"answer": "Count the number of submissions.\nAdditional table information: table: workshop_paper", "question": "SELECT COUNT(*) FROM submission"} +{"answer": "List the authors of submissions in ascending order of scores.\nAdditional table information: table: workshop_paper", "question": "SELECT Author FROM submission ORDER BY Scores ASC NULLS FIRST"} +{"answer": "Find the author for each submission and list them in ascending order of submission score.\nAdditional table information: table: workshop_paper", "question": "SELECT Author FROM submission ORDER BY Scores ASC NULLS FIRST"} +{"answer": "What are the authors of submissions and their colleges?\nAdditional table information: table: workshop_paper", "question": "SELECT Author, College FROM submission"} +{"answer": "For each submission, show the author and their affiliated college.\nAdditional table information: table: workshop_paper", "question": "SELECT Author, College FROM submission"} +{"answer": "Show the names of authors from college 'Florida' or 'Temple'\nAdditional table information: table: workshop_paper", "question": "SELECT Author FROM submission WHERE College = 'Florida' OR College = 'Temple'"} +{"answer": "Which authors with submissions are from college 'Florida' or 'Temple'?\nAdditional table information: table: workshop_paper", "question": "SELECT Author FROM submission WHERE College = 'Florida' OR College = 'Temple'"} +{"answer": "What is the average score of submissions?\nAdditional table information: table: workshop_paper", "question": "SELECT AVG(Scores) FROM submission"} +{"answer": "Compute the average score of submissions.\nAdditional table information: table: workshop_paper", "question": "SELECT AVG(Scores) FROM submission"} +{"answer": "What is the author of the submission with the highest score?\nAdditional table information: table: workshop_paper", "question": "SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1"} +{"answer": "Find the author who achieved the highest score in a submission.\nAdditional table information: table: workshop_paper", "question": "SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1"} +{"answer": "Show different colleges along with the number of authors of submission from each college.\nAdditional table information: table: workshop_paper", "question": "SELECT College, COUNT(*) FROM submission GROUP BY College"} +{"answer": "For each college, return the college name and the count of authors with submissions from that college.\nAdditional table information: table: workshop_paper", "question": "SELECT College, COUNT(*) FROM submission GROUP BY College"} +{"answer": "Show the most common college of authors of submissions.\nAdditional table information: table: workshop_paper", "question": "SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which college has the most authors with submissions?\nAdditional table information: table: workshop_paper", "question": "SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80.\nAdditional table information: table: workshop_paper", "question": "SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80"} +{"answer": "Which colleges have both authors with submission score above 90 and authors with submission score below 80?\nAdditional table information: table: workshop_paper", "question": "SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80"} +{"answer": "Show the authors of submissions and the acceptance results of their submissions.\nAdditional table information: table: workshop_paper", "question": "SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID"} +{"answer": "For each submission, find its author and acceptance result.\nAdditional table information: table: workshop_paper", "question": "SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID"} +{"answer": "Show the result of the submission with the highest score.\nAdditional table information: table: workshop_paper", "question": "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"} +{"answer": "Which submission received the highest score in acceptance result. Show me the result.\nAdditional table information: table: workshop_paper", "question": "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"} +{"answer": "Show each author and the number of workshops they submitted to.\nAdditional table information: table: workshop_paper", "question": "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"} +{"answer": "How many workshops did each author submit to? Return the author name and the number of workshops.\nAdditional table information: table: workshop_paper", "question": "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"} +{"answer": "Show the authors who have submissions to more than one workshop.\nAdditional table information: table: workshop_paper", "question": "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"} +{"answer": "Which authors have submitted to more than one workshop?\nAdditional table information: table: workshop_paper", "question": "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"} +{"answer": "Show the date and venue of each workshop in ascending alphabetical order of the venue.\nAdditional table information: table: workshop_paper", "question": "SELECT Date, Venue FROM workshop ORDER BY Venue NULLS FIRST"} +{"answer": "Sort the each workshop in alphabetical order of the venue. Return the date and venue of each workshop.\nAdditional table information: table: workshop_paper", "question": "SELECT Date, Venue FROM workshop ORDER BY Venue NULLS FIRST"} +{"answer": "List the authors who do not have submission to any workshop.\nAdditional table information: table: workshop_paper", "question": "SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance)"} +{"answer": "Which authors did not submit to any workshop?\nAdditional table information: table: workshop_paper", "question": "SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance)"} +{"answer": "Find the number of investors in total.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT COUNT(*) FROM INVESTORS"} +{"answer": "Show all investor details.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT Investor_details FROM INVESTORS"} +{"answer": "Show all distinct lot details.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT DISTINCT lot_details FROM LOTS"} +{"answer": "Show the maximum amount of transaction.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT MAX(amount_of_transaction) FROM TRANSACTIONS"} +{"answer": "Show all date and share count of transactions.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT date_of_transaction, share_count FROM TRANSACTIONS"} +{"answer": "What is the total share of transactions?\nAdditional table information: table: tracking_share_transactions", "question": "SELECT SUM(share_count) FROM TRANSACTIONS"} +{"answer": "Show all transaction ids with transaction code 'PUR'.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR'"} +{"answer": "Show all dates of transactions whose type code is 'SALE'.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = 'SALE'"} +{"answer": "Show the average amount of transactions with type code 'SALE'.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT AVG(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = 'SALE'"} +{"answer": "Show the description of transaction type with code 'PUR'.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code = 'PUR'"} +{"answer": "Show the minimum amount of transactions whose type code is 'PUR' and whose share count is bigger than 50.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT MIN(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = 'PUR' AND share_count > 50"} +{"answer": "Show the maximum share count of transactions where the amount is smaller than 10000\nAdditional table information: table: tracking_share_transactions", "question": "SELECT MAX(share_count) FROM TRANSACTIONS WHERE amount_of_transaction < 10000"} +{"answer": "Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000"} +{"answer": "Show the transaction type descriptions and dates if the share count is smaller than 10.\nAdditional table information: table: tracking_share_transactions", "question": "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"} +{"answer": "Show details of all investors if they make any transaction with share count greater than 100.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100"} +{"answer": "How many distinct transaction types are used in the transactions?\nAdditional table information: table: tracking_share_transactions", "question": "SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS"} +{"answer": "Return the lot details and investor ids.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT lot_details, investor_id FROM LOTS"} +{"answer": "Return the lot details of lots that belong to investors with details 'l'?\nAdditional table information: table: tracking_share_transactions", "question": "SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = 'l'"} +{"answer": "What are the purchase details of transactions with amount bigger than 10000?\nAdditional table information: table: tracking_share_transactions", "question": "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"} +{"answer": "What are the sale details and dates of transactions with amount smaller than 3000?\nAdditional table information: table: tracking_share_transactions", "question": "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"} +{"answer": "What are the lot details of lots associated with transactions with share count smaller than 50?\nAdditional table information: table: tracking_share_transactions", "question": "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"} +{"answer": "What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is 'PUR'?\nAdditional table information: table: tracking_share_transactions", "question": "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'"} +{"answer": "Show the average transaction amount for different transaction types.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT transaction_type_code, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code"} +{"answer": "Show the maximum and minimum share count of different transaction types.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT transaction_type_code, MAX(share_count), MIN(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code"} +{"answer": "Show the average share count of transactions for different investors.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id"} +{"answer": "Show the average share count of transactions each each investor, ordered by average share count.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY AVG(share_count) NULLS FIRST"} +{"answer": "Show the average amount of transactions for different investors.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT investor_id, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id"} +{"answer": "Show the average amount of transactions for different lots.\nAdditional table information: table: tracking_share_transactions", "question": "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"} +{"answer": "Show the average amount of transactions for different lots, ordered by average amount of transactions.\nAdditional table information: table: tracking_share_transactions", "question": "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) NULLS FIRST"} +{"answer": "Show the number of transactions with transaction type code 'SALE' for different investors if it is larger than 0.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT investor_id, COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = 'SALE' GROUP BY investor_id"} +{"answer": "Show the number of transactions for different investors.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT investor_id, COUNT(*) FROM TRANSACTIONS GROUP BY investor_id"} +{"answer": "Show the transaction type code that occurs the fewest times.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "Show the transaction type code that occurs the most frequently.\nAdditional table information: table: tracking_share_transactions", "question": "SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the description of the transaction type that occurs most frequently.\nAdditional table information: table: tracking_share_transactions", "question": "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"} +{"answer": "Show the id and details of the investor that has the largest number of transactions.\nAdditional table information: table: tracking_share_transactions", "question": "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"} +{"answer": "Show the id and details for the investors who have the top 3 number of transactions.\nAdditional table information: table: tracking_share_transactions", "question": "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"} +{"answer": "Show the ids of the investors who have at least two transactions.\nAdditional table information: table: tracking_share_transactions", "question": "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"} +{"answer": "Show the ids and details of the investors who have at least two transactions with type code 'SALE'.\nAdditional table information: table: tracking_share_transactions", "question": "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"} +{"answer": "What are the dates of transactions with at least 100 share count or amount bigger than 100?\nAdditional table information: table: tracking_share_transactions", "question": "SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100"} +{"answer": "What are the details of all sales and purchases?\nAdditional table information: table: tracking_share_transactions", "question": "SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases"} +{"answer": "What are the details of the lots which are not used in any transactions?\nAdditional table information: table: tracking_share_transactions", "question": "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"} +{"answer": "How many available hotels are there in total?\nAdditional table information: table: cre_Theme_park", "question": "SELECT COUNT(*) FROM HOTELS"} +{"answer": "Find the total number of available hotels.\nAdditional table information: table: cre_Theme_park", "question": "SELECT COUNT(*) FROM HOTELS"} +{"answer": "What are the price ranges of hotels?\nAdditional table information: table: cre_Theme_park", "question": "SELECT price_range FROM HOTELS"} +{"answer": "Tell me the price ranges for all the hotels.\nAdditional table information: table: cre_Theme_park", "question": "SELECT price_range FROM HOTELS"} +{"answer": "Show all distinct location names.\nAdditional table information: table: cre_Theme_park", "question": "SELECT DISTINCT Location_Name FROM LOCATIONS"} +{"answer": "What are the distinct location names?\nAdditional table information: table: cre_Theme_park", "question": "SELECT DISTINCT Location_Name FROM LOCATIONS"} +{"answer": "Show the names and details of all the staff members.\nAdditional table information: table: cre_Theme_park", "question": "SELECT Name, Other_Details FROM Staff"} +{"answer": "What is the name and detail of each staff member?\nAdditional table information: table: cre_Theme_park", "question": "SELECT Name, Other_Details FROM Staff"} +{"answer": "Show details of all visitors.\nAdditional table information: table: cre_Theme_park", "question": "SELECT Tourist_Details FROM VISITORS"} +{"answer": "What is the detail of each visitor?\nAdditional table information: table: cre_Theme_park", "question": "SELECT Tourist_Details FROM VISITORS"} +{"answer": "Show the price ranges of hotels with 5 star ratings.\nAdditional table information: table: cre_Theme_park", "question": "SELECT price_range FROM HOTELS WHERE star_rating_code = '5'"} +{"answer": "What are the price ranges of five star hotels?\nAdditional table information: table: cre_Theme_park", "question": "SELECT price_range FROM HOTELS WHERE star_rating_code = '5'"} +{"answer": "Show the average price range of hotels that have 5 star ratings and allow pets.\nAdditional table information: table: cre_Theme_park", "question": "SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = '5' AND pets_allowed_yn = 1"} +{"answer": "What is the average price range of five star hotels that allow pets?\nAdditional table information: table: cre_Theme_park", "question": "SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = '5' AND pets_allowed_yn = 1"} +{"answer": "What is the address of the location 'UK Gallery'?\nAdditional table information: table: cre_Theme_park", "question": "SELECT Address FROM LOCATIONS WHERE Location_Name = 'UK Gallery'"} +{"answer": "Find the address of the location named 'UK Gallery'.\nAdditional table information: table: cre_Theme_park", "question": "SELECT Address FROM LOCATIONS WHERE Location_Name = 'UK Gallery'"} +{"answer": "What is the detail of the location UK Gallery?\nAdditional table information: table: cre_Theme_park", "question": "SELECT Other_Details FROM LOCATIONS WHERE Location_Name = 'UK Gallery'"} +{"answer": "Return the detail of the location named 'UK Gallery'.\nAdditional table information: table: cre_Theme_park", "question": "SELECT Other_Details FROM LOCATIONS WHERE Location_Name = 'UK Gallery'"} +{"answer": "Which location names contain the word 'film'?\nAdditional table information: table: cre_Theme_park", "question": "SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE '%film%'"} +{"answer": "Find all the locations whose names contain the word 'film'.\nAdditional table information: table: cre_Theme_park", "question": "SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE '%film%'"} +{"answer": "How many distinct names are associated with all the photos?\nAdditional table information: table: cre_Theme_park", "question": "SELECT COUNT(DISTINCT Name) FROM PHOTOS"} +{"answer": "Count the number of distinct names associated with the photos.\nAdditional table information: table: cre_Theme_park", "question": "SELECT COUNT(DISTINCT Name) FROM PHOTOS"} +{"answer": "What are the distinct visit dates?\nAdditional table information: table: cre_Theme_park", "question": "SELECT DISTINCT Visit_Date FROM VISITS"} +{"answer": "Find all the distinct visit dates.\nAdditional table information: table: cre_Theme_park", "question": "SELECT DISTINCT Visit_Date FROM VISITS"} +{"answer": "What are the names of the tourist attractions that can be accessed by bus?\nAdditional table information: table: cre_Theme_park", "question": "SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus'"} +{"answer": "Which tourist attractions can we get to by bus? Tell me the names of the attractions.\nAdditional table information: table: cre_Theme_park", "question": "SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus'"} +{"answer": "What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?\nAdditional table information: table: cre_Theme_park", "question": "SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus' OR How_to_Get_There = 'walk'"} +{"answer": "Find the names and opening hours of the tourist attractions that we get to by bus or walk.\nAdditional table information: table: cre_Theme_park", "question": "SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus' OR How_to_Get_There = 'walk'"} +{"answer": "What are the star rating descriptions of the hotels with price above 10000?\nAdditional table information: table: cre_Theme_park", "question": "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"} +{"answer": "Give me the star rating descriptions of the hotels that cost more than 10000.\nAdditional table information: table: cre_Theme_park", "question": "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"} +{"answer": "What are the details and opening hours of the museums?\nAdditional table information: table: cre_Theme_park", "question": "SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID"} +{"answer": "Give me the detail and opening hour for each museum.\nAdditional table information: table: cre_Theme_park", "question": "SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID"} +{"answer": "What is the name of the tourist attraction that is associated with the photo 'game1'?\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "Which tourist attraction is associated with the photo 'game1'? Return its name.\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "What are the names and descriptions of the photos taken at the tourist attraction 'film festival'?\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "Find the names and descriptions of the photos taken at the tourist attraction called 'film festival'.\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "What are the details and ways to get to tourist attractions related to royal family?\nAdditional table information: table: cre_Theme_park", "question": "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"} +{"answer": "Which tourist attractions are related to royal family? Tell me their details and how we can get there.\nAdditional table information: table: cre_Theme_park", "question": "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"} +{"answer": "What are the details of the shops that can be accessed by walk?\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "Find the details of the shops that can be reached by walk.\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "What is the name of the staff that is in charge of the attraction named 'US museum'?\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "Tell me the name of the staff in charge of the attraction called 'US museum'.\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "What are the details of the markets that can be accessed by walk or bus?\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "Find the details of all the markets that are accessible by walk or bus.\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "What are the visit date and details of the visitor whose detail is 'Vincent'?\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "Find the visit date and details of the tourist whose detail is 'Vincent'\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "Which tourist attractions does the visitor with detail 'Vincent' visit?\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "Show the tourist attractions visited by the tourist whose detail is 'Vincent'.\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there?\nAdditional table information: table: cre_Theme_park", "question": "SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1, 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'"} +{"answer": "For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there.\nAdditional table information: table: cre_Theme_park", "question": "SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1, 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'"} +{"answer": "Show the average price of hotels for each star rating code.\nAdditional table information: table: cre_Theme_park", "question": "SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code"} +{"answer": "What is the average price range of hotels for each each star rating code?\nAdditional table information: table: cre_Theme_park", "question": "SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code"} +{"answer": "Show the average price of hotels for different pet policy.\nAdditional table information: table: cre_Theme_park", "question": "SELECT pets_allowed_yn, AVG(price_range) FROM HOTELS GROUP BY pets_allowed_yn"} +{"answer": "What are the average prices of hotels grouped by their pet policy.\nAdditional table information: table: cre_Theme_park", "question": "SELECT pets_allowed_yn, AVG(price_range) FROM HOTELS GROUP BY pets_allowed_yn"} +{"answer": "Show the id and star rating of each hotel, ordered by its price from low to high.\nAdditional table information: table: cre_Theme_park", "question": "SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST"} +{"answer": "Find the id and star rating of each hotel and sort them in increasing order of price.\nAdditional table information: table: cre_Theme_park", "question": "SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST"} +{"answer": "Show the details of the top 3 most expensive hotels.\nAdditional table information: table: cre_Theme_park", "question": "SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3"} +{"answer": "What are the details of the three most expensive hotels?\nAdditional table information: table: cre_Theme_park", "question": "SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3"} +{"answer": "Show the details and star ratings of the 3 least expensive hotels.\nAdditional table information: table: cre_Theme_park", "question": "SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST LIMIT 3"} +{"answer": "What are the details and star ratings of the three hotels with the lowest price ranges?\nAdditional table information: table: cre_Theme_park", "question": "SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST LIMIT 3"} +{"answer": "Show the transportation method most people choose to get to tourist attractions.\nAdditional table information: table: cre_Theme_park", "question": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which transportation method is used the most often to get to tourist attractions?\nAdditional table information: table: cre_Theme_park", "question": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the description and code of the attraction type most tourist attractions belong to.\nAdditional table information: table: cre_Theme_park", "question": "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"} +{"answer": "Which attraction type does the most tourist attractions belong to? Tell me its attraction type description and code.\nAdditional table information: table: cre_Theme_park", "question": "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"} +{"answer": "Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way.\nAdditional table information: table: cre_Theme_park", "question": "SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There"} +{"answer": "List all the possible ways to get to attractions, together with the number of attractions accessible by these methods.\nAdditional table information: table: cre_Theme_park", "question": "SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There"} +{"answer": "Show different tourist attractions' names, ids, and the corresponding number of visits.\nAdditional table information: table: cre_Theme_park", "question": "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"} +{"answer": "What are the name, id and the corresponding number of visits for each tourist attraction?\nAdditional table information: table: cre_Theme_park", "question": "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"} +{"answer": "Show the names and ids of tourist attractions that are visited at least two times.\nAdditional table information: table: cre_Theme_park", "question": "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"} +{"answer": "Which tourist attractions are visited at least twice? Give me their names and ids.\nAdditional table information: table: cre_Theme_park", "question": "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"} +{"answer": "Show the names and ids of tourist attractions that are visited at most once.\nAdditional table information: table: cre_Theme_park", "question": "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"} +{"answer": "What are the names and ids of the tourist attractions that are visited at most once?\nAdditional table information: table: cre_Theme_park", "question": "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"} +{"answer": "What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "What are the names of the tourist attractions that have parking or shopping as their feature details?\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction.\nAdditional table information: table: cre_Theme_park", "question": "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'"} +{"answer": "What are the names of the tourist attractions Vincent and Marcelle visit?\nAdditional table information: table: cre_Theme_park", "question": "SELECT T1.Name FROM Tourist_Attractions AS T1, 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, 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'"} +{"answer": "Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions.\nAdditional table information: table: cre_Theme_park", "question": "SELECT T1.Name FROM Tourist_Attractions AS T1, 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, 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'"} +{"answer": "What are the names of tourist attraction that Alison visited but Rosalind did not visit?\nAdditional table information: table: cre_Theme_park", "question": "SELECT T1.Name FROM Tourist_Attractions AS T1, 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, 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'"} +{"answer": "Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit.\nAdditional table information: table: cre_Theme_park", "question": "SELECT T1.Name FROM Tourist_Attractions AS T1, 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, 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'"} +{"answer": "How many tourists did not make any visit?\nAdditional table information: table: cre_Theme_park", "question": "SELECT COUNT(*) FROM Visitors WHERE NOT Tourist_ID IN (SELECT Tourist_ID FROM Visits)"} +{"answer": "Count the number of tourists who did not visit any place.\nAdditional table information: table: cre_Theme_park", "question": "SELECT COUNT(*) FROM Visitors WHERE NOT Tourist_ID IN (SELECT Tourist_ID FROM Visits)"} +{"answer": "How many video games exist?\nAdditional table information: table: game_1", "question": "SELECT COUNT(*) FROM Video_games"} +{"answer": "How many video games do you have?\nAdditional table information: table: game_1", "question": "SELECT COUNT(*) FROM Video_games"} +{"answer": "How many video game types exist?\nAdditional table information: table: game_1", "question": "SELECT COUNT(DISTINCT gtype) FROM Video_games"} +{"answer": "What is the count of different game types?\nAdditional table information: table: game_1", "question": "SELECT COUNT(DISTINCT gtype) FROM Video_games"} +{"answer": "Show all video game types.\nAdditional table information: table: game_1", "question": "SELECT DISTINCT gtype FROM Video_games"} +{"answer": "What are the different types of video games?\nAdditional table information: table: game_1", "question": "SELECT DISTINCT gtype FROM Video_games"} +{"answer": "Show all video games and their types in the order of their names.\nAdditional table information: table: game_1", "question": "SELECT gname, gtype FROM Video_games ORDER BY gname NULLS FIRST"} +{"answer": "What are the names of all the video games and their types in alphabetical order?\nAdditional table information: table: game_1", "question": "SELECT gname, gtype FROM Video_games ORDER BY gname NULLS FIRST"} +{"answer": "Show all video games with type Collectible card game.\nAdditional table information: table: game_1", "question": "SELECT gname FROM Video_games WHERE gtype = 'Collectible card game'"} +{"answer": "What are the names of all video games that are collectible cards?\nAdditional table information: table: game_1", "question": "SELECT gname FROM Video_games WHERE gtype = 'Collectible card game'"} +{"answer": "What is the type of video game Call of Destiny.\nAdditional table information: table: game_1", "question": "SELECT gtype FROM Video_games WHERE gname = 'Call of Destiny'"} +{"answer": "What type of game is Call of Destiny?\nAdditional table information: table: game_1", "question": "SELECT gtype FROM Video_games WHERE gname = 'Call of Destiny'"} +{"answer": "How many video games have type Massively multiplayer online game?\nAdditional table information: table: game_1", "question": "SELECT COUNT(*) FROM Video_games WHERE gtype = 'Massively multiplayer online game'"} +{"answer": "Count the number of video games with Massively multiplayer online game type .\nAdditional table information: table: game_1", "question": "SELECT COUNT(*) FROM Video_games WHERE gtype = 'Massively multiplayer online game'"} +{"answer": "Show all video game types and the number of video games in each type.\nAdditional table information: table: game_1", "question": "SELECT gtype, COUNT(*) FROM Video_games GROUP BY gtype"} +{"answer": "What are the types of video games and how many are in each type?\nAdditional table information: table: game_1", "question": "SELECT gtype, COUNT(*) FROM Video_games GROUP BY gtype"} +{"answer": "Which game type has most number of games?\nAdditional table information: table: game_1", "question": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What type has the most games?\nAdditional table information: table: game_1", "question": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which game type has least number of games?\nAdditional table information: table: game_1", "question": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "What is the type with the fewest games?\nAdditional table information: table: game_1", "question": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) NULLS FIRST LIMIT 1"} +{"answer": "Show ids for all students who live in CHI.\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Student WHERE city_code = 'CHI'"} +{"answer": "What are the ids of all students who live in CHI?\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Student WHERE city_code = 'CHI'"} +{"answer": "Show ids for all students who have advisor 1121.\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Student WHERE Advisor = 1121"} +{"answer": "What are the ids of all students who have advisor number 1121?\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Student WHERE Advisor = 1121"} +{"answer": "Show first name for all students with major 600.\nAdditional table information: table: game_1", "question": "SELECT Fname FROM Student WHERE Major = 600"} +{"answer": "What are the first names for all students who are from the major numbered 600?\nAdditional table information: table: game_1", "question": "SELECT Fname FROM Student WHERE Major = 600"} +{"answer": "Show the average, minimum, and maximum age for different majors.\nAdditional table information: table: game_1", "question": "SELECT major, AVG(age), MIN(age), MAX(age) FROM Student GROUP BY major"} +{"answer": "What are the average, minimum, and max ages for each of the different majors?\nAdditional table information: table: game_1", "question": "SELECT major, AVG(age), MIN(age), MAX(age) FROM Student GROUP BY major"} +{"answer": "Show all advisors who have at least two students.\nAdditional table information: table: game_1", "question": "SELECT advisor FROM Student GROUP BY advisor HAVING COUNT(*) >= 2"} +{"answer": "What are the advisors\nAdditional table information: table: game_1", "question": "SELECT advisor FROM Student GROUP BY advisor HAVING COUNT(*) >= 2"} +{"answer": "How many sports do we have?\nAdditional table information: table: game_1", "question": "SELECT COUNT(DISTINCT sportname) FROM Sportsinfo"} +{"answer": "How many different types of sports do we offer?\nAdditional table information: table: game_1", "question": "SELECT COUNT(DISTINCT sportname) FROM Sportsinfo"} +{"answer": "How many students play sports?\nAdditional table information: table: game_1", "question": "SELECT COUNT(DISTINCT StuID) FROM Sportsinfo"} +{"answer": "How many different students are involved in sports?\nAdditional table information: table: game_1", "question": "SELECT COUNT(DISTINCT StuID) FROM Sportsinfo"} +{"answer": "List ids for all student who are on scholarship.\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'"} +{"answer": "What are the ids for all sporty students who are on scholarship?\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'"} +{"answer": "Show last names for all student who are on scholarship.\nAdditional table information: table: game_1", "question": "SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'"} +{"answer": "What are the last names for all scholarship students?\nAdditional table information: table: game_1", "question": "SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'"} +{"answer": "How many games are played for all students?\nAdditional table information: table: game_1", "question": "SELECT SUM(gamesplayed) FROM Sportsinfo"} +{"answer": "What is the total number of games played?\nAdditional table information: table: game_1", "question": "SELECT SUM(gamesplayed) FROM Sportsinfo"} +{"answer": "How many games are played for all football games by students on scholarship?\nAdditional table information: table: game_1", "question": "SELECT SUM(gamesplayed) FROM Sportsinfo WHERE sportname = 'Football' AND onscholarship = 'Y'"} +{"answer": "What is the total number of all football games played by scholarship students?\nAdditional table information: table: game_1", "question": "SELECT SUM(gamesplayed) FROM Sportsinfo WHERE sportname = 'Football' AND onscholarship = 'Y'"} +{"answer": "Show all sport name and the number of students.\nAdditional table information: table: game_1", "question": "SELECT sportname, COUNT(*) FROM Sportsinfo GROUP BY sportname"} +{"answer": "How many students play each sport?\nAdditional table information: table: game_1", "question": "SELECT sportname, COUNT(*) FROM Sportsinfo GROUP BY sportname"} +{"answer": "Show all student IDs with the number of sports and total number of games played\nAdditional table information: table: game_1", "question": "SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID"} +{"answer": "What are the ids of all students along with how many sports and games did they play?\nAdditional table information: table: game_1", "question": "SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID"} +{"answer": "Show all student IDs with more than total 10 hours per week on all sports played.\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM(hoursperweek) > 10"} +{"answer": "What are the student IDs for everybody who worked for more than 10 hours per week on all sports?\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM(hoursperweek) > 10"} +{"answer": "What is the first name and last name of the student who have most number of sports?\nAdditional table information: table: game_1", "question": "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"} +{"answer": "What is the first and last name of the student who played the most sports?\nAdditional table information: table: game_1", "question": "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"} +{"answer": "Which sport has most number of students on scholarship?\nAdditional table information: table: game_1", "question": "SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the sport with the most scholarship students?\nAdditional table information: table: game_1", "question": "SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show student ids who don't have any sports.\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo"} +{"answer": "What are the ids of all students who don't play sports?\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo"} +{"answer": "Show student ids who are on scholarship and have major 600.\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'"} +{"answer": "What are the student ids for those on scholarship in major number 600?\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'"} +{"answer": "Show student ids who are female and play football.\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football'"} +{"answer": "What are the ids of all female students who play football?\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football'"} +{"answer": "Show all male student ids who don't play football.\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football'"} +{"answer": "What are the ids of all male students who do not play football?\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football'"} +{"answer": "Show total hours per week and number of games played for student David Shieber.\nAdditional table information: table: game_1", "question": "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'"} +{"answer": "What is the total number of hours per work and number of games played by David Shieber?\nAdditional table information: table: game_1", "question": "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'"} +{"answer": "Show total hours per week and number of games played for students under 20.\nAdditional table information: table: game_1", "question": "SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20"} +{"answer": "What is the total number of hours per week and number of games played by students under 20?\nAdditional table information: table: game_1", "question": "SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20"} +{"answer": "How many students play video games?\nAdditional table information: table: game_1", "question": "SELECT COUNT(DISTINCT StuID) FROM Plays_games"} +{"answer": "How many different students play games?\nAdditional table information: table: game_1", "question": "SELECT COUNT(DISTINCT StuID) FROM Plays_games"} +{"answer": "Show ids of students who don't play video game.\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games"} +{"answer": "What are the ids of all students who are not video game players?\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games"} +{"answer": "Show ids of students who play video game and play sports.\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games"} +{"answer": "What are the ids of all students who played video games and sports?\nAdditional table information: table: game_1", "question": "SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games"} +{"answer": "Show all game ids and the number of hours played.\nAdditional table information: table: game_1", "question": "SELECT gameid, SUM(hours_played) FROM Plays_games GROUP BY gameid"} +{"answer": "What are ids and total number of hours played for each game?\nAdditional table information: table: game_1", "question": "SELECT gameid, SUM(hours_played) FROM Plays_games GROUP BY gameid"} +{"answer": "Show all student ids and the number of hours played.\nAdditional table information: table: game_1", "question": "SELECT Stuid, SUM(hours_played) FROM Plays_games GROUP BY Stuid"} +{"answer": "What are the ids of all students and number of hours played?\nAdditional table information: table: game_1", "question": "SELECT Stuid, SUM(hours_played) FROM Plays_games GROUP BY Stuid"} +{"answer": "Show the game name that has most number of hours played.\nAdditional table information: table: game_1", "question": "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"} +{"answer": "What is the name of the game that has been played the most?\nAdditional table information: table: game_1", "question": "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"} +{"answer": "Show all game names played by at least 1000 hours.\nAdditional table information: table: game_1", "question": "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"} +{"answer": "What are the names of all the games that have been played for at least 1000 hours?\nAdditional table information: table: game_1", "question": "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"} +{"answer": "Show all game names played by Linda Smith\nAdditional table information: table: game_1", "question": "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'"} +{"answer": "What are the names of all games played by Linda Smith?\nAdditional table information: table: game_1", "question": "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'"} +{"answer": "Find the last and first name of students who are playing Football or Lacrosse.\nAdditional table information: table: game_1", "question": "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'"} +{"answer": "What is the first and last name of all students who play Football or Lacrosse?\nAdditional table information: table: game_1", "question": "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'"} +{"answer": "Find the first name and age of the students who are playing both Football and Lacrosse.\nAdditional table information: table: game_1", "question": "SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = 'Football' INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = 'Lacrosse')"} +{"answer": "What are the first names and ages of all students who are playing both Football and Lacrosse?\nAdditional table information: table: game_1", "question": "SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = 'Football' INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = 'Lacrosse')"} +{"answer": "Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games.\nAdditional table information: table: game_1", "question": "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')"} +{"answer": "what is the last name and gender of all students who played both Call of Destiny and Works of Widenius?\nAdditional table information: table: game_1", "question": "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')"} +{"answer": "Find the name of all customers.\nAdditional table information: table: customers_and_addresses", "question": "SELECT customer_name FROM customers"} +{"answer": "What are the names of all the customers?\nAdditional table information: table: customers_and_addresses", "question": "SELECT customer_name FROM customers"} +{"answer": "How many customers are there?\nAdditional table information: table: customers_and_addresses", "question": "SELECT COUNT(*) FROM customers"} +{"answer": "Return the total number of distinct customers.\nAdditional table information: table: customers_and_addresses", "question": "SELECT COUNT(*) FROM customers"} +{"answer": "What is the average amount of items ordered in each order?\nAdditional table information: table: customers_and_addresses", "question": "SELECT AVG(order_quantity) FROM order_items"} +{"answer": "Find the average order quantity per order.\nAdditional table information: table: customers_and_addresses", "question": "SELECT AVG(order_quantity) FROM order_items"} +{"answer": "What are the names of customers who use payment method 'Cash'?\nAdditional table information: table: customers_and_addresses", "question": "SELECT customer_name FROM customers WHERE payment_method = 'Cash'"} +{"answer": "Which customers use 'Cash' for payment method? Return the customer names.\nAdditional table information: table: customers_and_addresses", "question": "SELECT customer_name FROM customers WHERE payment_method = 'Cash'"} +{"answer": "Find the 'date became customers' of the customers whose ID is between 10 and 20.\nAdditional table information: table: customers_and_addresses", "question": "SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20"} +{"answer": "What are the dates when customers with ids between 10 and 20 became customers?\nAdditional table information: table: customers_and_addresses", "question": "SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20"} +{"answer": "Which payment method is used by most customers?\nAdditional table information: table: customers_and_addresses", "question": "SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the payment method that is used most frequently.\nAdditional table information: table: customers_and_addresses", "question": "SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the names of customers using the most popular payment method?\nAdditional table information: table: customers_and_addresses", "question": "SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1)"} +{"answer": "Find the name of the customers who use the most frequently used payment method.\nAdditional table information: table: customers_and_addresses", "question": "SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1)"} +{"answer": "What are all the payment methods?\nAdditional table information: table: customers_and_addresses", "question": "SELECT DISTINCT payment_method FROM customers"} +{"answer": "Return all the distinct payment methods used by customers.\nAdditional table information: table: customers_and_addresses", "question": "SELECT DISTINCT payment_method FROM customers"} +{"answer": "What are the details of all products?\nAdditional table information: table: customers_and_addresses", "question": "SELECT DISTINCT product_details FROM products"} +{"answer": "Return the the details of all products.\nAdditional table information: table: customers_and_addresses", "question": "SELECT DISTINCT product_details FROM products"} +{"answer": "Find the name of all customers whose name contains 'Alex'.\nAdditional table information: table: customers_and_addresses", "question": "SELECT customer_name FROM customers WHERE customer_name LIKE '%Alex%'"} +{"answer": "Which customer's name contains 'Alex'? Find the full name.\nAdditional table information: table: customers_and_addresses", "question": "SELECT customer_name FROM customers WHERE customer_name LIKE '%Alex%'"} +{"answer": "Find the detail of products whose detail contains the word 'Latte' or the word 'Americano'\nAdditional table information: table: customers_and_addresses", "question": "SELECT product_details FROM products WHERE product_details LIKE '%Latte%' OR product_details LIKE '%Americano%'"} +{"answer": "Which product's detail contains the word 'Latte' or 'Americano'? Return the full detail.\nAdditional table information: table: customers_and_addresses", "question": "SELECT product_details FROM products WHERE product_details LIKE '%Latte%' OR product_details LIKE '%Americano%'"} +{"answer": "What is the address content of the customer named 'Maudie Kertzmann'?\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "Return the address content for the customer whose name is 'Maudie Kertzmann'.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "How many customers are living in city 'Lake Geovannyton'?\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "Find the number of customers who live in the city called Lake Geovannyton.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "Find the name of customers who are living in Colorado?\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "What are the names of customers who live in Colorado state?\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "Find the list of cities that no customer is living in.\nAdditional table information: table: customers_and_addresses", "question": "SELECT city FROM addresses WHERE NOT city 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)"} +{"answer": "What are the cities no customers live in?\nAdditional table information: table: customers_and_addresses", "question": "SELECT city FROM addresses WHERE NOT city 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)"} +{"answer": "Which city has the most customers living in?\nAdditional table information: table: customers_and_addresses", "question": "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"} +{"answer": "Find the city where the most customers live.\nAdditional table information: table: customers_and_addresses", "question": "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"} +{"answer": "Retrieve the list of all cities.\nAdditional table information: table: customers_and_addresses", "question": "SELECT DISTINCT city FROM addresses"} +{"answer": "List all the distinct cities\nAdditional table information: table: customers_and_addresses", "question": "SELECT DISTINCT city FROM addresses"} +{"answer": "Find the city with post code 255.\nAdditional table information: table: customers_and_addresses", "question": "SELECT city FROM addresses WHERE zip_postcode = 255"} +{"answer": "Which city is post code 255 located in?\nAdditional table information: table: customers_and_addresses", "question": "SELECT city FROM addresses WHERE zip_postcode = 255"} +{"answer": "Find the state and country of all cities with post code starting with 4.\nAdditional table information: table: customers_and_addresses", "question": "SELECT state_province_county, country FROM addresses WHERE zip_postcode LIKE '4%'"} +{"answer": "What are the state and country of all the cities that have post codes starting with 4.\\\nAdditional table information: table: customers_and_addresses", "question": "SELECT state_province_county, country FROM addresses WHERE zip_postcode LIKE '4%'"} +{"answer": "List the countries having more than 4 addresses listed.\nAdditional table information: table: customers_and_addresses", "question": "SELECT country FROM addresses GROUP BY country HAVING COUNT(address_id) > 4"} +{"answer": "For which countries are there more than four distinct addresses listed?\nAdditional table information: table: customers_and_addresses", "question": "SELECT country FROM addresses GROUP BY country HAVING COUNT(address_id) > 4"} +{"answer": "List all the contact channel codes that were used less than 5 times.\nAdditional table information: table: customers_and_addresses", "question": "SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING COUNT(customer_id) < 5"} +{"answer": "Which contact channel codes were used less than 5 times?\nAdditional table information: table: customers_and_addresses", "question": "SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING COUNT(customer_id) < 5"} +{"answer": "Which contact channel has been used by the customer with name 'Tillman Ernser'?\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "Find the contact channel code that was used by the customer named 'Tillman Ernser'.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "What is the 'active to date' of the latest contact channel used by 'Tillman Ernser'?\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "Return the the 'active to date' of the latest contact channel used by the customer named 'Tillman Ernser'.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "What is the average time span of contact channels in the database?\nAdditional table information: table: customers_and_addresses", "question": "SELECT AVG(active_to_date - active_from_date) FROM customer_contact_channels"} +{"answer": "Compute the average active time span of contact channels.\nAdditional table information: table: customers_and_addresses", "question": "SELECT AVG(active_to_date - active_from_date) FROM customer_contact_channels"} +{"answer": "What is the channel code and contact number of the customer contact channel that was active for the longest time?\nAdditional table information: table: customers_and_addresses", "question": "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)"} +{"answer": "Return the channel code and contact number of the customer contact channel whose active duration was the longest.\nAdditional table information: table: customers_and_addresses", "question": "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)"} +{"answer": "Find the name and active date of the customer that use email as the contact channel.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "What are the name and active date of the customers whose contact channel code is email?\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "What is the name of the customer that made the order with the largest quantity?\nAdditional table information: table: customers_and_addresses", "question": "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)"} +{"answer": "Find the name of the customer who made the order of the largest amount of goods.\nAdditional table information: table: customers_and_addresses", "question": "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)"} +{"answer": "What is the name of the customer that has purchased the most items?\nAdditional table information: table: customers_and_addresses", "question": "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"} +{"answer": "Give me the name of the customer who ordered the most items in total.\nAdditional table information: table: customers_and_addresses", "question": "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"} +{"answer": "What is the payment method of the customer that has purchased the least quantity of items?\nAdditional table information: table: customers_and_addresses", "question": "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) NULLS FIRST LIMIT 1"} +{"answer": "Tell me the payment method used by the customer who ordered the least amount of goods in total.\nAdditional table information: table: customers_and_addresses", "question": "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) NULLS FIRST LIMIT 1"} +{"answer": "How many types of products have Rodrick Heaney bought in total?\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "Find the number of distinct products Rodrick Heaney has bought so far.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "What is the total quantity of products purchased by 'Rodrick Heaney'?\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "Tell me the total quantity of products bought by the customer called 'Rodrick Heaney'.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "How many customers have at least one order with status 'Cancelled'?\nAdditional table information: table: customers_and_addresses", "question": "SELECT COUNT(DISTINCT customer_id) FROM customer_orders WHERE order_status = 'Cancelled'"} +{"answer": "Return the number of customers who have at least one order with 'Cancelled' status.\nAdditional table information: table: customers_and_addresses", "question": "SELECT COUNT(DISTINCT customer_id) FROM customer_orders WHERE order_status = 'Cancelled'"} +{"answer": "How many orders have detail 'Second time'?\nAdditional table information: table: customers_and_addresses", "question": "SELECT COUNT(*) FROM customer_orders WHERE order_details = 'Second time'"} +{"answer": "Tell me the number of orders with 'Second time' as order detail.\nAdditional table information: table: customers_and_addresses", "question": "SELECT COUNT(*) FROM customer_orders WHERE order_details = 'Second time'"} +{"answer": "Find the customer name and date of the orders that have the status 'Delivered'.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "What are the customer name and date of the orders whose status is 'Delivered'.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "What is the total number of products that are in orders with status 'Cancelled'?\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "Find the total quantity of products associated with the orders in the 'Cancelled' status.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "Find the total amount of products ordered before 2018-03-17 07:13:53.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "What is the total amount of products purchased before 2018-03-17 07:13:53?\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "Who made the latest order?\nAdditional table information: table: customers_and_addresses", "question": "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"} +{"answer": "Find the name of the customer who made an order most recently.\nAdditional table information: table: customers_and_addresses", "question": "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"} +{"answer": "Which product has been ordered most number of times?\nAdditional table information: table: customers_and_addresses", "question": "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"} +{"answer": "What is the most frequently ordered product? Tell me the detail of the product\nAdditional table information: table: customers_and_addresses", "question": "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"} +{"answer": "Find the name and ID of the product whose total order quantity is the largest.\nAdditional table information: table: customers_and_addresses", "question": "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) NULLS FIRST LIMIT 1"} +{"answer": "What are the name and ID of the product bought the most.\nAdditional table information: table: customers_and_addresses", "question": "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) NULLS FIRST LIMIT 1"} +{"answer": "Find all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "What are all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "Find the name of customers who did not pay with Cash.\nAdditional table information: table: customers_and_addresses", "question": "SELECT customer_name FROM customers WHERE payment_method <> 'Cash'"} +{"answer": "What is the name of customers who do not use Cash as payment method.\nAdditional table information: table: customers_and_addresses", "question": "SELECT customer_name FROM customers WHERE payment_method <> 'Cash'"} +{"answer": "Find the names of customers who never ordered product Latte.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "What are names of customers who never ordered product Latte.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "Find the names of customers who never placed an order.\nAdditional table information: table: customers_and_addresses", "question": "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"} +{"answer": "What are the names of customers who never made an order.\nAdditional table information: table: customers_and_addresses", "question": "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"} +{"answer": "Find the names of customers who ordered both products Latte and Americano.\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "What are the names of customers who have purchased both products Latte and Americano?\nAdditional table information: table: customers_and_addresses", "question": "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'"} +{"answer": "How many artists are there?\nAdditional table information: table: music_4", "question": "SELECT COUNT(*) FROM artist"} +{"answer": "Count the number of artists.\nAdditional table information: table: music_4", "question": "SELECT COUNT(*) FROM artist"} +{"answer": "List the age of all music artists.\nAdditional table information: table: music_4", "question": "SELECT Age FROM artist"} +{"answer": "What are the ages of all music artists?\nAdditional table information: table: music_4", "question": "SELECT Age FROM artist"} +{"answer": "What is the average age of all artists?\nAdditional table information: table: music_4", "question": "SELECT AVG(Age) FROM artist"} +{"answer": "Return the average age across all artists.\nAdditional table information: table: music_4", "question": "SELECT AVG(Age) FROM artist"} +{"answer": "What are the famous titles of the artist 'Triumfall'?\nAdditional table information: table: music_4", "question": "SELECT Famous_Title FROM artist WHERE Artist = 'Triumfall'"} +{"answer": "Return the famous titles of the artist called 'Triumfall'.\nAdditional table information: table: music_4", "question": "SELECT Famous_Title FROM artist WHERE Artist = 'Triumfall'"} +{"answer": "What are the distinct Famous release dates?\nAdditional table information: table: music_4", "question": "SELECT DISTINCT (Famous_Release_date) FROM artist"} +{"answer": "Give the distinct famous release dates for all artists.\nAdditional table information: table: music_4", "question": "SELECT DISTINCT (Famous_Release_date) FROM artist"} +{"answer": "Return the dates of ceremony and the results of all music festivals\nAdditional table information: table: music_4", "question": "SELECT Date_of_ceremony, RESULT FROM music_festival"} +{"answer": "What are the dates of ceremony and results for each music festival?\nAdditional table information: table: music_4", "question": "SELECT Date_of_ceremony, RESULT FROM music_festival"} +{"answer": "What are the category of music festivals with result 'Awarded'?\nAdditional table information: table: music_4", "question": "SELECT Category FROM music_festival WHERE RESULT = 'Awarded'"} +{"answer": "Return the categories of music festivals that have the result 'Awarded'.\nAdditional table information: table: music_4", "question": "SELECT Category FROM music_festival WHERE RESULT = 'Awarded'"} +{"answer": "What are the maximum and minimum week on top of all volumes?\nAdditional table information: table: music_4", "question": "SELECT MAX(Weeks_on_Top), MIN(Weeks_on_Top) FROM volume"} +{"answer": "Give the maximum and minimum weeks on top across all volumes.\nAdditional table information: table: music_4", "question": "SELECT MAX(Weeks_on_Top), MIN(Weeks_on_Top) FROM volume"} +{"answer": "What are the songs in volumes with more than 1 week on top?\nAdditional table information: table: music_4", "question": "SELECT Song FROM volume WHERE Weeks_on_Top > 1"} +{"answer": "Give the songs included in volumes that have more than 1 week on top.\nAdditional table information: table: music_4", "question": "SELECT Song FROM volume WHERE Weeks_on_Top > 1"} +{"answer": "Please list all songs in volumes in ascending alphabetical order.\nAdditional table information: table: music_4", "question": "SELECT Song FROM volume ORDER BY Song NULLS FIRST"} +{"answer": "What are the the songs in volumes, listed in ascending order?\nAdditional table information: table: music_4", "question": "SELECT Song FROM volume ORDER BY Song NULLS FIRST"} +{"answer": "How many distinct artists do the volumes associate to?\nAdditional table information: table: music_4", "question": "SELECT COUNT(DISTINCT Artist_ID) FROM volume"} +{"answer": "Count the number of distinct artists who have volumes.\nAdditional table information: table: music_4", "question": "SELECT COUNT(DISTINCT Artist_ID) FROM volume"} +{"answer": "Please show the date of ceremony of the volumes that last more than 2 weeks on top.\nAdditional table information: table: music_4", "question": "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"} +{"answer": "What are the dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top?\nAdditional table information: table: music_4", "question": "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"} +{"answer": "Please show the songs that have result 'nominated' at music festivals.\nAdditional table information: table: music_4", "question": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = 'Nominated'"} +{"answer": "What are the songs in volumes that have resulted in a nomination at music festivals?\nAdditional table information: table: music_4", "question": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = 'Nominated'"} +{"answer": "What are the issue dates of volumes associated with the artist 'Gorgoroth'?\nAdditional table information: table: music_4", "question": "SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = 'Gorgoroth'"} +{"answer": "Return the issue dates of volumes that are by the artist named Gorgoroth.\nAdditional table information: table: music_4", "question": "SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = 'Gorgoroth'"} +{"answer": "What are the songs in volumes associated with the artist aged 32 or older?\nAdditional table information: table: music_4", "question": "SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32"} +{"answer": "Return names of songs in volumes that are by artists that are at least 32 years old.\nAdditional table information: table: music_4", "question": "SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32"} +{"answer": "What is the average weeks on top of volumes associated with the artist aged 25 or younger?\nAdditional table information: table: music_4", "question": "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"} +{"answer": "Return the average number of weeks on top for volumes by artists that are at most 25 years old.\nAdditional table information: table: music_4", "question": "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"} +{"answer": "What are the famous title of the artists associated with volumes with more than 2 weeks on top?\nAdditional table information: table: music_4", "question": "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"} +{"answer": "Return the famous titles for artists that have volumes that lasted more than 2 weeks on top.\nAdditional table information: table: music_4", "question": "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"} +{"answer": "Please list the age and famous title of artists in descending order of age.\nAdditional table information: table: music_4", "question": "SELECT Famous_Title, Age FROM artist ORDER BY Age DESC"} +{"answer": "What are the famous titles and ages of each artist, listed in descending order by age?\nAdditional table information: table: music_4", "question": "SELECT Famous_Title, Age FROM artist ORDER BY Age DESC"} +{"answer": "What is the famous release date of the artist with the oldest age?\nAdditional table information: table: music_4", "question": "SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1"} +{"answer": "Return the famous release date for the oldest artist.\nAdditional table information: table: music_4", "question": "SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1"} +{"answer": "Please show the categories of the music festivals and the count.\nAdditional table information: table: music_4", "question": "SELECT Category, COUNT(*) FROM music_festival GROUP BY Category"} +{"answer": "Return the number of music festivals of each category.\nAdditional table information: table: music_4", "question": "SELECT Category, COUNT(*) FROM music_festival GROUP BY Category"} +{"answer": "What is the most common result of the music festival?\nAdditional table information: table: music_4", "question": "SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Return the result that is most frequent at music festivals.\nAdditional table information: table: music_4", "question": "SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Please show the categories of the music festivals with count more than 1.\nAdditional table information: table: music_4", "question": "SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1"} +{"answer": "What are the categories of music festivals for which there have been more than 1 music festival?\nAdditional table information: table: music_4", "question": "SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1"} +{"answer": "What is the song in the volume with the maximum weeks on top?\nAdditional table information: table: music_4", "question": "SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1"} +{"answer": "Return the song in the volume that has spent the most weeks on top?\nAdditional table information: table: music_4", "question": "SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1"} +{"answer": "Find the famous titles of artists that do not have any volume.\nAdditional table information: table: music_4", "question": "SELECT Famous_Title FROM artist WHERE NOT Artist_ID IN (SELECT Artist_ID FROM volume)"} +{"answer": "What are the famous titles of artists who do not have any volumes?\nAdditional table information: table: music_4", "question": "SELECT Famous_Title FROM artist WHERE NOT Artist_ID IN (SELECT Artist_ID FROM volume)"} +{"answer": "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.\nAdditional table information: table: music_4", "question": "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"} +{"answer": "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?\nAdditional table information: table: music_4", "question": "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"} +{"answer": "What are the date of ceremony of music festivals with category 'Best Song' and result 'Awarded'?\nAdditional table information: table: music_4", "question": "SELECT Date_of_ceremony FROM music_festival WHERE Category = 'Best Song' AND RESULT = 'Awarded'"} +{"answer": "Return the dates of ceremony corresponding to music festivals that had the category 'Best Song' and result 'Awarded'.\nAdditional table information: table: music_4", "question": "SELECT Date_of_ceremony FROM music_festival WHERE Category = 'Best Song' AND RESULT = 'Awarded'"} +{"answer": "What is the issue date of the volume with the minimum weeks on top?\nAdditional table information: table: music_4", "question": "SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC NULLS FIRST LIMIT 1"} +{"answer": "Return the issue date of the volume that has spent the fewest weeks on top.\nAdditional table information: table: music_4", "question": "SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC NULLS FIRST LIMIT 1"} +{"answer": "How many distinct artists have volumes?\nAdditional table information: table: music_4", "question": "SELECT COUNT(DISTINCT Artist_ID) FROM volume"} +{"answer": "Count the number of artists who have had volumes.\nAdditional table information: table: music_4", "question": "SELECT COUNT(DISTINCT Artist_ID) FROM volume"} +{"answer": "Please show the results of music festivals and the number of music festivals that have had each, ordered by this count.\nAdditional table information: table: music_4", "question": "SELECT RESULT, COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC"} +{"answer": "How many music festivals have had each kind of result, ordered descending by count?\nAdditional table information: table: music_4", "question": "SELECT RESULT, COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC"} +{"answer": "What are the issue dates of volumes associated with the artist aged 23 or younger?\nAdditional table information: table: music_4", "question": "SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23"} +{"answer": "Return the issue dates of volumes by artists who are at most 23 years old?\nAdditional table information: table: music_4", "question": "SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23"} +{"answer": "How many roller coasters are there?\nAdditional table information: table: roller_coaster", "question": "SELECT COUNT(*) FROM roller_coaster"} +{"answer": "List the names of roller coasters by ascending order of length.\nAdditional table information: table: roller_coaster", "question": "SELECT Name FROM roller_coaster ORDER BY LENGTH ASC NULLS FIRST"} +{"answer": "What are the lengths and heights of roller coasters?\nAdditional table information: table: roller_coaster", "question": "SELECT LENGTH, Height FROM roller_coaster"} +{"answer": "List the names of countries whose language is not 'German'.\nAdditional table information: table: roller_coaster", "question": "SELECT Name FROM country WHERE Languages <> 'German'"} +{"answer": "Show the statuses of roller coasters longer than 3300 or higher than 100.\nAdditional table information: table: roller_coaster", "question": "SELECT Status FROM roller_coaster WHERE LENGTH > 3300 OR Height > 100"} +{"answer": "What are the speeds of the longest roller coaster?\nAdditional table information: table: roller_coaster", "question": "SELECT Speed FROM roller_coaster ORDER BY LENGTH DESC LIMIT 1"} +{"answer": "What is the average speed of roller coasters?\nAdditional table information: table: roller_coaster", "question": "SELECT AVG(Speed) FROM roller_coaster"} +{"answer": "Show the different statuses and the numbers of roller coasters for each status.\nAdditional table information: table: roller_coaster", "question": "SELECT Status, COUNT(*) FROM roller_coaster GROUP BY Status"} +{"answer": "Please show the most common status of roller coasters.\nAdditional table information: table: roller_coaster", "question": "SELECT Status FROM roller_coaster GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List the status shared by more than two roller coaster.\nAdditional table information: table: roller_coaster", "question": "SELECT Status FROM roller_coaster GROUP BY Status HAVING COUNT(*) > 2"} +{"answer": "Show the park of the roller coaster with the highest speed.\nAdditional table information: table: roller_coaster", "question": "SELECT Park FROM roller_coaster ORDER BY Speed DESC LIMIT 1"} +{"answer": "Show the names of roller coasters and names of country they are in.\nAdditional table information: table: roller_coaster", "question": "SELECT T2.Name, T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID"} +{"answer": "Show the names of countries that have more than one roller coaster.\nAdditional table information: table: roller_coaster", "question": "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"} +{"answer": "Show the name and population of the country that has the highest roller coaster.\nAdditional table information: table: roller_coaster", "question": "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"} +{"answer": "Show the names of countries and the average speed of roller coasters from each country.\nAdditional table information: table: roller_coaster", "question": "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"} +{"answer": "How many countries do not have an roller coaster longer than 3000?\nAdditional table information: table: roller_coaster", "question": "SELECT COUNT(*) FROM country WHERE NOT country_id IN (SELECT country_id FROM roller_coaster WHERE LENGTH > 3000)"} +{"answer": "What are the country names, area and population which has both roller coasters with speed higher\nAdditional table information: table: roller_coaster", "question": "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"} +{"answer": "How many different captain ranks are there?\nAdditional table information: table: ship_1", "question": "SELECT COUNT(DISTINCT rank) FROM captain"} +{"answer": "Count the number of different ranks of captain.\nAdditional table information: table: ship_1", "question": "SELECT COUNT(DISTINCT rank) FROM captain"} +{"answer": "How many captains are in each rank?\nAdditional table information: table: ship_1", "question": "SELECT COUNT(*), rank FROM captain GROUP BY rank"} +{"answer": "Count the number of captains that have each rank.\nAdditional table information: table: ship_1", "question": "SELECT COUNT(*), rank FROM captain GROUP BY rank"} +{"answer": "How many captains with younger than 50 are in each rank?\nAdditional table information: table: ship_1", "question": "SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank"} +{"answer": "Count the number of captains younger than 50 of each rank.\nAdditional table information: table: ship_1", "question": "SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank"} +{"answer": "Sort all captain names by their ages from old to young.\nAdditional table information: table: ship_1", "question": "SELECT name FROM captain ORDER BY age DESC"} +{"answer": "What are the names of captains, sorted by age descending?\nAdditional table information: table: ship_1", "question": "SELECT name FROM captain ORDER BY age DESC"} +{"answer": "Find the name, class and rank of all captains.\nAdditional table information: table: ship_1", "question": "SELECT name, CLASS, rank FROM captain"} +{"answer": "What are the names, classes, and ranks of all captains?\nAdditional table information: table: ship_1", "question": "SELECT name, CLASS, rank FROM captain"} +{"answer": "Which rank is the most common among captains?\nAdditional table information: table: ship_1", "question": "SELECT rank FROM captain GROUP BY rank ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Return the rank for which there are the fewest captains.\nAdditional table information: table: ship_1", "question": "SELECT rank FROM captain GROUP BY rank ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which classes have more than two captains?\nAdditional table information: table: ship_1", "question": "SELECT CLASS FROM captain GROUP BY CLASS HAVING COUNT(*) > 2"} +{"answer": "Give the classes that have more than two captains.\nAdditional table information: table: ship_1", "question": "SELECT CLASS FROM captain GROUP BY CLASS HAVING COUNT(*) > 2"} +{"answer": "Find the name of captains whose rank are either Midshipman or Lieutenant.\nAdditional table information: table: ship_1", "question": "SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant'"} +{"answer": "What are the names of captains that have either the rank Midshipman or Lieutenant?\nAdditional table information: table: ship_1", "question": "SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant'"} +{"answer": "What are the average and minimum age of captains in different class?\nAdditional table information: table: ship_1", "question": "SELECT AVG(age), MIN(age), CLASS FROM captain GROUP BY CLASS"} +{"answer": "Return the average and minimum age of captains in each class.\nAdditional table information: table: ship_1", "question": "SELECT AVG(age), MIN(age), CLASS FROM captain GROUP BY CLASS"} +{"answer": "Find the captain rank that has some captains in both Cutter and Armed schooner classes.\nAdditional table information: table: ship_1", "question": "SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner'"} +{"answer": "What are the ranks of captains that are both in the Cutter and Armed schooner classes?\nAdditional table information: table: ship_1", "question": "SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner'"} +{"answer": "Find the captain rank that has no captain in Third-rate ship of the line class.\nAdditional table information: table: ship_1", "question": "SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line'"} +{"answer": "What are the ranks of captains that have no captain that are in the Third-rate ship of the line class?\nAdditional table information: table: ship_1", "question": "SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line'"} +{"answer": "What is the name of the youngest captain?\nAdditional table information: table: ship_1", "question": "SELECT name FROM captain ORDER BY age NULLS FIRST LIMIT 1"} +{"answer": "Return the name of the youngest captain.\nAdditional table information: table: ship_1", "question": "SELECT name FROM captain ORDER BY age NULLS FIRST LIMIT 1"} +{"answer": "how many ships are there?\nAdditional table information: table: ship_1", "question": "SELECT COUNT(*) FROM ship"} +{"answer": "Count the number of ships.\nAdditional table information: table: ship_1", "question": "SELECT COUNT(*) FROM ship"} +{"answer": "Find the name, type, and flag of the ship that is built in the most recent year.\nAdditional table information: table: ship_1", "question": "SELECT name, TYPE, flag FROM ship ORDER BY built_year DESC LIMIT 1"} +{"answer": "What is the name, type, and flag of the ship that was built in the most recent year?\nAdditional table information: table: ship_1", "question": "SELECT name, TYPE, flag FROM ship ORDER BY built_year DESC LIMIT 1"} +{"answer": "Group by ships by flag, and return number of ships that have each flag.\nAdditional table information: table: ship_1", "question": "SELECT COUNT(*), flag FROM ship GROUP BY flag"} +{"answer": "What are the different ship flags, and how many ships have each?\nAdditional table information: table: ship_1", "question": "SELECT COUNT(*), flag FROM ship GROUP BY flag"} +{"answer": "Which flag is most widely used among all ships?\nAdditional table information: table: ship_1", "question": "SELECT flag FROM ship GROUP BY flag ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Return the flag that is most common among all ships.\nAdditional table information: table: ship_1", "question": "SELECT flag FROM ship GROUP BY flag ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List all ship names in the order of built year and class.\nAdditional table information: table: ship_1", "question": "SELECT name FROM ship ORDER BY built_year NULLS FIRST, CLASS NULLS FIRST"} +{"answer": "What are the names of ships, ordered by year they were built and their class?\nAdditional table information: table: ship_1", "question": "SELECT name FROM ship ORDER BY built_year NULLS FIRST, CLASS NULLS FIRST"} +{"answer": "Find the ship type that are used by both ships with Panama and Malta flags.\nAdditional table information: table: ship_1", "question": "SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta'"} +{"answer": "What types of ships have both ships that have Panama Flags and Malta flags?\nAdditional table information: table: ship_1", "question": "SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta'"} +{"answer": "In which year were most of ships built?\nAdditional table information: table: ship_1", "question": "SELECT built_year FROM ship GROUP BY built_year ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the year in which most ships were built?\nAdditional table information: table: ship_1", "question": "SELECT built_year FROM ship GROUP BY built_year ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the name of the ships that have more than one captain.\nAdditional table information: table: ship_1", "question": "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"} +{"answer": "What are the names of ships that have more than one captain?\nAdditional table information: table: ship_1", "question": "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"} +{"answer": "what are the names and classes of the ships that do not have any captain yet?\nAdditional table information: table: ship_1", "question": "SELECT name, CLASS FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain)"} +{"answer": "Return the names and classes of ships that do not have a captain?\nAdditional table information: table: ship_1", "question": "SELECT name, CLASS FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain)"} +{"answer": "Find the name of the ship that is steered by the youngest captain.\nAdditional table information: table: ship_1", "question": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age NULLS FIRST LIMIT 1"} +{"answer": "What is the name of the ship that is commanded by the youngest captain?\nAdditional table information: table: ship_1", "question": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age NULLS FIRST LIMIT 1"} +{"answer": "Find the name and flag of ships that are not steered by any captain with Midshipman rank.\nAdditional table information: table: ship_1", "question": "SELECT name, flag FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman')"} +{"answer": "What are the names and flags of ships that do not have a captain with the rank of Midshipman?\nAdditional table information: table: ship_1", "question": "SELECT name, flag FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman')"} +{"answer": "Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank.\nAdditional table information: table: ship_1", "question": "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'"} +{"answer": "What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant?\nAdditional table information: table: ship_1", "question": "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'"} +{"answer": "What is id of the city that hosted events in the most recent year?\nAdditional table information: table: city_record", "question": "SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1"} +{"answer": "Find the city that hosted some events in the most recent year. What is the id of this city?\nAdditional table information: table: city_record", "question": "SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1"} +{"answer": "Find the match ids of the cities that hosted competition '1994 FIFA World Cup qualification'?\nAdditional table information: table: city_record", "question": "SELECT match_id FROM MATCH WHERE competition = '1994 FIFA World Cup qualification'"} +{"answer": "What is the match id of the competition called '1994 FIFA World Cup qualification'?\nAdditional table information: table: city_record", "question": "SELECT match_id FROM MATCH WHERE competition = '1994 FIFA World Cup qualification'"} +{"answer": "Find the cities which were once a host city after 2010?\nAdditional table information: table: city_record", "question": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010"} +{"answer": "Which cities served as a host city after 2010?\nAdditional table information: table: city_record", "question": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010"} +{"answer": "Which city has hosted the most events?\nAdditional table information: table: city_record", "question": "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"} +{"answer": "Find the city that hosted the most events.\nAdditional table information: table: city_record", "question": "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"} +{"answer": "What is the venue of the competition '1994 FIFA World Cup qualification' hosted by 'Nanjing ( Jiangsu )'?\nAdditional table information: table: city_record", "question": "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'"} +{"answer": "Find the venue of the competition '1994 FIFA World Cup qualification' which was hosted by 'Nanjing ( Jiangsu )'.\nAdditional table information: table: city_record", "question": "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'"} +{"answer": "Give me the temperature of Shanghai in January.\nAdditional table information: table: city_record", "question": "SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = 'Shanghai'"} +{"answer": "What is the temperature of 'Shanghai' city in January?\nAdditional table information: table: city_record", "question": "SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = 'Shanghai'"} +{"answer": "What is the host year of city 'Taizhou ( Zhejiang )'?\nAdditional table information: table: city_record", "question": "SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = 'Taizhou ( Zhejiang )'"} +{"answer": "IN which year did city 'Taizhou ( Zhejiang )' serve as a host city?\nAdditional table information: table: city_record", "question": "SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = 'Taizhou ( Zhejiang )'"} +{"answer": "Which three cities have the largest regional population?\nAdditional table information: table: city_record", "question": "SELECT city FROM city ORDER BY regional_population DESC LIMIT 3"} +{"answer": "What are the three largest cities in terms of regional population?\nAdditional table information: table: city_record", "question": "SELECT city FROM city ORDER BY regional_population DESC LIMIT 3"} +{"answer": "Which city has the lowest GDP? Please list the city name and its GDP.\nAdditional table information: table: city_record", "question": "SELECT city, GDP FROM city ORDER BY GDP NULLS FIRST LIMIT 1"} +{"answer": "What is the city with the smallest GDP? Return the city and its GDP.\nAdditional table information: table: city_record", "question": "SELECT city, GDP FROM city ORDER BY GDP NULLS FIRST LIMIT 1"} +{"answer": "Which city has the highest temperature in February?\nAdditional table information: table: city_record", "question": "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"} +{"answer": "In February, which city marks the highest temperature?\nAdditional table information: table: city_record", "question": "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"} +{"answer": "Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct?\nAdditional table information: table: city_record", "question": "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"} +{"answer": "Which cities' temperature in March is lower than that in July or higher than that in Oct?\nAdditional table information: table: city_record", "question": "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"} +{"answer": "Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities?\nAdditional table information: table: city_record", "question": "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"} +{"answer": "Which cities have lower temperature in March than in July and have been once host cities?\nAdditional table information: table: city_record", "question": "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"} +{"answer": "Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities.\nAdditional table information: table: city_record", "question": "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"} +{"answer": "Which cities have lower temperature in March than in Dec and have never served as host cities?\nAdditional table information: table: city_record", "question": "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"} +{"answer": "Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities?\nAdditional table information: table: city_record", "question": "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"} +{"answer": "Which cities have higher temperature in Feb than in Jun or have once served as host cities?\nAdditional table information: table: city_record", "question": "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"} +{"answer": "Please give me a list of cities whose regional population is over 10000000.\nAdditional table information: table: city_record", "question": "SELECT city FROM city WHERE regional_population > 10000000"} +{"answer": "Which cities have regional population above 10000000?\nAdditional table information: table: city_record", "question": "SELECT city FROM city WHERE regional_population > 10000000"} +{"answer": "Please give me a list of cities whose regional population is over 8000000 or under 5000000.\nAdditional table information: table: city_record", "question": "SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000"} +{"answer": "Which cities have regional population above 8000000 or below 5000000?\nAdditional table information: table: city_record", "question": "SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000"} +{"answer": "Find the number of matches in different competitions.\nAdditional table information: table: city_record", "question": "SELECT COUNT(*), Competition FROM MATCH GROUP BY Competition"} +{"answer": "For each competition, count the number of matches.\nAdditional table information: table: city_record", "question": "SELECT COUNT(*), Competition FROM MATCH GROUP BY Competition"} +{"answer": "List venues of all matches in the order of their dates starting from the most recent one.\nAdditional table information: table: city_record", "question": "SELECT venue FROM MATCH ORDER BY date DESC"} +{"answer": "What are the venues of all the matches? Sort them in the descending order of match date.\nAdditional table information: table: city_record", "question": "SELECT venue FROM MATCH ORDER BY date DESC"} +{"answer": "what is the GDP of the city with the largest population.\nAdditional table information: table: city_record", "question": "SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1"} +{"answer": "Find the GDP of the city with the largest regional population.\nAdditional table information: table: city_record", "question": "SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1"} +{"answer": "What are the GDP and population of the city that already served as a host more than once?\nAdditional table information: table: city_record", "question": "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"} +{"answer": "Which cities have served as host cities more than once? Return me their GDP and population.\nAdditional table information: table: city_record", "question": "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"} +{"answer": "List every individual's first name, middle name and last name in alphabetical order by last name.\nAdditional table information: table: e_government", "question": "SELECT individual_first_name, individual_middle_name, individual_last_name FROM individuals ORDER BY individual_last_name NULLS FIRST"} +{"answer": "What are the first, middle, and last names of all individuals, ordered by last name?\nAdditional table information: table: e_government", "question": "SELECT individual_first_name, individual_middle_name, individual_last_name FROM individuals ORDER BY individual_last_name NULLS FIRST"} +{"answer": "List all the types of forms.\nAdditional table information: table: e_government", "question": "SELECT DISTINCT form_type_code FROM forms"} +{"answer": "What are the different types of forms?\nAdditional table information: table: e_government", "question": "SELECT DISTINCT form_type_code FROM forms"} +{"answer": "Find the name of the most popular party form.\nAdditional table information: table: e_government", "question": "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"} +{"answer": "What is the name of the party form that is most common?\nAdditional table information: table: e_government", "question": "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"} +{"answer": "Find the payment method and phone of the party with email 'enrico09@example.com'.\nAdditional table information: table: e_government", "question": "SELECT payment_method_code, party_phone FROM parties WHERE party_email = 'enrico09@example.com'"} +{"answer": "What is the payment method code and party phone of the party with the email 'enrico09@example.com'?\nAdditional table information: table: e_government", "question": "SELECT payment_method_code, party_phone FROM parties WHERE party_email = 'enrico09@example.com'"} +{"answer": "Find the emails of parties with the most popular party form.\nAdditional table information: table: e_government", "question": "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)"} +{"answer": "What are the party emails associated with parties that used the party form that is the most common?\nAdditional table information: table: e_government", "question": "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)"} +{"answer": "List all the name of organizations in order of the date formed.\nAdditional table information: table: e_government", "question": "SELECT organization_name FROM organizations ORDER BY date_formed ASC NULLS FIRST"} +{"answer": "What are the names of organizations, ordered by the date they were formed, ascending?\nAdditional table information: table: e_government", "question": "SELECT organization_name FROM organizations ORDER BY date_formed ASC NULLS FIRST"} +{"answer": "Find the name of the youngest organization.\nAdditional table information: table: e_government", "question": "SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1"} +{"answer": "What is the name of the organization that was formed most recently?\nAdditional table information: table: e_government", "question": "SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1"} +{"answer": "Find the last name of the latest contact individual of the organization 'Labour Party'.\nAdditional table information: table: e_government", "question": "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"} +{"answer": "What is the last name of the contact individual from the Labour party organization who was contacted most recently?\nAdditional table information: table: e_government", "question": "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"} +{"answer": "Find the last name of the first ever contact person of the organization with the highest UK Vat number.\nAdditional table information: table: e_government", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "What is the last name of the first individual contacted from the organization with the maximum UK Vat number across all organizations?\nAdditional table information: table: e_government", "question": "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 NULLS FIRST LIMIT 1"} +{"answer": "How many services are there?\nAdditional table information: table: e_government", "question": "SELECT COUNT(*) FROM services"} +{"answer": "Count the number of services.\nAdditional table information: table: e_government", "question": "SELECT COUNT(*) FROM services"} +{"answer": "Find name of the services that has never been used.\nAdditional table information: table: e_government", "question": "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"} +{"answer": "What are the names of the services that have never been used?\nAdditional table information: table: e_government", "question": "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"} +{"answer": "Find the name of all the cities and states.\nAdditional table information: table: e_government", "question": "SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses"} +{"answer": "What are the names of all cities and states?\nAdditional table information: table: e_government", "question": "SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses"} +{"answer": "How many cities are there in state 'Colorado'?\nAdditional table information: table: e_government", "question": "SELECT COUNT(*) FROM addresses WHERE state_province_county = 'Colorado'"} +{"answer": "Count the number of cities in the state of Colorado.\nAdditional table information: table: e_government", "question": "SELECT COUNT(*) FROM addresses WHERE state_province_county = 'Colorado'"} +{"answer": "Find the payment method code used by more than 3 parties.\nAdditional table information: table: e_government", "question": "SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING COUNT(*) > 3"} +{"answer": "What are the payment method codes that have been used by more than 3 parties?\nAdditional table information: table: e_government", "question": "SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING COUNT(*) > 3"} +{"answer": "Find the name of organizations whose names contain 'Party'.\nAdditional table information: table: e_government", "question": "SELECT organization_name FROM organizations WHERE organization_name LIKE '%Party%'"} +{"answer": "What are the names of organizations that contain the word 'Party'?\nAdditional table information: table: e_government", "question": "SELECT organization_name FROM organizations WHERE organization_name LIKE '%Party%'"} +{"answer": "How many distinct payment methods are used by parties?\nAdditional table information: table: e_government", "question": "SELECT COUNT(DISTINCT payment_method_code) FROM parties"} +{"answer": "Count the number of different payment method codes used by parties.\nAdditional table information: table: e_government", "question": "SELECT COUNT(DISTINCT payment_method_code) FROM parties"} +{"answer": "Which is the email of the party that has used the services the most number of times?\nAdditional table information: table: e_government", "question": "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"} +{"answer": "Return the party email that has used party services the greatest number of times.\nAdditional table information: table: e_government", "question": "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"} +{"answer": "Which state can address '6862 Kaitlyn Knolls' possibly be in?\nAdditional table information: table: e_government", "question": "SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE '%6862 Kaitlyn Knolls%'"} +{"answer": "Give the state corresponding to the line number building '6862 Kaitlyn Knolls'.\nAdditional table information: table: e_government", "question": "SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE '%6862 Kaitlyn Knolls%'"} +{"answer": "What is the name of organization that has the greatest number of contact individuals?\nAdditional table information: table: e_government", "question": "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"} +{"answer": "Return the name of the organization which has the most contact individuals.\nAdditional table information: table: e_government", "question": "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"} +{"answer": "Find the last name of the individuals that have been contact individuals of an organization.\nAdditional table information: table: e_government", "question": "SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id"} +{"answer": "What are the last names of individuals who have been contact individuals for an organization?\nAdditional table information: table: e_government", "question": "SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id"} +{"answer": "How many drivers are there?\nAdditional table information: table: school_bus", "question": "SELECT COUNT(*) FROM driver"} +{"answer": "Show the name, home city, and age for all drivers.\nAdditional table information: table: school_bus", "question": "SELECT name, home_city, age FROM driver"} +{"answer": "Show the party and the number of drivers in each party.\nAdditional table information: table: school_bus", "question": "SELECT party, COUNT(*) FROM driver GROUP BY party"} +{"answer": "Show the name of drivers in descending order of age.\nAdditional table information: table: school_bus", "question": "SELECT name FROM driver ORDER BY age DESC"} +{"answer": "Show all different home cities.\nAdditional table information: table: school_bus", "question": "SELECT DISTINCT home_city FROM driver"} +{"answer": "Show the home city with the most number of drivers.\nAdditional table information: table: school_bus", "question": "SELECT home_city FROM driver GROUP BY home_city ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the party with drivers from Hartford and drivers older than 40.\nAdditional table information: table: school_bus", "question": "SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40"} +{"answer": "Show home city where at least two drivers older than 40 are from.\nAdditional table information: table: school_bus", "question": "SELECT home_city FROM driver WHERE age > 40 GROUP BY home_city HAVING COUNT(*) >= 2"} +{"answer": "Show all home cities except for those having a driver older than 40.\nAdditional table information: table: school_bus", "question": "SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age > 40"} +{"answer": "Show the names of the drivers without a school bus.\nAdditional table information: table: school_bus", "question": "SELECT name FROM driver WHERE NOT driver_id IN (SELECT driver_id FROM school_bus)"} +{"answer": "Show the types of schools that have two schools.\nAdditional table information: table: school_bus", "question": "SELECT TYPE FROM school GROUP BY TYPE HAVING COUNT(*) = 2"} +{"answer": "Show the school name and driver name for all school buses.\nAdditional table information: table: school_bus", "question": "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"} +{"answer": "What is the maximum, minimum and average years spent working on a school bus?\nAdditional table information: table: school_bus", "question": "SELECT MAX(years_working), MIN(years_working), AVG(years_working) FROM school_bus"} +{"answer": "Show the school name and type for schools without a school bus.\nAdditional table information: table: school_bus", "question": "SELECT school, TYPE FROM school WHERE NOT school_id IN (SELECT school_id FROM school_bus)"} +{"answer": "Show the type of school and the number of buses for each type.\nAdditional table information: table: school_bus", "question": "SELECT T2.type, COUNT(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T2.type"} +{"answer": "How many drivers are from Hartford city or younger than 40?\nAdditional table information: table: school_bus", "question": "SELECT COUNT(*) FROM driver WHERE home_city = 'Hartford' OR age < 40"} +{"answer": "List names for drivers from Hartford city and younger than 40.\nAdditional table information: table: school_bus", "question": "SELECT name FROM driver WHERE home_city = 'Hartford' AND age < 40"} +{"answer": "find the name of driver who is driving the school bus with the longest working history.\nAdditional table information: table: school_bus", "question": "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"} +{"answer": "How many flights have a velocity larger than 200?\nAdditional table information: table: flight_company", "question": "SELECT COUNT(*) FROM flight WHERE velocity > 200"} +{"answer": "List the vehicle flight number, date and pilot of all the flights, ordered by altitude.\nAdditional table information: table: flight_company", "question": "SELECT vehicle_flight_number, date, pilot FROM flight ORDER BY altitude ASC NULLS FIRST"} +{"answer": "List the id, country, city and name of the airports ordered alphabetically by the name.\nAdditional table information: table: flight_company", "question": "SELECT id, country, city, name FROM airport ORDER BY name NULLS FIRST"} +{"answer": "What is maximum group equity shareholding of the companies?\nAdditional table information: table: flight_company", "question": "SELECT MAX(group_equity_shareholding) FROM operate_company"} +{"answer": "What is the velocity of the pilot named 'Thompson'?\nAdditional table information: table: flight_company", "question": "SELECT AVG(velocity) FROM flight WHERE pilot = 'Thompson'"} +{"answer": "What are the names and types of the companies that have ever operated a flight?\nAdditional table information: table: flight_company", "question": "SELECT T1.name, T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id"} +{"answer": "What are the names of the airports which are not in the country 'Iceland'?\nAdditional table information: table: flight_company", "question": "SELECT name FROM airport WHERE country <> 'Iceland'"} +{"answer": "What are the distinct types of the companies that have operated any flights with velocity less than 200?\nAdditional table information: table: flight_company", "question": "SELECT DISTINCT T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T2.velocity < 200"} +{"answer": "What are the ids and names of the companies that operated more than one flight?\nAdditional table information: table: flight_company", "question": "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"} +{"answer": "What is the id, name and IATA code of the airport that had most number of flights?\nAdditional table information: table: flight_company", "question": "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"} +{"answer": "What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'?\nAdditional table information: table: flight_company", "question": "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'"} +{"answer": "What is the most common company type, and how many are there?\nAdditional table information: table: flight_company", "question": "SELECT TYPE, COUNT(*) FROM operate_company GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "How many airports haven't the pilot 'Thompson' driven an aircraft?\nAdditional table information: table: flight_company", "question": "SELECT COUNT(*) FROM airport WHERE NOT id IN (SELECT airport_id FROM flight WHERE pilot = 'Thompson')"} +{"answer": "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.\nAdditional table information: table: flight_company", "question": "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'"} +{"answer": "Which of the airport names contains the word 'international'?\nAdditional table information: table: flight_company", "question": "SELECT name FROM airport WHERE name LIKE '%international%'"} +{"answer": "How many companies operates airlines in each airport?\nAdditional table information: table: flight_company", "question": "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"} +{"answer": "how many airports are there in each country?\nAdditional table information: table: flight_company", "question": "SELECT COUNT(*), country FROM airport GROUP BY country"} +{"answer": "which countries have more than 2 airports?\nAdditional table information: table: flight_company", "question": "SELECT country FROM airport GROUP BY country HAVING COUNT(*) > 2"} +{"answer": "which pilot is in charge of the most number of flights?\nAdditional table information: table: flight_company", "question": "SELECT pilot FROM flight GROUP BY pilot ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "How many accounts do we have?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*) FROM Accounts"} +{"answer": "Count the number of accounts.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*) FROM Accounts"} +{"answer": "Show all account ids and account details.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT account_id, account_details FROM Accounts"} +{"answer": "What are the ids and details of all accounts?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT account_id, account_details FROM Accounts"} +{"answer": "How many statements do we have?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*) FROM Statements"} +{"answer": "Count the number of statements.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*) FROM Statements"} +{"answer": "List all statement ids and statement details.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT STATEMENT_ID, statement_details FROM Statements"} +{"answer": "What are the ids and details of all statements?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT STATEMENT_ID, statement_details FROM Statements"} +{"answer": "Show statement id, statement detail, account detail for accounts.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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"} +{"answer": "What are the statement ids, statement details, and account details, for all accounts?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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"} +{"answer": "Show all statement id and the number of accounts for each statement.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT STATEMENT_ID, COUNT(*) FROM Accounts GROUP BY STATEMENT_ID"} +{"answer": "What are the different statement ids on accounts, and the number of accounts for each?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT STATEMENT_ID, COUNT(*) FROM Accounts GROUP BY STATEMENT_ID"} +{"answer": "Show the statement id and the statement detail for the statement with most number of accounts.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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"} +{"answer": "What are the statement id and statement detail for the statement that has the most corresponding accounts?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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"} +{"answer": "Show the number of documents.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*) FROM Documents"} +{"answer": "Count the number of documents.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*) FROM Documents"} +{"answer": "List the document type code, document name, and document description for the document with name 'Noel CV' or name 'King Book'.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_type_code, document_name, document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book'"} +{"answer": "What are the type come, name, and description of the document that has either the name 'Noel CV' or 'King Book'?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_type_code, document_name, document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book'"} +{"answer": "Show the ids and names of all documents.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_id, document_name FROM Documents"} +{"answer": "What are the ids and names for each of the documents?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_id, document_name FROM Documents"} +{"answer": "Find names and ids of all documents with document type code BK.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_name, document_id FROM Documents WHERE document_type_code = 'BK'"} +{"answer": "What are the names and ids of documents that have the type code BK?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_name, document_id FROM Documents WHERE document_type_code = 'BK'"} +{"answer": "How many documents are with document type code BK for each product id?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*), project_id FROM Documents WHERE document_type_code = 'BK' GROUP BY project_id"} +{"answer": "Count the number of documents with the type code BK that correspond to each product id.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*), project_id FROM Documents WHERE document_type_code = 'BK' GROUP BY project_id"} +{"answer": "Show the document name and the document date for all documents on project with details 'Graph Database project'.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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'"} +{"answer": "What are the names and dates for documents corresponding to project that has the details 'Graph Database project'?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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'"} +{"answer": "Show project ids and the number of documents in each project.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT project_id, COUNT(*) FROM Documents GROUP BY project_id"} +{"answer": "How many documents correspond with each project id?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT project_id, COUNT(*) FROM Documents GROUP BY project_id"} +{"answer": "What is the id of the project with least number of documents?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT project_id FROM Documents GROUP BY project_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "Return the id of the project that has the fewest corresponding documents.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT project_id FROM Documents GROUP BY project_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "Show the ids for projects with at least 2 documents.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT project_id FROM Documents GROUP BY project_id HAVING COUNT(*) >= 2"} +{"answer": "What are project ids of projects that have 2 or more corresponding documents?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT project_id FROM Documents GROUP BY project_id HAVING COUNT(*) >= 2"} +{"answer": "List document type codes and the number of documents in each code.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_type_code, COUNT(*) FROM Documents GROUP BY document_type_code"} +{"answer": "How many documents are there of each type?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_type_code, COUNT(*) FROM Documents GROUP BY document_type_code"} +{"answer": "What is the document type code with most number of documents?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Return the code of the document type that is most common.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the document type code with fewer than 3 documents.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING COUNT(*) < 3"} +{"answer": "What are the codes corresponding to document types for which there are less than 3 documents?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING COUNT(*) < 3"} +{"answer": "Show the statement detail and the corresponding document name for the statement with detail 'Private Project'.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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'"} +{"answer": "What are the details for statements with the details 'Private Project', and what are the names of the corresponding documents?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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'"} +{"answer": "Show all document type codes, document type names, document type descriptions.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_type_code, document_type_name, document_type_description FROM Ref_document_types"} +{"answer": "What are the codes, names, and descriptions of the different document types?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_type_code, document_type_name, document_type_description FROM Ref_document_types"} +{"answer": "What is the document type description for document type named Film?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_type_description FROM Ref_document_types WHERE document_type_name = 'Film'"} +{"answer": "Return the description of the document type name 'Film'.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_type_description FROM Ref_document_types WHERE document_type_name = 'Film'"} +{"answer": "What is the document type name and the document type description and creation date for all the documents?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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"} +{"answer": "Return the type name, type description, and date of creation for each document.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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"} +{"answer": "Show the number of projects.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*) FROM Projects"} +{"answer": "How many projects are there?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*) FROM Projects"} +{"answer": "List ids and details for all projects.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT project_id, project_details FROM Projects"} +{"answer": "What are the ids and details for each project?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT project_id, project_details FROM Projects"} +{"answer": "What is the project id and detail for the project with at least two documents?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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"} +{"answer": "Return the ids and details corresponding to projects for which there are more than two documents.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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"} +{"answer": "What is the project detail for the project with document 'King Book'?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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'"} +{"answer": "Give the details of the project with the document name 'King Book'.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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'"} +{"answer": "How many budget types do we have?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*) FROM Ref_budget_codes"} +{"answer": "Count the number of budget codes.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*) FROM Ref_budget_codes"} +{"answer": "List all budget type codes and descriptions.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT budget_type_code, budget_type_description FROM Ref_budget_codes"} +{"answer": "What are the type codes and descriptions of each budget type?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT budget_type_code, budget_type_description FROM Ref_budget_codes"} +{"answer": "What is the description for the budget type with code ORG?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = 'ORG'"} +{"answer": "Return the description of the budget type that has the code ORG.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = 'ORG'"} +{"answer": "How many documents have expenses?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*) FROM Documents_with_expenses"} +{"answer": "Count the number of documents with expenses.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*) FROM Documents_with_expenses"} +{"answer": "What are the document ids for the budget type code 'SF'?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF'"} +{"answer": "Give the ids of documents with expenses that have the budget code 'SF'.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF'"} +{"answer": "Show the budget type code and description and the corresponding document id.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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"} +{"answer": "Return the budget type codes, budget type descriptions and document ids for documents with expenses.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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"} +{"answer": "Show ids for all documents with budget types described as 'Government'.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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'"} +{"answer": "Give the ids for documents that have the budget description 'Government'.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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'"} +{"answer": "Show budget type codes and the number of documents in each budget type.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT budget_type_code, COUNT(*) FROM Documents_with_expenses GROUP BY budget_type_code"} +{"answer": "What are the different budget type codes, and how many documents are there for each?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT budget_type_code, COUNT(*) FROM Documents_with_expenses GROUP BY budget_type_code"} +{"answer": "What is the budget type code with most number of documents.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Give the budget type code that is most common among documents with expenses.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the ids of documents which don't have expense budgets?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses"} +{"answer": "Return the ids of documents that do not have expenses.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses"} +{"answer": "Show ids for all documents in type CV without expense budgets.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_id FROM Documents WHERE document_type_code = 'CV' EXCEPT SELECT document_id FROM Documents_with_expenses"} +{"answer": "What are the ids of documents with the type code CV that do not have expenses.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT document_id FROM Documents WHERE document_type_code = 'CV' EXCEPT SELECT document_id FROM Documents_with_expenses"} +{"answer": "What are the ids of documents with letter 's' in the name with any expense budgets.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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%'"} +{"answer": "Give the ids of documents that have expenses and contain the letter s in their names.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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%'"} +{"answer": "How many documents do not have any expense?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*) FROM Documents WHERE NOT document_id IN (SELECT document_id FROM Documents_with_expenses)"} +{"answer": "Count the number of documents that do not have expenses.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT COUNT(*) FROM Documents WHERE NOT document_id IN (SELECT document_id FROM Documents_with_expenses)"} +{"answer": "What are the dates for the documents with both 'GV' type and 'SF' type expenses?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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'"} +{"answer": "Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "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'"} +{"answer": "What are the account details with the largest value or with value having char '5' in it?\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT MAX(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE '%5%'"} +{"answer": "Return the account details with the greatest value, as well as those that include the character 5.\nAdditional table information: table: cre_Docs_and_Epenses", "question": "SELECT MAX(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE '%5%'"} +{"answer": "Find the total number of scientists.\nAdditional table information: table: scientist_1", "question": "SELECT COUNT(*) FROM scientists"} +{"answer": "How many scientists are there?\nAdditional table information: table: scientist_1", "question": "SELECT COUNT(*) FROM scientists"} +{"answer": "Find the total hours of all projects.\nAdditional table information: table: scientist_1", "question": "SELECT SUM(hours) FROM projects"} +{"answer": "What is the total number of hours for all projects?\nAdditional table information: table: scientist_1", "question": "SELECT SUM(hours) FROM projects"} +{"answer": "How many different scientists are assigned to any project?\nAdditional table information: table: scientist_1", "question": "SELECT COUNT(DISTINCT scientist) FROM assignedto"} +{"answer": "Count the number of different scientists assigned to any project.\nAdditional table information: table: scientist_1", "question": "SELECT COUNT(DISTINCT scientist) FROM assignedto"} +{"answer": "Find the number of distinct projects.\nAdditional table information: table: scientist_1", "question": "SELECT COUNT(DISTINCT name) FROM projects"} +{"answer": "How many different projects are there?\nAdditional table information: table: scientist_1", "question": "SELECT COUNT(DISTINCT name) FROM projects"} +{"answer": "Find the average hours of all projects.\nAdditional table information: table: scientist_1", "question": "SELECT AVG(hours) FROM projects"} +{"answer": "What is the average hours across all projects?\nAdditional table information: table: scientist_1", "question": "SELECT AVG(hours) FROM projects"} +{"answer": "Find the name of project that continues for the longest time.\nAdditional table information: table: scientist_1", "question": "SELECT name FROM projects ORDER BY hours DESC LIMIT 1"} +{"answer": "What is the name of the project with the most hours?\nAdditional table information: table: scientist_1", "question": "SELECT name FROM projects ORDER BY hours DESC LIMIT 1"} +{"answer": "List the name of all projects that are operated longer than the average working hours of all projects.\nAdditional table information: table: scientist_1", "question": "SELECT name FROM projects WHERE hours > (SELECT AVG(hours) FROM projects)"} +{"answer": "What are the names of projects that have taken longer than the average number of hours for all projects?\nAdditional table information: table: scientist_1", "question": "SELECT name FROM projects WHERE hours > (SELECT AVG(hours) FROM projects)"} +{"answer": "Find the name and hours of project that has the most number of scientists.\nAdditional table information: table: scientist_1", "question": "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"} +{"answer": "What is the name and hours for the project which has the most scientists assigned to it?\nAdditional table information: table: scientist_1", "question": "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"} +{"answer": "Find the name of the project for which a scientist whose name contains \u2018Smith\u2019 is assigned to.\nAdditional table information: table: scientist_1", "question": "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%'"} +{"answer": "What is the name of the project that has a scientist assigned to it whose name contains 'Smith'?\nAdditional table information: table: scientist_1", "question": "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%'"} +{"answer": "Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to.\nAdditional table information: table: scientist_1", "question": "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'"} +{"answer": "What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to?\nAdditional table information: table: scientist_1", "question": "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'"} +{"answer": "Find the name of projects that require between 100 and 300 hours of work.\nAdditional table information: table: scientist_1", "question": "SELECT name FROM projects WHERE hours BETWEEN 100 AND 300"} +{"answer": "What are the names of projects that require between 100 and 300 hours?\nAdditional table information: table: scientist_1", "question": "SELECT name FROM projects WHERE hours BETWEEN 100 AND 300"} +{"answer": "Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'.\nAdditional table information: table: scientist_1", "question": "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'"} +{"answer": "What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'?\nAdditional table information: table: scientist_1", "question": "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'"} +{"answer": "List the names of all scientists sorted in alphabetical order.\nAdditional table information: table: scientist_1", "question": "SELECT name FROM scientists ORDER BY name NULLS FIRST"} +{"answer": "What are the names of all the scientists in alphabetical order?\nAdditional table information: table: scientist_1", "question": "SELECT name FROM scientists ORDER BY name NULLS FIRST"} +{"answer": "Find the number of scientists involved for each project name.\nAdditional table information: table: scientist_1", "question": "SELECT COUNT(*), T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name"} +{"answer": "What are the naems of all the projects, and how many scientists were assigned to each of them?\nAdditional table information: table: scientist_1", "question": "SELECT COUNT(*), T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name"} +{"answer": "Find the number of scientists involved for the projects that require more than 300 hours.\nAdditional table information: table: scientist_1", "question": "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"} +{"answer": "What are the names of projects that require more than 300 hours, and how many scientists are assigned to each?\nAdditional table information: table: scientist_1", "question": "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"} +{"answer": "Find the number of projects which each scientist is working on and scientist's name.\nAdditional table information: table: scientist_1", "question": "SELECT COUNT(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name"} +{"answer": "What are the names of the scientists, and how many projects are each of them working on?\nAdditional table information: table: scientist_1", "question": "SELECT COUNT(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name"} +{"answer": "Find the SSN and name of scientists who are assigned to the project with the longest hours.\nAdditional table information: table: scientist_1", "question": "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)"} +{"answer": "What are the SSN and names of scientists working on the project with the most hours?\nAdditional table information: table: scientist_1", "question": "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)"} +{"answer": "Find the name of scientists who are assigned to some project.\nAdditional table information: table: scientist_1", "question": "SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn"} +{"answer": "What are the names of scientists who are assigned to any project?\nAdditional table information: table: scientist_1", "question": "SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn"} +{"answer": "Select the project names which are not assigned yet.\nAdditional table information: table: scientist_1", "question": "SELECT Name FROM Projects WHERE NOT Code IN (SELECT Project FROM AssignedTo)"} +{"answer": "What are the names of projects that have not been assigned?\nAdditional table information: table: scientist_1", "question": "SELECT Name FROM Projects WHERE NOT Code IN (SELECT Project FROM AssignedTo)"} +{"answer": "Find the name of scientists who are not assigned to any project.\nAdditional table information: table: scientist_1", "question": "SELECT Name FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)"} +{"answer": "What are the names of scientists who have not been assigned a project?\nAdditional table information: table: scientist_1", "question": "SELECT Name FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)"} +{"answer": "Find the number of scientists who are not assigned to any project.\nAdditional table information: table: scientist_1", "question": "SELECT COUNT(*) FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)"} +{"answer": "How many scientists do not have any projects assigned to them?\nAdditional table information: table: scientist_1", "question": "SELECT COUNT(*) FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)"} +{"answer": "Find the names of scientists who are not working on the project with the highest hours.\nAdditional table information: table: scientist_1", "question": "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)"} +{"answer": "What are the names of scientists who are not working on the project with the most hours?\nAdditional table information: table: scientist_1", "question": "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)"} +{"answer": "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.\nAdditional table information: table: scientist_1", "question": "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 NULLS FIRST, T1.Name NULLS FIRST"} +{"answer": "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.\nAdditional table information: table: scientist_1", "question": "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 NULLS FIRST, T1.Name NULLS FIRST"} +{"answer": "Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it.\nAdditional table information: table: scientist_1", "question": "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)"} +{"answer": "What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it?\nAdditional table information: table: scientist_1", "question": "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)"} +{"answer": "What is the name of the highest rated wine?\nAdditional table information: table: wine_1", "question": "SELECT Name FROM WINE ORDER BY Score NULLS FIRST LIMIT 1"} +{"answer": "Give the name of the wine with the highest score.\nAdditional table information: table: wine_1", "question": "SELECT Name FROM WINE ORDER BY Score NULLS FIRST LIMIT 1"} +{"answer": "Which winery is the wine that has the highest score from?\nAdditional table information: table: wine_1", "question": "SELECT Winery FROM WINE ORDER BY SCORE NULLS FIRST LIMIT 1"} +{"answer": "What is the winery at which the wine with the highest score was made?\nAdditional table information: table: wine_1", "question": "SELECT Winery FROM WINE ORDER BY SCORE NULLS FIRST LIMIT 1"} +{"answer": "Find the names of all wines produced in 2008.\nAdditional table information: table: wine_1", "question": "SELECT Name FROM WINE WHERE YEAR = '2008'"} +{"answer": "What are the names of all wines produced in 2008?\nAdditional table information: table: wine_1", "question": "SELECT Name FROM WINE WHERE YEAR = '2008'"} +{"answer": "List the grapes and appelations of all wines.\nAdditional table information: table: wine_1", "question": "SELECT Grape, Appelation FROM WINE"} +{"answer": "What are the grapes and appelations of each wine?\nAdditional table information: table: wine_1", "question": "SELECT Grape, Appelation FROM WINE"} +{"answer": "List the names and scores of all wines.\nAdditional table information: table: wine_1", "question": "SELECT Name, Score FROM WINE"} +{"answer": "What are the names and scores of all wines?\nAdditional table information: table: wine_1", "question": "SELECT Name, Score FROM WINE"} +{"answer": "List the area and county of all appelations.\nAdditional table information: table: wine_1", "question": "SELECT Area, County FROM APPELLATIONS"} +{"answer": "What are the areas and counties for all appelations?\nAdditional table information: table: wine_1", "question": "SELECT Area, County FROM APPELLATIONS"} +{"answer": "What are the prices of wines produced before the year of 2010?\nAdditional table information: table: wine_1", "question": "SELECT Price FROM WINE WHERE YEAR < 2010"} +{"answer": "Return the prices of wines produced before 2010.\nAdditional table information: table: wine_1", "question": "SELECT Price FROM WINE WHERE YEAR < 2010"} +{"answer": "List the names of all distinct wines that have scores higher than 90.\nAdditional table information: table: wine_1", "question": "SELECT Name FROM WINE WHERE score > 90"} +{"answer": "What are the names of wines with scores higher than 90?\nAdditional table information: table: wine_1", "question": "SELECT Name FROM WINE WHERE score > 90"} +{"answer": "List the names of all distinct wines that are made of red color grape.\nAdditional table information: table: wine_1", "question": "SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red'"} +{"answer": "What are the names of wines made from red grapes?\nAdditional table information: table: wine_1", "question": "SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red'"} +{"answer": "Find the names of all distinct wines that have appellations in North Coast area.\nAdditional table information: table: wine_1", "question": "SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = 'North Coast'"} +{"answer": "What are the distinct names of wines that have appellations in the North Coast area?\nAdditional table information: table: wine_1", "question": "SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = 'North Coast'"} +{"answer": "How many wines are produced at Robert Biale winery?\nAdditional table information: table: wine_1", "question": "SELECT COUNT(*) FROM WINE WHERE Winery = 'Robert Biale'"} +{"answer": "Count the number of wines produced at Robert Biale winery.\nAdditional table information: table: wine_1", "question": "SELECT COUNT(*) FROM WINE WHERE Winery = 'Robert Biale'"} +{"answer": "How many appelations are in Napa Country?\nAdditional table information: table: wine_1", "question": "SELECT COUNT(*) FROM APPELLATIONS WHERE County = 'Napa'"} +{"answer": "Count the number of appelations in Napa County.\nAdditional table information: table: wine_1", "question": "SELECT COUNT(*) FROM APPELLATIONS WHERE County = 'Napa'"} +{"answer": "Give me the average prices of wines that are produced by appelations in Sonoma County.\nAdditional table information: table: wine_1", "question": "SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma'"} +{"answer": "What is the average price of wines produced in appelations in Sonoma County?\nAdditional table information: table: wine_1", "question": "SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma'"} +{"answer": "What are the names and scores of wines that are made of white color grapes?\nAdditional table information: table: wine_1", "question": "SELECT T2.Name, T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'White'"} +{"answer": "Give the names and scores of wines made from white grapes.\nAdditional table information: table: wine_1", "question": "SELECT T2.Name, T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'White'"} +{"answer": "Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005.\nAdditional table information: table: wine_1", "question": "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"} +{"answer": "What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005?\nAdditional table information: table: wine_1", "question": "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"} +{"answer": "Find the the grape whose white color grapes are used to produce wines with scores higher than 90.\nAdditional table information: table: wine_1", "question": "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"} +{"answer": "Find the white grape used to produce wines with scores above 90.\nAdditional table information: table: wine_1", "question": "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"} +{"answer": "What are the wines that have prices higher than 50 and made of Red color grapes?\nAdditional table information: table: wine_1", "question": "SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red' AND T2.price > 50"} +{"answer": "What are the names of wines made from red grapes and with prices above 50?\nAdditional table information: table: wine_1", "question": "SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red' AND T2.price > 50"} +{"answer": "What are the wines that have prices lower than 50 and have appelations in Monterey county?\nAdditional table information: table: wine_1", "question": "SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Monterey' AND T2.price < 50"} +{"answer": "Give the neames of wines with prices below 50 and with appelations in Monterey county.\nAdditional table information: table: wine_1", "question": "SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Monterey' AND T2.price < 50"} +{"answer": "What are the numbers of wines for different grapes?\nAdditional table information: table: wine_1", "question": "SELECT COUNT(*), Grape FROM WINE GROUP BY Grape"} +{"answer": "How many wines are there for each grape?\nAdditional table information: table: wine_1", "question": "SELECT COUNT(*), Grape FROM WINE GROUP BY Grape"} +{"answer": "What are the average prices of wines for different years?\nAdditional table information: table: wine_1", "question": "SELECT AVG(Price), YEAR FROM WINE GROUP BY YEAR"} +{"answer": "What is the average prices of wines for each each?\nAdditional table information: table: wine_1", "question": "SELECT AVG(Price), YEAR FROM WINE GROUP BY YEAR"} +{"answer": "Find the distinct names of all wines that have prices higher than some wines from John Anthony winery.\nAdditional table information: table: wine_1", "question": "SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT MIN(Price) FROM wine WHERE Winery = 'John Anthony')"} +{"answer": "What are the distinct names of wines with prices higher than any wine from John Anthony winery.\nAdditional table information: table: wine_1", "question": "SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT MIN(Price) FROM wine WHERE Winery = 'John Anthony')"} +{"answer": "List the names of all distinct wines in alphabetical order.\nAdditional table information: table: wine_1", "question": "SELECT DISTINCT Name FROM WINE ORDER BY Name NULLS FIRST"} +{"answer": "What are the names of wines, sorted in alphabetical order?\nAdditional table information: table: wine_1", "question": "SELECT DISTINCT Name FROM WINE ORDER BY Name NULLS FIRST"} +{"answer": "List the names of all distinct wines ordered by price.\nAdditional table information: table: wine_1", "question": "SELECT DISTINCT Name FROM WINE ORDER BY price NULLS FIRST"} +{"answer": "What are the names of wines, sorted by price ascending?\nAdditional table information: table: wine_1", "question": "SELECT DISTINCT Name FROM WINE ORDER BY price NULLS FIRST"} +{"answer": "What is the area of the appelation that produces the highest number of wines before the year of 2010?\nAdditional table information: table: wine_1", "question": "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"} +{"answer": "What is the area for the appelation which produced the most wines prior to 2010?\nAdditional table information: table: wine_1", "question": "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"} +{"answer": "What is the color of the grape whose wine products has the highest average price?\nAdditional table information: table: wine_1", "question": "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"} +{"answer": "Give the color of the grape whose wine products have the highest average price?\nAdditional table information: table: wine_1", "question": "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"} +{"answer": "Find the distinct names of wines produced before the year of 2000 or after the year of 2010.\nAdditional table information: table: wine_1", "question": "SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010"} +{"answer": "Give the distinct names of wines made before 2000 or after 2010.\nAdditional table information: table: wine_1", "question": "SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010"} +{"answer": "Find the distinct winery of wines having price between 50 and 100.\nAdditional table information: table: wine_1", "question": "SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100"} +{"answer": "What are the distinct wineries which produce wines costing between 50 and 100?\nAdditional table information: table: wine_1", "question": "SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100"} +{"answer": "What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape?\nAdditional table information: table: wine_1", "question": "SELECT AVG(Price), AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = 'Zinfandel'"} +{"answer": "Give the average price and case of wines made from Zinfandel grapes in the year 2009.\nAdditional table information: table: wine_1", "question": "SELECT AVG(Price), AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = 'Zinfandel'"} +{"answer": "What are the maximum price and score of wines produced by St. Helena appelation?\nAdditional table information: table: wine_1", "question": "SELECT MAX(Price), MAX(Score) FROM WINE WHERE Appelation = 'St. Helena'"} +{"answer": "Give the maximum price and score for wines produced in the appelation St. Helena.\nAdditional table information: table: wine_1", "question": "SELECT MAX(Price), MAX(Score) FROM WINE WHERE Appelation = 'St. Helena'"} +{"answer": "What are the maximum price and score of wines in each year?\nAdditional table information: table: wine_1", "question": "SELECT MAX(Price), MAX(Score), YEAR FROM WINE GROUP BY YEAR"} +{"answer": "What are the maximum price and score of wines for each year?\nAdditional table information: table: wine_1", "question": "SELECT MAX(Price), MAX(Score), YEAR FROM WINE GROUP BY YEAR"} +{"answer": "What are the average price and score of wines grouped by appelation?\nAdditional table information: table: wine_1", "question": "SELECT AVG(Price), AVG(Score), Appelation FROM WINE GROUP BY Appelation"} +{"answer": "What are the average price and score of wines for each appelation?\nAdditional table information: table: wine_1", "question": "SELECT AVG(Price), AVG(Score), Appelation FROM WINE GROUP BY Appelation"} +{"answer": "Find the wineries that have at least four wines.\nAdditional table information: table: wine_1", "question": "SELECT Winery FROM WINE GROUP BY Winery HAVING COUNT(*) >= 4"} +{"answer": "Which wineries produce at least four wines?\nAdditional table information: table: wine_1", "question": "SELECT Winery FROM WINE GROUP BY Winery HAVING COUNT(*) >= 4"} +{"answer": "Find the country of all appelations who have at most three wines.\nAdditional table information: table: wine_1", "question": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING COUNT(*) <= 3"} +{"answer": "What are the countries for appelations with at most 3 wines?\nAdditional table information: table: wine_1", "question": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING COUNT(*) <= 3"} +{"answer": "What are the names of wines whose production year are before the year of all wines by Brander winery?\nAdditional table information: table: wine_1", "question": "SELECT Name FROM WINE WHERE YEAR < (SELECT MIN(YEAR) FROM WINE WHERE Winery = 'Brander')"} +{"answer": "What are the names of wines produced before any wine from the Brander winery?\nAdditional table information: table: wine_1", "question": "SELECT Name FROM WINE WHERE YEAR < (SELECT MIN(YEAR) FROM WINE WHERE Winery = 'Brander')"} +{"answer": "What are the names of wines that are more expensive then all wines made in the year 2006?\nAdditional table information: table: wine_1", "question": "SELECT Name FROM WINE WHERE Price > (SELECT MAX(Price) FROM WINE WHERE YEAR = 2006)"} +{"answer": "Give the names of wines with prices above any wine produced in 2006.\nAdditional table information: table: wine_1", "question": "SELECT Name FROM WINE WHERE Price > (SELECT MAX(Price) FROM WINE WHERE YEAR = 2006)"} +{"answer": "Find the top 3 wineries with the greatest number of wines made of white color grapes.\nAdditional table information: table: wine_1", "question": "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"} +{"answer": "Which 3 wineries produce the most wines made from white grapes?\nAdditional table information: table: wine_1", "question": "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"} +{"answer": "List the grape, winery and year of the wines whose price is bigger than 100 ordered by year.\nAdditional table information: table: wine_1", "question": "SELECT Grape, Winery, YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR NULLS FIRST"} +{"answer": "What are the grapes, wineries and years for wines with price higher than 100, sorted by year?\nAdditional table information: table: wine_1", "question": "SELECT Grape, Winery, YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR NULLS FIRST"} +{"answer": "List the grape, appelation and name of wines whose score is higher than 93 ordered by Name.\nAdditional table information: table: wine_1", "question": "SELECT Grape, Appelation, Name FROM WINE WHERE Score > 93 ORDER BY Name NULLS FIRST"} +{"answer": "What are the grapes, appelations, and wines with scores above 93, sorted by Name?\nAdditional table information: table: wine_1", "question": "SELECT Grape, Appelation, Name FROM WINE WHERE Score > 93 ORDER BY Name NULLS FIRST"} +{"answer": "Find the appelations that produce wines after the year of 2008 but not in Central Coast area.\nAdditional table information: table: wine_1", "question": "SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = 'Central Coast'"} +{"answer": "What are the appelations for wines produced after 2008 but not in the Central Coast area?\nAdditional table information: table: wine_1", "question": "SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = 'Central Coast'"} +{"answer": "Find the average price of wines that are not produced from Sonoma county.\nAdditional table information: table: wine_1", "question": "SELECT AVG(price) FROM wine WHERE NOT Appelation IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma')"} +{"answer": "What is the average price for wines not produced in Sonoma county?\nAdditional table information: table: wine_1", "question": "SELECT AVG(price) FROM wine WHERE NOT Appelation IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma')"} +{"answer": "Find the county where produces the most number of wines with score higher than 90.\nAdditional table information: table: wine_1", "question": "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"} +{"answer": "What is the county that produces the most wines scoring higher than 90?\nAdditional table information: table: wine_1", "question": "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"} +{"answer": "How many train stations are there?\nAdditional table information: table: train_station", "question": "SELECT COUNT(*) FROM station"} +{"answer": "Show the name, location, and number of platforms for all stations.\nAdditional table information: table: train_station", "question": "SELECT name, LOCATION, number_of_platforms FROM station"} +{"answer": "What are all locations of train stations?\nAdditional table information: table: train_station", "question": "SELECT DISTINCT LOCATION FROM station"} +{"answer": "Show the names and total passengers for all train stations not in London.\nAdditional table information: table: train_station", "question": "SELECT name, total_passengers FROM station WHERE LOCATION <> 'London'"} +{"answer": "Show the names and main services for train stations that have the top three total number of passengers.\nAdditional table information: table: train_station", "question": "SELECT name, main_services FROM station ORDER BY total_passengers DESC LIMIT 3"} +{"answer": "What is the average and maximum number of total passengers for train stations in London or Glasgow?\nAdditional table information: table: train_station", "question": "SELECT AVG(total_passengers), MAX(total_passengers) FROM station WHERE LOCATION = 'London' OR LOCATION = 'Glasgow'"} +{"answer": "Show all locations and the total number of platforms and passengers for all train stations in each location.\nAdditional table information: table: train_station", "question": "SELECT LOCATION, SUM(number_of_platforms), SUM(total_passengers) FROM station GROUP BY LOCATION"} +{"answer": "Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers.\nAdditional table information: table: train_station", "question": "SELECT DISTINCT LOCATION FROM station WHERE number_of_platforms >= 15 AND total_passengers > 25"} +{"answer": "Show all locations which don't have a train station with at least 15 platforms.\nAdditional table information: table: train_station", "question": "SELECT LOCATION FROM station EXCEPT SELECT LOCATION FROM station WHERE number_of_platforms >= 15"} +{"answer": "Show the location with most number of train stations.\nAdditional table information: table: train_station", "question": "SELECT LOCATION FROM station GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show the name, time, and service for all trains.\nAdditional table information: table: train_station", "question": "SELECT name, TIME, service FROM train"} +{"answer": "Show the number of trains\nAdditional table information: table: train_station", "question": "SELECT COUNT(*) FROM train"} +{"answer": "Show the name and service for all trains in order by time.\nAdditional table information: table: train_station", "question": "SELECT name, service FROM train ORDER BY TIME NULLS FIRST"} +{"answer": "Show the station name and number of trains in each station.\nAdditional table information: table: train_station", "question": "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"} +{"answer": "show the train name and station name for each train.\nAdditional table information: table: train_station", "question": "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"} +{"answer": "Show all train names and times in stations in London in descending order by train time.\nAdditional table information: table: train_station", "question": "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"} +{"answer": "Show the station name with greatest number of trains.\nAdditional table information: table: train_station", "question": "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"} +{"answer": "Show the station name with at least two trains.\nAdditional table information: table: train_station", "question": "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"} +{"answer": "Show all locations with only 1 station.\nAdditional table information: table: train_station", "question": "SELECT LOCATION FROM station GROUP BY LOCATION HAVING COUNT(*) = 1"} +{"answer": "Show station names without any trains.\nAdditional table information: table: train_station", "question": "SELECT name FROM station WHERE NOT station_id IN (SELECT station_id FROM train_station)"} +{"answer": "What are the names of the stations which serve both 'Ananthapuri Express' and 'Guruvayur Express' trains?\nAdditional table information: table: train_station", "question": "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'"} +{"answer": "Find the names of the trains that do not pass any station located in London.\nAdditional table information: table: train_station", "question": "SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id = T2.train_id WHERE NOT T1.station_id 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')"} +{"answer": "List the names and locations of all stations ordered by their yearly entry exit and interchange amounts.\nAdditional table information: table: train_station", "question": "SELECT name, LOCATION FROM station ORDER BY Annual_entry_exit NULLS FIRST, Annual_interchanges NULLS FIRST"} +{"answer": "List all vehicle id\nAdditional table information: table: driving_school", "question": "SELECT vehicle_id FROM Vehicles"} +{"answer": "What are the ids of all vehicles?\nAdditional table information: table: driving_school", "question": "SELECT vehicle_id FROM Vehicles"} +{"answer": "How many vehicle in total?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Vehicles"} +{"answer": "How many vehicles exist?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Vehicles"} +{"answer": "Show the detail of vehicle with id 1.\nAdditional table information: table: driving_school", "question": "SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1"} +{"answer": "What are the details of the car with id 1?\nAdditional table information: table: driving_school", "question": "SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1"} +{"answer": "List the first name middle name and last name of all staff.\nAdditional table information: table: driving_school", "question": "SELECT first_name, middle_name, last_name FROM Staff"} +{"answer": "What are the first, middle, and last names of all staff?\nAdditional table information: table: driving_school", "question": "SELECT first_name, middle_name, last_name FROM Staff"} +{"answer": "What is the birthday of the staff member with first name as Janessa and last name as Sawayn?\nAdditional table information: table: driving_school", "question": "SELECT date_of_birth FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'"} +{"answer": "What is the date of birth for the staff member named Janessa Sawayn?\nAdditional table information: table: driving_school", "question": "SELECT date_of_birth FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'"} +{"answer": "When did the staff member with first name as Janessa and last name as Sawayn join the company?\nAdditional table information: table: driving_school", "question": "SELECT date_joined_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'"} +{"answer": "When did the staff member named Janessa Sawayn join the company?\nAdditional table information: table: driving_school", "question": "SELECT date_joined_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'"} +{"answer": "When did the staff member with first name as Janessa and last name as Sawayn leave the company?\nAdditional table information: table: driving_school", "question": "SELECT date_left_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'"} +{"answer": "When did the staff member Janessa Sawayn leave the company?\nAdditional table information: table: driving_school", "question": "SELECT date_left_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'"} +{"answer": "How many staff have the first name Ludie?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Staff WHERE first_name = 'Ludie'"} +{"answer": "How many employees have a first name of Ludie?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Staff WHERE first_name = 'Ludie'"} +{"answer": "What is the nickname of staff with first name as Janessa and last name as Sawayn?\nAdditional table information: table: driving_school", "question": "SELECT nickname FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'"} +{"answer": "What is the nickname of the employee named Janessa Sawayn?\nAdditional table information: table: driving_school", "question": "SELECT nickname FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'"} +{"answer": "How many staff in total?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Staff"} +{"answer": "How many employees are there?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Staff"} +{"answer": "Which city does staff with first name as Janessa and last name as Sawayn live?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "In what city does Janessa Sawayn live?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "Which country and state does staff with first name as Janessa and last name as Sawayn lived?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "In which country and state does Janessa Sawayn live?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "How long is the total lesson time took by the customer named Rylan Goodwin?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "What is the zip code of staff with first name as Janessa and last name as Sawayn lived?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "What is the zip code of the hosue of the employee named Janessa Sawayn?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "How many staff live in state Georgia?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Addresses WHERE state_province_county = 'Georgia'"} +{"answer": "How many employees live in Georgia?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Addresses WHERE state_province_county = 'Georgia'"} +{"answer": "Find out the first name and last name of staff lived in city Damianfort.\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "What is the first and last name of all employees who live in the city Damianfort?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "Which city lives most of staffs? List the city name and number of staffs.\nAdditional table information: table: driving_school", "question": "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"} +{"answer": "In which city do the most employees live and how many of them live there?\nAdditional table information: table: driving_school", "question": "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"} +{"answer": "List the states which have between 2 to 4 staffs living there.\nAdditional table information: table: driving_school", "question": "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"} +{"answer": "What are the names of the states that have 2 to 4 employees living there?\nAdditional table information: table: driving_school", "question": "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"} +{"answer": "List the first name and last name of all customers.\nAdditional table information: table: driving_school", "question": "SELECT first_name, last_name FROM Customers"} +{"answer": "What are the first and last names for all customers?\nAdditional table information: table: driving_school", "question": "SELECT first_name, last_name FROM Customers"} +{"answer": "List email address and birthday of customer whose first name as Carole.\nAdditional table information: table: driving_school", "question": "SELECT email_address, date_of_birth FROM Customers WHERE first_name = 'Carole'"} +{"answer": "What are the email addresses and date of births for all customers who have a first name of Carole?\nAdditional table information: table: driving_school", "question": "SELECT email_address, date_of_birth FROM Customers WHERE first_name = 'Carole'"} +{"answer": "List phone number and email address of customer with more than 2000 outstanding balance.\nAdditional table information: table: driving_school", "question": "SELECT phone_number, email_address FROM Customers WHERE amount_outstanding > 2000"} +{"answer": "What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000?\nAdditional table information: table: driving_school", "question": "SELECT phone_number, email_address FROM Customers WHERE amount_outstanding > 2000"} +{"answer": "What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina?\nAdditional table information: table: driving_school", "question": "SELECT customer_status_code, cell_mobile_phone_number, email_address FROM Customers WHERE first_name = 'Marina' OR last_name = 'Kohler'"} +{"answer": "What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina?\nAdditional table information: table: driving_school", "question": "SELECT customer_status_code, cell_mobile_phone_number, email_address FROM Customers WHERE first_name = 'Marina' OR last_name = 'Kohler'"} +{"answer": "When are the birthdays of customer who are classified as 'Good Customer' status?\nAdditional table information: table: driving_school", "question": "SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'"} +{"answer": "What is the date of birth of every customer whose status code is 'Good Customer'?\nAdditional table information: table: driving_school", "question": "SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'"} +{"answer": "When did customer with first name as Carole and last name as Bernhard became a customer?\nAdditional table information: table: driving_school", "question": "SELECT date_became_customer FROM Customers WHERE first_name = 'Carole' AND last_name = 'Bernhard'"} +{"answer": "When did Carole Bernhard first become a customer?\nAdditional table information: table: driving_school", "question": "SELECT date_became_customer FROM Customers WHERE first_name = 'Carole' AND last_name = 'Bernhard'"} +{"answer": "How many customers in total?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Customers"} +{"answer": "How many customers are there?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Customers"} +{"answer": "List all customer status codes and the number of customers having each status code.\nAdditional table information: table: driving_school", "question": "SELECT customer_status_code, COUNT(*) FROM Customers GROUP BY customer_status_code"} +{"answer": "For each customer status code, how many customers are classified that way?\nAdditional table information: table: driving_school", "question": "SELECT customer_status_code, COUNT(*) FROM Customers GROUP BY customer_status_code"} +{"answer": "Which customer status code has least number of customers?\nAdditional table information: table: driving_school", "question": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "What is the status code with the least number of customers?\nAdditional table information: table: driving_school", "question": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "How many lessons did the customer Ryan Goodwin complete?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "What is maximum, minimum and average amount of outstanding of customer?\nAdditional table information: table: driving_school", "question": "SELECT MAX(amount_outstanding), MIN(amount_outstanding), AVG(amount_outstanding) FROM Customers"} +{"answer": "What is the maximum, minimum, and average amount of money outsanding for all customers?\nAdditional table information: table: driving_school", "question": "SELECT MAX(amount_outstanding), MIN(amount_outstanding), AVG(amount_outstanding) FROM Customers"} +{"answer": "List the first name and last name of customers have the amount of outstanding between 1000 and 3000.\nAdditional table information: table: driving_school", "question": "SELECT first_name, last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000"} +{"answer": "What are the first and last names of all customers with between 1000 and 3000 dollars outstanding?\nAdditional table information: table: driving_school", "question": "SELECT first_name, last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000"} +{"answer": "List first name and last name of customers lived in city Lockmanfurt.\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "What are the first and last names of all customers who lived in Lockmanfurt?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "Which country does customer with first name as Carole and last name as Bernhard lived in?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "What is the country in which the customer Carole Bernhard lived?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "What is zip code of customer with first name as Carole and last name as Bernhard?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "What is the zip code of the customer Carole Bernhard?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "Which city does has most number of customers?\nAdditional table information: table: driving_school", "question": "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"} +{"answer": "What is the city with the most customers?\nAdditional table information: table: driving_school", "question": "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"} +{"answer": "How much in total does customer with first name as Carole and last name as Bernhard paid?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "What is the total amount of moeny paid by the customer Carole Bernhard?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "List the number of customers that did not have any payment history.\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Customer_Payments)"} +{"answer": "How many customers have no payment histories?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Customer_Payments)"} +{"answer": "List first name and last name of customers that have more than 2 payments.\nAdditional table information: table: driving_school", "question": "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"} +{"answer": "What are the first and last names of all customers with more than 2 payments?\nAdditional table information: table: driving_school", "question": "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"} +{"answer": "List all payment methods and number of payments using each payment methods.\nAdditional table information: table: driving_school", "question": "SELECT payment_method_code, COUNT(*) FROM Customer_Payments GROUP BY payment_method_code"} +{"answer": "For each payment method, how many payments were made?\nAdditional table information: table: driving_school", "question": "SELECT payment_method_code, COUNT(*) FROM Customer_Payments GROUP BY payment_method_code"} +{"answer": "How many lessons were in cancelled state?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Lessons WHERE lesson_status_code = 'Cancelled'"} +{"answer": "How many lessons have been cancelled?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Lessons WHERE lesson_status_code = 'Cancelled'"} +{"answer": "List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'.\nAdditional table information: table: driving_school", "question": "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%'"} +{"answer": "What are the the lesson ids of all staff taught by Janessa Sawayn whose nickname has the letter s?\nAdditional table information: table: driving_school", "question": "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%'"} +{"answer": "How many lessons taught by staff whose first name has letter 'a' in it?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE '%a%'"} +{"answer": "How many lessons were taught by a staff member whose first name has the letter 'a' in it?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE '%a%'"} +{"answer": "How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "What is the total time for all lessons taught by Janessa Sawayn?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "What is average lesson price taught by staff with first name as Janessa and last name as Sawayn?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "What is the average price for a lesson taught by Janessa Sawayn?\nAdditional table information: table: driving_school", "question": "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'"} +{"answer": "How many lesson does customer with first name Ray took?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Ray'"} +{"answer": "How many lessons did the customer with the first name Ray take?\nAdditional table information: table: driving_school", "question": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Ray'"} +{"answer": "Which last names are both used by customers and by staff?\nAdditional table information: table: driving_school", "question": "SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff"} +{"answer": "What are the last names that are used by customers and staff?\nAdditional table information: table: driving_school", "question": "SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff"} +{"answer": "What is the first name of the staff who did not give any lesson?\nAdditional table information: table: driving_school", "question": "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"} +{"answer": "What is the first name of all employees who do not give any lessons?\nAdditional table information: table: driving_school", "question": "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"} +{"answer": "What is the id and detail of the vehicle used in lessons for most of the times?\nAdditional table information: table: driving_school", "question": "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"} +{"answer": "How many faculty do we have?\nAdditional table information: table: activity_1", "question": "SELECT COUNT(*) FROM Faculty"} +{"answer": "What is the total number of faculty members?\nAdditional table information: table: activity_1", "question": "SELECT COUNT(*) FROM Faculty"} +{"answer": "What ranks do we have for faculty?\nAdditional table information: table: activity_1", "question": "SELECT DISTINCT rank FROM Faculty"} +{"answer": "Find the list of distinct ranks for faculty.\nAdditional table information: table: activity_1", "question": "SELECT DISTINCT rank FROM Faculty"} +{"answer": "Show all the distinct buildings that have faculty rooms.\nAdditional table information: table: activity_1", "question": "SELECT DISTINCT building FROM Faculty"} +{"answer": "What buildings have faculty offices?\nAdditional table information: table: activity_1", "question": "SELECT DISTINCT building FROM Faculty"} +{"answer": "Show the rank, first name, and last name for all the faculty.\nAdditional table information: table: activity_1", "question": "SELECT rank, Fname, Lname FROM Faculty"} +{"answer": "What are the rank, first name, and last name of the faculty members?\nAdditional table information: table: activity_1", "question": "SELECT rank, Fname, Lname FROM Faculty"} +{"answer": "Show the first name, last name, and phone number for all female faculty members.\nAdditional table information: table: activity_1", "question": "SELECT Fname, Lname, phone FROM Faculty WHERE Sex = 'F'"} +{"answer": "What are the first name, last name, and phone number of all the female faculty members?\nAdditional table information: table: activity_1", "question": "SELECT Fname, Lname, phone FROM Faculty WHERE Sex = 'F'"} +{"answer": "Show ids for all the male faculty.\nAdditional table information: table: activity_1", "question": "SELECT FacID FROM Faculty WHERE Sex = 'M'"} +{"answer": "What are the faculty ids of all the male faculty members?\nAdditional table information: table: activity_1", "question": "SELECT FacID FROM Faculty WHERE Sex = 'M'"} +{"answer": "How many female Professors do we have?\nAdditional table information: table: activity_1", "question": "SELECT COUNT(*) FROM Faculty WHERE Sex = 'F' AND Rank = 'Professor'"} +{"answer": "Count the number of female Professors we have.\nAdditional table information: table: activity_1", "question": "SELECT COUNT(*) FROM Faculty WHERE Sex = 'F' AND Rank = 'Professor'"} +{"answer": "Show the phone, room, and building for the faculty named Jerry Prince.\nAdditional table information: table: activity_1", "question": "SELECT phone, room, building FROM Faculty WHERE Fname = 'Jerry' AND Lname = 'Prince'"} +{"answer": "What are the phone, room, and building of the faculty member called Jerry Prince?\nAdditional table information: table: activity_1", "question": "SELECT phone, room, building FROM Faculty WHERE Fname = 'Jerry' AND Lname = 'Prince'"} +{"answer": "How many Professors are in building NEB?\nAdditional table information: table: activity_1", "question": "SELECT COUNT(*) FROM Faculty WHERE Rank = 'Professor' AND building = 'NEB'"} +{"answer": "Count the number of Professors who have office in building NEB.\nAdditional table information: table: activity_1", "question": "SELECT COUNT(*) FROM Faculty WHERE Rank = 'Professor' AND building = 'NEB'"} +{"answer": "Show the first name and last name for all the instructors.\nAdditional table information: table: activity_1", "question": "SELECT fname, lname FROM Faculty WHERE Rank = 'Instructor'"} +{"answer": "What are the first name and last name of all the instructors?\nAdditional table information: table: activity_1", "question": "SELECT fname, lname FROM Faculty WHERE Rank = 'Instructor'"} +{"answer": "Show all the buildings along with the number of faculty members the buildings have.\nAdditional table information: table: activity_1", "question": "SELECT building, COUNT(*) FROM Faculty GROUP BY building"} +{"answer": "How many faculty members does each building have? List the result with the name of the building.\nAdditional table information: table: activity_1", "question": "SELECT building, COUNT(*) FROM Faculty GROUP BY building"} +{"answer": "Which building has most faculty members?\nAdditional table information: table: activity_1", "question": "SELECT building FROM Faculty GROUP BY building ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Find the building that has the largest number of faculty members.\nAdditional table information: table: activity_1", "question": "SELECT building FROM Faculty GROUP BY building ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show all the buildings that have at least 10 professors.\nAdditional table information: table: activity_1", "question": "SELECT building FROM Faculty WHERE rank = 'Professor' GROUP BY building HAVING COUNT(*) >= 10"} +{"answer": "In which buildings are there at least ten professors?\nAdditional table information: table: activity_1", "question": "SELECT building FROM Faculty WHERE rank = 'Professor' GROUP BY building HAVING COUNT(*) >= 10"} +{"answer": "For each faculty rank, show the number of faculty members who have it.\nAdditional table information: table: activity_1", "question": "SELECT rank, COUNT(*) FROM Faculty GROUP BY rank"} +{"answer": "How many faculty members do we have for each faculty rank?\nAdditional table information: table: activity_1", "question": "SELECT rank, COUNT(*) FROM Faculty GROUP BY rank"} +{"answer": "Show all the ranks and the number of male and female faculty for each rank.\nAdditional table information: table: activity_1", "question": "SELECT rank, sex, COUNT(*) FROM Faculty GROUP BY rank, sex"} +{"answer": "How many faculty members do we have for each rank and gender?\nAdditional table information: table: activity_1", "question": "SELECT rank, sex, COUNT(*) FROM Faculty GROUP BY rank, sex"} +{"answer": "Which rank has the smallest number of faculty members?\nAdditional table information: table: activity_1", "question": "SELECT rank FROM Faculty GROUP BY rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "Find the faculty rank that has the least members.\nAdditional table information: table: activity_1", "question": "SELECT rank FROM Faculty GROUP BY rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1"} +{"answer": "Show the number of male and female assistant professors.\nAdditional table information: table: activity_1", "question": "SELECT sex, COUNT(*) FROM Faculty WHERE rank = 'AsstProf' GROUP BY sex"} +{"answer": "How many male and female assistant professors do we have?\nAdditional table information: table: activity_1", "question": "SELECT sex, COUNT(*) FROM Faculty WHERE rank = 'AsstProf' GROUP BY sex"} +{"answer": "What are the first name and last name of Linda Smith's advisor?\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "Who is the advisor of Linda Smith? Give me the first name and last name.\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "Show the ids of students whose advisors are professors.\nAdditional table information: table: activity_1", "question": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = 'Professor'"} +{"answer": "Which students have professors as their advisors? Find their student ids.\nAdditional table information: table: activity_1", "question": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = 'Professor'"} +{"answer": "Show first name and last name for all the students advised by Michael Goodrich.\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "Which students are advised by Michael Goodrich? Give me their first and last names.\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "Show the faculty id of each faculty member, along with the number of students he or she advises.\nAdditional table information: table: activity_1", "question": "SELECT T1.FacID, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID"} +{"answer": "What are the faculty id and the number of students each faculty has?\nAdditional table information: table: activity_1", "question": "SELECT T1.FacID, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID"} +{"answer": "Show all the faculty ranks and the number of students advised by each rank.\nAdditional table information: table: activity_1", "question": "SELECT T1.rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank"} +{"answer": "How many students are advised by each rank of faculty? List the rank and the number of students.\nAdditional table information: table: activity_1", "question": "SELECT T1.rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank"} +{"answer": "What are the first and last name of the faculty who has the most students?\nAdditional table information: table: activity_1", "question": "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"} +{"answer": "Give me the the first and last name of the faculty who advises the most students.\nAdditional table information: table: activity_1", "question": "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"} +{"answer": "Show the ids for all the faculty members who have at least 2 students.\nAdditional table information: table: activity_1", "question": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING COUNT(*) >= 2"} +{"answer": "Which faculty members advise two ore more students? Give me their faculty ids.\nAdditional table information: table: activity_1", "question": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING COUNT(*) >= 2"} +{"answer": "Show ids for the faculty members who don't advise any student.\nAdditional table information: table: activity_1", "question": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student"} +{"answer": "What are the ids of the faculty members who do not advise any student.\nAdditional table information: table: activity_1", "question": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student"} +{"answer": "What activities do we have?\nAdditional table information: table: activity_1", "question": "SELECT activity_name FROM Activity"} +{"answer": "List all the activities we have.\nAdditional table information: table: activity_1", "question": "SELECT activity_name FROM Activity"} +{"answer": "How many activities do we have?\nAdditional table information: table: activity_1", "question": "SELECT COUNT(*) FROM Activity"} +{"answer": "Find the number of activities available.\nAdditional table information: table: activity_1", "question": "SELECT COUNT(*) FROM Activity"} +{"answer": "How many faculty members participate in an activity?\nAdditional table information: table: activity_1", "question": "SELECT COUNT(DISTINCT FacID) FROM Faculty_participates_in"} +{"answer": "Give me the number of faculty members who participate in an activity\nAdditional table information: table: activity_1", "question": "SELECT COUNT(DISTINCT FacID) FROM Faculty_participates_in"} +{"answer": "Show the ids of the faculty who don't participate in any activity.\nAdditional table information: table: activity_1", "question": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in"} +{"answer": "Which faculty do not participate in any activity? Find their faculty ids.\nAdditional table information: table: activity_1", "question": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in"} +{"answer": "Show the ids of all the faculty members who participate in an activity and advise a student.\nAdditional table information: table: activity_1", "question": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student"} +{"answer": "What are ids of the faculty members who not only participate in an activity but also advise a student.\nAdditional table information: table: activity_1", "question": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student"} +{"answer": "How many activities does Mark Giuliano participate in?\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "Find the number of activities Mark Giuliano is involved in.\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "Show the names of all the activities Mark Giuliano participates in.\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "What are the names of the activities Mark Giuliano is involved in\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "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.\nAdditional table information: table: activity_1", "question": "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"} +{"answer": "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.\nAdditional table information: table: activity_1", "question": "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"} +{"answer": "Show all the activity names and the number of faculty involved in each activity.\nAdditional table information: table: activity_1", "question": "SELECT T1.activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID"} +{"answer": "How many faculty members participate in each activity? Return the activity names and the number of faculty members.\nAdditional table information: table: activity_1", "question": "SELECT T1.activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID"} +{"answer": "What is the first and last name of the faculty participating in the most activities?\nAdditional table information: table: activity_1", "question": "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"} +{"answer": "Find the first and last name of the faculty who is involved in the largest number of activities.\nAdditional table information: table: activity_1", "question": "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"} +{"answer": "What is the name of the activity that has the most faculty members involved in?\nAdditional table information: table: activity_1", "question": "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"} +{"answer": "Which activity has the most faculty members participating in? Find the activity name.\nAdditional table information: table: activity_1", "question": "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"} +{"answer": "Show the ids of the students who don't participate in any activity.\nAdditional table information: table: activity_1", "question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in"} +{"answer": "What are the ids of the students who are not involved in any activity\nAdditional table information: table: activity_1", "question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in"} +{"answer": "Show the ids for all the students who participate in an activity and are under 20.\nAdditional table information: table: activity_1", "question": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20"} +{"answer": "What are the ids of the students who are under 20 years old and are involved in at least one activity.\nAdditional table information: table: activity_1", "question": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20"} +{"answer": "What is the first and last name of the student participating in the most activities?\nAdditional table information: table: activity_1", "question": "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"} +{"answer": "Tell me the first and last name of the student who has the most activities.\nAdditional table information: table: activity_1", "question": "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"} +{"answer": "What is the name of the activity with the most students?\nAdditional table information: table: activity_1", "question": "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"} +{"answer": "Find the name of the activity that has the largest number of student participants.\nAdditional table information: table: activity_1", "question": "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"} +{"answer": "Find the first names of the faculty members who are playing Canoeing or Kayaking.\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "Which faculty members are playing either Canoeing or Kayaking? Tell me their first names.\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "Find the first names of professors who are not playing Canoeing or Kayaking.\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "What are the first names of the professors who do not play Canoeing or Kayaking as activities?\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "Find the first names of the faculty members who participate in Canoeing and Kayaking.\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "What are the first names of the faculty members playing both Canoeing and Kayaking?\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "Find the ids of the students who participate in Canoeing and Kayaking.\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids.\nAdditional table information: table: activity_1", "question": "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'"} +{"answer": "Find the name of the airport in the city of Goroka.\nAdditional table information: table: flight_4", "question": "SELECT name FROM airports WHERE city = 'Goroka'"} +{"answer": "What are the names of the airports in the city of Goroka?\nAdditional table information: table: flight_4", "question": "SELECT name FROM airports WHERE city = 'Goroka'"} +{"answer": "Find the name, city, country, and altitude (or elevation) of the airports in the city of New York.\nAdditional table information: table: flight_4", "question": "SELECT name, city, country, elevation FROM airports WHERE city = 'New York'"} +{"answer": "What is the name, city, country, and elevation for every airport in the city of New York?\nAdditional table information: table: flight_4", "question": "SELECT name, city, country, elevation FROM airports WHERE city = 'New York'"} +{"answer": "How many airlines are there?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM airlines"} +{"answer": "What is the total number of airlines?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM airlines"} +{"answer": "How many airlines does Russia has?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM airlines WHERE country = 'Russia'"} +{"answer": "What is the number of airlines based in Russia?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM airlines WHERE country = 'Russia'"} +{"answer": "What is the maximum elevation of all airports in the country of Iceland?\nAdditional table information: table: flight_4", "question": "SELECT MAX(elevation) FROM airports WHERE country = 'Iceland'"} +{"answer": "What is the highest elevation of an airport in the country of Iceland?\nAdditional table information: table: flight_4", "question": "SELECT MAX(elevation) FROM airports WHERE country = 'Iceland'"} +{"answer": "Find the name of the airports located in Cuba or Argentina.\nAdditional table information: table: flight_4", "question": "SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina'"} +{"answer": "What are the names of all airports in Cuba or Argentina?\nAdditional table information: table: flight_4", "question": "SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina'"} +{"answer": "Find the country of the airlines whose name starts with 'Orbit'.\nAdditional table information: table: flight_4", "question": "SELECT country FROM airlines WHERE name LIKE 'Orbit%'"} +{"answer": "What are the countries of all airlines whose names start with Orbit?\nAdditional table information: table: flight_4", "question": "SELECT country FROM airlines WHERE name LIKE 'Orbit%'"} +{"answer": "Find the name of airports whose altitude is between -50 and 50.\nAdditional table information: table: flight_4", "question": "SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50"} +{"answer": "What are the names of all airports whose elevation is between -50 and 50?\nAdditional table information: table: flight_4", "question": "SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50"} +{"answer": "Which country is the airport that has the highest altitude located in?\nAdditional table information: table: flight_4", "question": "SELECT country FROM airports ORDER BY elevation DESC LIMIT 1"} +{"answer": "What is the country of the airport with the highest elevation?\nAdditional table information: table: flight_4", "question": "SELECT country FROM airports ORDER BY elevation DESC LIMIT 1"} +{"answer": "Find the number of airports whose name contain the word 'International'.\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM airports WHERE name LIKE '%International%'"} +{"answer": "How many airports' names have the word Interanation in them?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM airports WHERE name LIKE '%International%'"} +{"answer": "How many different cities do have some airport in the country of Greenland?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland'"} +{"answer": "In how many cities are there airports in the country of Greenland?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland'"} +{"answer": "Find the number of routes operated by American Airlines.\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'"} +{"answer": "How many routes does American Airlines operate?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'"} +{"answer": "Find the number of routes whose destination airports are in Canada.\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada'"} +{"answer": "How many routes end in a Canadian airport?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada'"} +{"answer": "Find the name, city, and country of the airport that has the lowest altitude.\nAdditional table information: table: flight_4", "question": "SELECT name, city, country FROM airports ORDER BY elevation NULLS FIRST LIMIT 1"} +{"answer": "What is the name, city, and country of the airport with the lowest altitude?\nAdditional table information: table: flight_4", "question": "SELECT name, city, country FROM airports ORDER BY elevation NULLS FIRST LIMIT 1"} +{"answer": "Find the name, city, and country of the airport that has the highest latitude.\nAdditional table information: table: flight_4", "question": "SELECT name, city, country FROM airports ORDER BY elevation DESC LIMIT 1"} +{"answer": "What is the name, city, and country of the airport with the highest elevation?\nAdditional table information: table: flight_4", "question": "SELECT name, city, country FROM airports ORDER BY elevation DESC LIMIT 1"} +{"answer": "Find the name and city of the airport which is the destination of the most number of routes.\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "What is the name and city of the airport that the most routes end at?\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "Find the names of the top 10 airlines that operate the most number of routes.\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "For the airline ids with the top 10 most routes operated, what are their names?\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "Find the name and city of the airport which is the source for the most number of flight routes.\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "What is the name and city of the airport from most of the routes start?\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "Find the number of different airports which are the destinations of the American Airlines.\nAdditional table information: table: flight_4", "question": "SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'"} +{"answer": "What is the number of different different airports that are destinations for American Airlines?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'"} +{"answer": "Which countries has the most number of airlines?\nAdditional table information: table: flight_4", "question": "SELECT country FROM airlines GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What is the name of the country with the most number of home airlines?\nAdditional table information: table: flight_4", "question": "SELECT country FROM airlines GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Which countries has the most number of airlines whose active status is 'Y'?\nAdditional table information: table: flight_4", "question": "SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "What are the countries with the most airlines whose active status is Y?\nAdditional table information: table: flight_4", "question": "SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "List all countries and their number of airlines in the descending order of number of airlines.\nAdditional table information: table: flight_4", "question": "SELECT country, COUNT(*) FROM airlines GROUP BY country ORDER BY COUNT(*) DESC"} +{"answer": "How many airlines operate out of each country in descending order?\nAdditional table information: table: flight_4", "question": "SELECT country, COUNT(*) FROM airlines GROUP BY country ORDER BY COUNT(*) DESC"} +{"answer": "How many airports are there per country? Order the countries by decreasing number of airports.\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*), country FROM airports GROUP BY country ORDER BY COUNT(*) DESC"} +{"answer": "What is the number of airports per country, ordered from most to least?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*), country FROM airports GROUP BY country ORDER BY COUNT(*) DESC"} +{"answer": "How many airports are there per city in the United States? Order the cities by decreasing number of airports.\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*), city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY COUNT(*) DESC"} +{"answer": "How many airports are there per city in the US ordered from most to least?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*), city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY COUNT(*) DESC"} +{"answer": "Return the cities with more than 3 airports in the United States.\nAdditional table information: table: flight_4", "question": "SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING COUNT(*) > 3"} +{"answer": "What is the number of cities in the United States with more than 3 airports?\nAdditional table information: table: flight_4", "question": "SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING COUNT(*) > 3"} +{"answer": "How many cities are there that have more than 3 airports?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3)"} +{"answer": "What is the count of cities with more than 3 airports?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3)"} +{"answer": "List the cities which have more than one airport and number of airports.\nAdditional table information: table: flight_4", "question": "SELECT city, COUNT(*) FROM airports GROUP BY city HAVING COUNT(*) > 1"} +{"answer": "What are the names of all cities with more than one airport and how many airports do they have?\nAdditional table information: table: flight_4", "question": "SELECT city, COUNT(*) FROM airports GROUP BY city HAVING COUNT(*) > 1"} +{"answer": "List the cities which have more than 2 airports sorted by the number of airports.\nAdditional table information: table: flight_4", "question": "SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 2 ORDER BY COUNT(*) NULLS FIRST"} +{"answer": "What are the cities that have more than 2 airports sorted by number of airports?\nAdditional table information: table: flight_4", "question": "SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 2 ORDER BY COUNT(*) NULLS FIRST"} +{"answer": "Find the number of routes for each source airport and the airport name.\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name"} +{"answer": "For each airport name, how many routes start at that airport?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name"} +{"answer": "Find the number of routes and airport name for each source airport, order the results by decreasing number of routes.\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "For each airport name, how many routes start at that airport, ordered from most to least?\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "Find the average elevation of all airports for each country.\nAdditional table information: table: flight_4", "question": "SELECT AVG(elevation), country FROM airports GROUP BY country"} +{"answer": "For each country, what is the average elevation of that country's airports?\nAdditional table information: table: flight_4", "question": "SELECT AVG(elevation), country FROM airports GROUP BY country"} +{"answer": "Find the cities which have exactly two airports.\nAdditional table information: table: flight_4", "question": "SELECT city FROM airports GROUP BY city HAVING COUNT(*) = 2"} +{"answer": "What are the cities with exactly two airports?\nAdditional table information: table: flight_4", "question": "SELECT city FROM airports GROUP BY city HAVING COUNT(*) = 2"} +{"answer": "For each country and airline name, how many routes are there?\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "What is the total number of routes for each country and airline in that country?\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "Find the number of routes with destination airports in Italy.\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy'"} +{"answer": "What is the number of routes whose destinations are Italian airports?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy'"} +{"answer": "Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'.\nAdditional table information: table: flight_4", "question": "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'"} +{"answer": "What is the number of routes operated by the airline American Airlines whose destinations are in Italy?\nAdditional table information: table: flight_4", "question": "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'"} +{"answer": "Find the number of routes that have destination John F Kennedy International Airport.\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport'"} +{"answer": "What is the number of routes that end at John F Kennedy International Airport?\nAdditional table information: table: flight_4", "question": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport'"} +{"answer": "Find the number of routes from the United States to Canada.\nAdditional table information: table: flight_4", "question": "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')"} +{"answer": "How many routes go from the United States to Canada?\nAdditional table information: table: flight_4", "question": "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')"} +{"answer": "Find the id of routes whose source and destination airports are in the United States.\nAdditional table information: table: flight_4", "question": "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')"} +{"answer": "What is the id of the routes whose source and destination airports are in the United States?\nAdditional table information: table: flight_4", "question": "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')"} +{"answer": "Find the name of airline which runs the most number of routes.\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "What is the name of the airline with the most routes?\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "Find the busiest source airport that runs most number of routes in China.\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "What is the name of the airport with the most number of routes that start in China?\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "Find the busiest destination airport that runs most number of routes in China.\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "What is the name of the airport that is the destination of the most number of routes that start in China?\nAdditional table information: table: flight_4", "question": "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"} +{"answer": "What is the id of the most recent order?\nAdditional table information: table: tracking_orders", "question": "SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1"} +{"answer": "Find the id of the order made most recently.\nAdditional table information: table: tracking_orders", "question": "SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1"} +{"answer": "what are the order id and customer id of the oldest order?\nAdditional table information: table: tracking_orders", "question": "SELECT order_id, customer_id FROM orders ORDER BY date_order_placed NULLS FIRST LIMIT 1"} +{"answer": "Find the order id and customer id associated with the oldest order.\nAdditional table information: table: tracking_orders", "question": "SELECT order_id, customer_id FROM orders ORDER BY date_order_placed NULLS FIRST LIMIT 1"} +{"answer": "Find the id of the order whose shipment tracking number is '3452'.\nAdditional table information: table: tracking_orders", "question": "SELECT order_id FROM shipments WHERE shipment_tracking_number = '3452'"} +{"answer": "Which order's shipment tracking number is '3452'? Give me the id of the order.\nAdditional table information: table: tracking_orders", "question": "SELECT order_id FROM shipments WHERE shipment_tracking_number = '3452'"} +{"answer": "Find the ids of all the order items whose product id is 11.\nAdditional table information: table: tracking_orders", "question": "SELECT order_item_id FROM order_items WHERE product_id = 11"} +{"answer": "Find all the order items whose product id is 11. What are the order item ids?\nAdditional table information: table: tracking_orders", "question": "SELECT order_item_id FROM order_items WHERE product_id = 11"} +{"answer": "List the name of all the distinct customers who have orders with status 'Packing'.\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "Which customers have orders with status 'Packing'? Give me the customer names.\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "Find the details of all the distinct customers who have orders with status 'On Road'.\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "What are the distinct customers who have orders with status 'On Road'? Give me the customer details?\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "What is the name of the customer who has the most orders?\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "Which customer made the most orders? Find the customer name.\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "What is the customer id of the customer who has the most orders?\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "Find the id of the customer who made the most orders.\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "Give me a list of id and status of orders which belong to the customer named 'Jeramie'.\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "Which orders are made by the customer named 'Jeramie'? Give me the order ids and status.\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "Find the dates of orders which belong to the customer named 'Jeramie'.\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "What are the dates of the orders made by the customer named 'Jeramie'?\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01.\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "Which customers made orders between 2009-01-01 and 2010-01-01? Find their names.\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01?\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "What are the distinct ids of products ordered between 1975-01-01 and 1976-01-01??\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "Find the names of the customers who have order status both 'On Road' and 'Shipped'.\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "Which customers have both 'On Road' and 'Shipped' as order status? List the customer names.\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "Find the id of the customers who have order status both 'On Road' and 'Shipped'.\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "Which customers have both 'On Road' and 'Shipped' as order status? List the customer ids.\nAdditional table information: table: tracking_orders", "question": "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'"} +{"answer": "When was the order placed whose shipment tracking number is 3452? Give me the date.\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "On which day was the order placed whose shipment tracking number is 3452?\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "What is the placement date of the order whose invoice number is 10?\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "On what day was the order with invoice number 10 placed?\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "List the count and id of each product in all the orders.\nAdditional table information: table: tracking_orders", "question": "SELECT COUNT(*), T3.product_id FROM orders AS T1, 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"} +{"answer": "For each product, return its id and the number of times it was ordered.\nAdditional table information: table: tracking_orders", "question": "SELECT COUNT(*), T3.product_id FROM orders AS T1, 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"} +{"answer": "List the name and count of each product in all orders.\nAdditional table information: table: tracking_orders", "question": "SELECT T3.product_name, COUNT(*) FROM orders AS T1, 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"} +{"answer": "For each product, show its name and the number of times it was ordered.\nAdditional table information: table: tracking_orders", "question": "SELECT T3.product_name, COUNT(*) FROM orders AS T1, 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"} +{"answer": "Find the ids of orders which are shipped after 2000-01-01.\nAdditional table information: table: tracking_orders", "question": "SELECT order_id FROM shipments WHERE shipment_date > '2000-01-01'"} +{"answer": "Which orders have shipment after 2000-01-01? Give me the order ids.\nAdditional table information: table: tracking_orders", "question": "SELECT order_id FROM shipments WHERE shipment_date > '2000-01-01'"} +{"answer": "Find the id of the order which is shipped most recently.\nAdditional table information: table: tracking_orders", "question": "SELECT order_id FROM shipments WHERE shipment_date = (SELECT MAX(shipment_date) FROM shipments)"} +{"answer": "Which order has the most recent shipment? Give me the order id.\nAdditional table information: table: tracking_orders", "question": "SELECT order_id FROM shipments WHERE shipment_date = (SELECT MAX(shipment_date) FROM shipments)"} +{"answer": "List the names of all distinct products in alphabetical order.\nAdditional table information: table: tracking_orders", "question": "SELECT DISTINCT product_name FROM products ORDER BY product_name NULLS FIRST"} +{"answer": "Sort all the distinct products in alphabetical order.\nAdditional table information: table: tracking_orders", "question": "SELECT DISTINCT product_name FROM products ORDER BY product_name NULLS FIRST"} +{"answer": "List the ids of all distinct orders ordered by placed date.\nAdditional table information: table: tracking_orders", "question": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed NULLS FIRST"} +{"answer": "What are ids of the all distinct orders, sorted by placement date?\nAdditional table information: table: tracking_orders", "question": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed NULLS FIRST"} +{"answer": "What is the id of the order which has the most items?\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "Which order deals with the most items? Return the order id.\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "What is the name of the customer who has the largest number of orders?\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "Find the name of the customer who made the most orders.\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25.\nAdditional table information: table: tracking_orders", "question": "SELECT invoice_number FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25'"} +{"answer": "What are the invoice numbers created before 1989-09-03 or after 2007-12-25?\nAdditional table information: table: tracking_orders", "question": "SELECT invoice_number FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25'"} +{"answer": "Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25.\nAdditional table information: table: tracking_orders", "question": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25'"} +{"answer": "What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25?\nAdditional table information: table: tracking_orders", "question": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25'"} +{"answer": "For each customer who has at least two orders, find the customer name and number of orders made.\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "Which customers have made at least two orders? Give me each customer name and number of orders made.\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "Find the name of the customers who have at most two orders.\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "What are the names of the customers who have made two or less orders?\nAdditional table information: table: tracking_orders", "question": "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"} +{"answer": "List the names of the customers who have once bought product 'food'.\nAdditional table information: table: tracking_orders", "question": "SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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"} +{"answer": "What are the names of the customers who bought product 'food' at least once?\nAdditional table information: table: tracking_orders", "question": "SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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"} +{"answer": "List the names of customers who have once canceled the purchase of the product 'food' (the item status is 'Cancel').\nAdditional table information: table: tracking_orders", "question": "SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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"} +{"answer": "Which customers have ever canceled the purchase of the product 'food' (the item status is 'Cancel')?\nAdditional table information: table: tracking_orders", "question": "SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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"} +{"answer": "How many architects are female?\nAdditional table information: table: architecture", "question": "SELECT COUNT(*) FROM architect WHERE gender = 'female'"} +{"answer": "List the name, nationality and id of all male architects ordered by their names lexicographically.\nAdditional table information: table: architecture", "question": "SELECT name, nationality, id FROM architect WHERE gender = 'male' ORDER BY name NULLS FIRST"} +{"answer": "What is the maximum length in meters for the bridges and what are the architects' names?\nAdditional table information: table: architecture", "question": "SELECT MAX(T1.length_meters), T2.name FROM bridge AS T1 JOIN architect AS T2 ON T1.architect_id = T2.id"} +{"answer": "What is the average length in feet of the bridges?\nAdditional table information: table: architecture", "question": "SELECT AVG(length_feet) FROM bridge"} +{"answer": "What are the names and year of construction for the mills of 'Grondzeiler' type?\nAdditional table information: table: architecture", "question": "SELECT name, built_year FROM mill WHERE TYPE = 'Grondzeiler'"} +{"answer": "What are the distinct names and nationalities of the architects who have ever built a mill?\nAdditional table information: table: architecture", "question": "SELECT DISTINCT T1.name, T1.nationality FROM architect AS T1 JOIN mill AS t2 ON T1.id = T2.architect_id"} +{"answer": "What are the names of the mills which are not located in 'Donceel'?\nAdditional table information: table: architecture", "question": "SELECT name FROM mill WHERE LOCATION <> 'Donceel'"} +{"answer": "What are the distinct types of mills that are built by American or Canadian architects?\nAdditional table information: table: architecture", "question": "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'"} +{"answer": "What are the ids and names of the architects who built at least 3 bridges ?\nAdditional table information: table: architecture", "question": "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"} +{"answer": "What is the id, name and nationality of the architect who built most mills?\nAdditional table information: table: architecture", "question": "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"} +{"answer": "What are the ids, names and genders of the architects who built two bridges or one mill?\nAdditional table information: table: architecture", "question": "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"} +{"answer": "What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?\nAdditional table information: table: architecture", "question": "SELECT LOCATION FROM bridge WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge'"} +{"answer": "Which of the mill names contains the french word 'Moulin'?\nAdditional table information: table: architecture", "question": "SELECT name FROM mill WHERE name LIKE '%Moulin%'"} +{"answer": "What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?\nAdditional table information: table: architecture", "question": "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"} +{"answer": "What is the most common mill type, and how many are there?\nAdditional table information: table: architecture", "question": "SELECT TYPE, COUNT(*) FROM mill GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "How many architects haven't built a mill before year 1850?\nAdditional table information: table: architecture", "question": "SELECT COUNT(*) FROM architect WHERE NOT id IN (SELECT architect_id FROM mill WHERE built_year < 1850)"} +{"answer": "show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length.\nAdditional table information: table: architecture", "question": "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 NULLS FIRST"} +{"answer": "How many book clubs are there?\nAdditional table information: table: culture_company", "question": "SELECT COUNT(*) FROM book_club"} +{"answer": "Count the number of book clubs.\nAdditional table information: table: culture_company", "question": "SELECT COUNT(*) FROM book_club"} +{"answer": "show the titles, and authors or editors for all books made after the year 1989.\nAdditional table information: table: culture_company", "question": "SELECT book_title, author_or_editor FROM book_club WHERE YEAR > 1989"} +{"answer": "What are the titles and authors or editors that correspond to books made after 1989?\nAdditional table information: table: culture_company", "question": "SELECT book_title, author_or_editor FROM book_club WHERE YEAR > 1989"} +{"answer": "Show all distinct publishers for books.\nAdditional table information: table: culture_company", "question": "SELECT DISTINCT publisher FROM book_club"} +{"answer": "What are all the different book publishers?\nAdditional table information: table: culture_company", "question": "SELECT DISTINCT publisher FROM book_club"} +{"answer": "Show the years, book titles, and publishers for all books, in descending order by year.\nAdditional table information: table: culture_company", "question": "SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC"} +{"answer": "What are the years, titles, and publishers for all books, ordered by year descending?\nAdditional table information: table: culture_company", "question": "SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC"} +{"answer": "Show all publishers and the number of books for each publisher.\nAdditional table information: table: culture_company", "question": "SELECT publisher, COUNT(*) FROM book_club GROUP BY publisher"} +{"answer": "How many books are there for each publisher?\nAdditional table information: table: culture_company", "question": "SELECT publisher, COUNT(*) FROM book_club GROUP BY publisher"} +{"answer": "What is the publisher with most number of books?\nAdditional table information: table: culture_company", "question": "SELECT publisher FROM book_club GROUP BY publisher ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Return the publisher that has published the most books.\nAdditional table information: table: culture_company", "question": "SELECT publisher FROM book_club GROUP BY publisher ORDER BY COUNT(*) DESC LIMIT 1"} +{"answer": "Show all book categories and the number of books in each category.\nAdditional table information: table: culture_company", "question": "SELECT category, COUNT(*) FROM book_club GROUP BY category"} +{"answer": "How many books fall into each category?\nAdditional table information: table: culture_company", "question": "SELECT category, COUNT(*) FROM book_club GROUP BY category"} +{"answer": "List categories that have at least two books after year 1989.\nAdditional table information: table: culture_company", "question": "SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING COUNT(*) >= 2"} +{"answer": "What categories have two or more corresponding books that were made after 1989?\nAdditional table information: table: culture_company", "question": "SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING COUNT(*) >= 2"} +{"answer": "Show publishers with a book published in 1989 and a book in 1990.\nAdditional table information: table: culture_company", "question": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990"} +{"answer": "What are the publishers who have published a book in both 1989 and 1990?\nAdditional table information: table: culture_company", "question": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990"} +{"answer": "Show all publishers which do not have a book in 1989.\nAdditional table information: table: culture_company", "question": "SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989"} +{"answer": "Which publishers did not publish a book in 1989?\nAdditional table information: table: culture_company", "question": "SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989"} +{"answer": "Show all movie titles, years, and directors, ordered by budget.\nAdditional table information: table: culture_company", "question": "SELECT title, YEAR, director FROM movie ORDER BY budget_million NULLS FIRST"} +{"answer": "What are the titles, years, and directors of all movies, ordered by budget in millions?\nAdditional table information: table: culture_company", "question": "SELECT title, YEAR, director FROM movie ORDER BY budget_million NULLS FIRST"} +{"answer": "How many movie directors are there?\nAdditional table information: table: culture_company", "question": "SELECT COUNT(DISTINCT director) FROM movie"} +{"answer": "Count the number of different directors.\nAdditional table information: table: culture_company", "question": "SELECT COUNT(DISTINCT director) FROM movie"} +{"answer": "What is the title and director for the movie with highest worldwide gross in the year 2000 or before?\nAdditional table information: table: culture_company", "question": "SELECT title, director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1"} +{"answer": "Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross.\nAdditional table information: table: culture_company", "question": "SELECT title, director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1"} +{"answer": "Show all director names who have a movie in both year 1999 and 2000.\nAdditional table information: table: culture_company", "question": "SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999"} +{"answer": "Which directors had a movie both in the year 1999 and 2000?\nAdditional table information: table: culture_company", "question": "SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999"} +{"answer": "Show all director names who have a movie in the year 1999 or 2000.\nAdditional table information: table: culture_company", "question": "SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000"} +{"answer": "Which directors had a movie in either 1999 or 2000?\nAdditional table information: table: culture_company", "question": "SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000"} +{"answer": "What is the average, maximum, and minimum budget for all movies before 2000.\nAdditional table information: table: culture_company", "question": "SELECT AVG(budget_million), MAX(budget_million), MIN(budget_million) FROM movie WHERE YEAR < 2000"} +{"answer": "Return the average, maximum, and minimum budgets in millions for movies made before the year 2000.\nAdditional table information: table: culture_company", "question": "SELECT AVG(budget_million), MAX(budget_million), MIN(budget_million) FROM movie WHERE YEAR < 2000"} +{"answer": "List all company names with a book published by Alyson.\nAdditional table information: table: culture_company", "question": "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'"} +{"answer": "What are all the company names that have a book published by Alyson?\nAdditional table information: table: culture_company", "question": "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'"} +{"answer": "Show the movie titles and book titles for all companies in China.\nAdditional table information: table: culture_company", "question": "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'"} +{"answer": "What are the titles of movies and books corresponding to companies incorporated in China?\nAdditional table information: table: culture_company", "question": "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'"} +{"answer": "Show all company names with a movie directed in year 1999.\nAdditional table information: table: culture_company", "question": "SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999"} +{"answer": "What are all company names that have a corresponding movie directed in the year 1999?\nAdditional table information: table: culture_company", "question": "SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999"} +{"answer": "Tell me what the notes are for South Australia. \nAdditional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes", "question": "SELECT Notes FROM \"regional_marketing\" WHERE current_slogan = 'SOUTH AUSTRALIA'"} +{"answer": "What is the current series where the new series began in June 2011? \nAdditional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes", "question": "SELECT current_series FROM \"regional_marketing\" WHERE Notes = 'New series began in June 2011'"} +{"answer": "What is the format for South Australia?\nAdditional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes", "question": "SELECT format FROM \"regional_marketing\" WHERE state_territory = 'South Australia'"} +{"answer": "Name the background colour for the Australian Capital Territory. \nAdditional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes", "question": "SELECT text_bg_color FROM \"regional_marketing\" WHERE State/territory = 'Australian Capital Territory'"} +{"answer": "how many times is the fuel propulsion is cng? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion", "question": "SELECT COUNT fleet_series_quantity FROM \"vehicles\".\"cars\" WHERE fuel_propulsion = 'CNG'"} +{"answer": "what is the fuel propulsion where the fleet series (quantity) is 310-329 (20)? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion", "question": "SELECT fuel_propulsion FROM \"vehicles\".\"cars\" WHERE fleet_series_quantity = '310-329 (20)'"} +{"answer": "who is the manufacturer for the order year 1998? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion", "question": "SELECT manufacturer FROM \"vehicles\".\"cars\" WHERE order_year = '1998'"} +{"answer": "how many times is the model ge40lfr? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion", "question": "SELECT COUNT manufacturer FROM \"vehicles\".\"cars\" WHERE model = 'GE40LFR'"} +{"answer": "how many times is the fleet series (quantity) is 468-473 (6)? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion", "question": "SELECT COUNT order_year FROM \"vehicles\".\"cars\" WHERE fleet_series_quantity = '468-473 (6)'"} +{"answer": "what is the powertrain (engine/transmission) when the order year is 2000? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion", "question": "SELECT powertrain FROM \"vehicles\".\"cars\" WHERE order_year = '2000'"}