text
stringlengths
150
1.06k
source
dict
### QUESTION Find the name of the department that offers the largest number of credits of all classes. ### CONTEXT CREATE TABLE CLASS (crs_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE course (dept_code VARCHAR, crs_code VARCHAR, crs_credit INTEGER) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE CLASS (crs_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE course (dept_code VARCHAR, crs_code VARCHAR, crs_credit INTEGER)", "question": "Find the name of the department that offers the largest number of credits of all classes." }
### QUESTION What is the first name of each student enrolled in class ACCT-211? ### CONTEXT CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR)", "question": "What is the first name of each student enrolled in class ACCT-211?" }
### QUESTION What is the first name of students enrolled in class ACCT-211 and got grade C? ### CONTEXT CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR, enroll_grade VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR, enroll_grade VARCHAR)", "question": "What is the first name of students enrolled in class ACCT-211 and got grade C?" }
### QUESTION How many students enrolled in class ACCT-211? ### CONTEXT CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR) ### ANSWER SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'</s>
{ "answer": "SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'", "context": "CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR)", "question": "How many students enrolled in class ACCT-211?" }
### QUESTION Which Artist has a Week of Top 12? ### CONTEXT CREATE TABLE table_name_54 (artist VARCHAR, week VARCHAR) ### ANSWER SELECT artist FROM table_name_54 WHERE week = "top 12"</s>
{ "answer": "SELECT artist FROM table_name_54 WHERE week = \"top 12\"", "context": "CREATE TABLE table_name_54 (artist VARCHAR, week VARCHAR)", "question": "Which Artist has a Week of Top 12?" }
### QUESTION How many students are enrolled in the class taught by some professor from the accounting department? ### CONTEXT CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE course (crs_code VARCHAR, dept_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE course (crs_code VARCHAR, dept_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR)", "question": "How many students are enrolled in the class taught by some professor from the accounting department?" }
### QUESTION What is the name of the department that has the largest number of students enrolled? ### CONTEXT CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE course (dept_code VARCHAR, crs_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE course (dept_code VARCHAR, crs_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR)", "question": "What is the name of the department that has the largest number of students enrolled?" }
### QUESTION What is Rank Points, when Total is "17", and when Shooter is "Lalita Yauhleuskaya ( AUS )"? ### CONTEXT CREATE TABLE table_name_12 (rank_points VARCHAR, total VARCHAR, shooter VARCHAR) ### ANSWER SELECT rank_points FROM table_name_12 WHERE total = "17" AND shooter = "lalita yauhleuskaya ( aus )"</s>
{ "answer": "SELECT rank_points FROM table_name_12 WHERE total = \"17\" AND shooter = \"lalita yauhleuskaya ( aus )\"", "context": "CREATE TABLE table_name_12 (rank_points VARCHAR, total VARCHAR, shooter VARCHAR)", "question": "What is Rank Points, when Total is \"17\", and when Shooter is \"Lalita Yauhleuskaya ( AUS )\"?" }
### QUESTION what is the attendance in 2011 records ### CONTEXT CREATE TABLE table_21436373_12 (attendance VARCHAR, date_year VARCHAR) ### ANSWER SELECT attendance FROM table_21436373_12 WHERE date_year = "2011"</s>
{ "answer": "SELECT attendance FROM table_21436373_12 WHERE date_year = \"2011\"", "context": "CREATE TABLE table_21436373_12 (attendance VARCHAR, date_year VARCHAR)", "question": "what is the attendance in 2011 records" }
### QUESTION What is Place, when Year is greater than 2006, and when Champion is "Asvel"? ### CONTEXT CREATE TABLE table_name_37 (place VARCHAR, year VARCHAR, champion VARCHAR) ### ANSWER SELECT place FROM table_name_37 WHERE year > 2006 AND champion = "asvel"</s>
{ "answer": "SELECT place FROM table_name_37 WHERE year > 2006 AND champion = \"asvel\"", "context": "CREATE TABLE table_name_37 (place VARCHAR, year VARCHAR, champion VARCHAR)", "question": "What is Place, when Year is greater than 2006, and when Champion is \"Asvel\"?" }
### QUESTION What is the first, last name, gpa of the youngest one among students whose GPA is above 3? ### CONTEXT CREATE TABLE student (stu_fname VARCHAR, stu_lname VARCHAR, stu_gpa INTEGER, stu_dob VARCHAR) ### ANSWER SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1</s>
{ "answer": "SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1", "context": "CREATE TABLE student (stu_fname VARCHAR, stu_lname VARCHAR, stu_gpa INTEGER, stu_dob VARCHAR)", "question": "What is the first, last name, gpa of the youngest one among students whose GPA is above 3?" }
### QUESTION how many records had result/games: 10 games (29,606 avg.) ### CONTEXT CREATE TABLE table_21436373_12 (type_of_record VARCHAR, result_games VARCHAR) ### ANSWER SELECT COUNT(type_of_record) FROM table_21436373_12 WHERE result_games = "10 games (29,606 avg.)"</s>
{ "answer": "SELECT COUNT(type_of_record) FROM table_21436373_12 WHERE result_games = \"10 games (29,606 avg.)\"", "context": "CREATE TABLE table_21436373_12 (type_of_record VARCHAR, result_games VARCHAR)", "question": "how many records had result/games: 10 games (29,606 avg.)" }
### QUESTION what is the highest attendance for a total attendance-regular season record ### CONTEXT CREATE TABLE table_21436373_12 (attendance INTEGER, type_of_record VARCHAR) ### ANSWER SELECT MAX(attendance) FROM table_21436373_12 WHERE type_of_record = "Total attendance-Regular season"</s>
{ "answer": "SELECT MAX(attendance) FROM table_21436373_12 WHERE type_of_record = \"Total attendance-Regular season\"", "context": "CREATE TABLE table_21436373_12 (attendance INTEGER, type_of_record VARCHAR)", "question": "what is the highest attendance for a total attendance-regular season record" }
### QUESTION What is the name of department where has the largest number of professors with a Ph.D. degree? ### CONTEXT CREATE TABLE professor (dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE professor (dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR)", "question": "What is the name of department where has the largest number of professors with a Ph.D. degree?" }
### QUESTION What are the first names of the professors who do not teach a class. ### CONTEXT CREATE TABLE employee (emp_fname VARCHAR, emp_jobcode VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE employee (emp_fname VARCHAR, emp_jobcode VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)", "question": "What are the first names of the professors who do not teach a class." }
### QUESTION What is the first names of the professors from the history department who do not teach a class. ### CONTEXT CREATE TABLE professor (emp_num VARCHAR, dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE professor (emp_num VARCHAR, dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)", "question": "What is the first names of the professors from the history department who do not teach a class." }
### QUESTION What is the last name and office of the professor from the history department? ### CONTEXT CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE employee (emp_lname VARCHAR, emp_num VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE employee (emp_lname VARCHAR, emp_num VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR)", "question": "What is the last name and office of the professor from the history department?" }
### QUESTION What is department name and office for the professor whose last name is Heffington? ### CONTEXT CREATE TABLE employee (emp_num VARCHAR, emp_lname VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE employee (emp_num VARCHAR, emp_lname VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR)", "question": "What is department name and office for the professor whose last name is Heffington?" }
### QUESTION What is the highest total when bronze is less than 1 and gold more than 0? ### CONTEXT CREATE TABLE table_name_65 (total INTEGER, bronze VARCHAR, gold VARCHAR) ### ANSWER SELECT MAX(total) FROM table_name_65 WHERE bronze < 1 AND gold > 0</s>
{ "answer": "SELECT MAX(total) FROM table_name_65 WHERE bronze < 1 AND gold > 0", "context": "CREATE TABLE table_name_65 (total INTEGER, bronze VARCHAR, gold VARCHAR)", "question": "What is the highest total when bronze is less than 1 and gold more than 0?" }
### QUESTION What is the code of the course which the student whose last name is Smithson took? ### CONTEXT CREATE TABLE student (stu_num VARCHAR, stu_lname VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR); CREATE TABLE CLASS (crs_code VARCHAR, class_code VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE student (stu_num VARCHAR, stu_lname VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR); CREATE TABLE CLASS (crs_code VARCHAR, class_code VARCHAR)", "question": "What is the code of the course which the student whose last name is Smithson took?" }
### QUESTION What are the description and credit of the course which the student whose last name is Smithson took? ### CONTEXT CREATE TABLE student (stu_num VARCHAR, stu_lname VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_credit VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE student (stu_num VARCHAR, stu_lname VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_credit VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR)", "question": "What are the description and credit of the course which the student whose last name is Smithson took?" }
### QUESTION How many times is the nation china and bronze more than 0? ### CONTEXT CREATE TABLE table_name_4 (rank VARCHAR, nation VARCHAR, bronze VARCHAR) ### ANSWER SELECT COUNT(rank) FROM table_name_4 WHERE nation = "china" AND bronze > 0</s>
{ "answer": "SELECT COUNT(rank) FROM table_name_4 WHERE nation = \"china\" AND bronze > 0", "context": "CREATE TABLE table_name_4 (rank VARCHAR, nation VARCHAR, bronze VARCHAR)", "question": "How many times is the nation china and bronze more than 0?" }
### QUESTION How many professors who are from either Accounting or Biology department? ### CONTEXT CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (dept_code VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (dept_code VARCHAR)", "question": "How many professors who are from either Accounting or Biology department?" }
### QUESTION Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261. ### CONTEXT CREATE TABLE CLASS (prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE CLASS (prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)", "question": "Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261." }
### QUESTION Find the first name of student who is taking classes from accounting and Computer Info. Systems departments ### CONTEXT CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE course (crs_code VARCHAR, dept_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE course (crs_code VARCHAR, dept_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR)", "question": "Find the first name of student who is taking classes from accounting and Computer Info. Systems departments" }
### QUESTION What is the average gpa of the students enrolled in the course with code ACCT-211? ### CONTEXT CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_gpa INTEGER, stu_num VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_gpa INTEGER, stu_num VARCHAR)", "question": "What is the average gpa of the students enrolled in the course with code ACCT-211?" }
### QUESTION What is the highest value for Byes, when Against is less than 1794, when Losses is "6", and when Draws is less than 0? ### CONTEXT CREATE TABLE table_name_61 (byes INTEGER, draws VARCHAR, against VARCHAR, losses VARCHAR) ### ANSWER SELECT MAX(byes) FROM table_name_61 WHERE against < 1794 AND losses = 6 AND draws < 0</s>
{ "answer": "SELECT MAX(byes) FROM table_name_61 WHERE against < 1794 AND losses = 6 AND draws < 0", "context": "CREATE TABLE table_name_61 (byes INTEGER, draws VARCHAR, against VARCHAR, losses VARCHAR)", "question": "What is the highest value for Byes, when Against is less than 1794, when Losses is \"6\", and when Draws is less than 0?" }
### QUESTION what is the teams for season 1950-51? ### CONTEXT CREATE TABLE table_name_89 (teams VARCHAR, season VARCHAR) ### ANSWER SELECT teams FROM table_name_89 WHERE season = "1950-51"</s>
{ "answer": "SELECT teams FROM table_name_89 WHERE season = \"1950-51\"", "context": "CREATE TABLE table_name_89 (teams VARCHAR, season VARCHAR)", "question": "what is the teams for season 1950-51?" }
### QUESTION Find the first name and gpa of the students whose gpa is lower than the average gpa of all students. ### CONTEXT CREATE TABLE student (stu_fname VARCHAR, stu_gpa INTEGER) ### ANSWER SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student)</s>
{ "answer": "SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student)", "context": "CREATE TABLE student (stu_fname VARCHAR, stu_gpa INTEGER)", "question": "Find the first name and gpa of the students whose gpa is lower than the average gpa of all students." }
### QUESTION Find the name and address of the department that has the highest number of students. ### CONTEXT CREATE TABLE student (dept_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_address VARCHAR, dept_code VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE student (dept_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_address VARCHAR, dept_code VARCHAR)", "question": "Find the name and address of the department that has the highest number of students." }
### QUESTION Find the name, address, number of students in the departments that have the top 3 highest number of students. ### CONTEXT CREATE TABLE student (dept_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_address VARCHAR, dept_code VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE student (dept_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_address VARCHAR, dept_code VARCHAR)", "question": "Find the name, address, number of students in the departments that have the top 3 highest number of students." }
### QUESTION Find the first name and office of the professor who is in the history department and has a Ph.D. degree. ### CONTEXT CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR) ### ANSWER 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.'</s>
{ "answer": "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.'", "context": "CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)", "question": "Find the first name and office of the professor who is in the history department and has a Ph.D. degree." }
### QUESTION Which type of record has result/games of b.c. 16 @ edmonton 22? ### CONTEXT CREATE TABLE table_21436373_6 (type_of_record VARCHAR, result_games VARCHAR) ### ANSWER SELECT type_of_record FROM table_21436373_6 WHERE result_games = "B.C. 16 @ Edmonton 22"</s>
{ "answer": "SELECT type_of_record FROM table_21436373_6 WHERE result_games = \"B.C. 16 @ Edmonton 22\"", "context": "CREATE TABLE table_21436373_6 (type_of_record VARCHAR, result_games VARCHAR)", "question": "Which type of record has result/games of b.c. 16 @ edmonton 22?" }
### QUESTION Find the first names of all instructors who have taught some course and the course description. ### CONTEXT CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR, crs_code VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR, crs_code VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)", "question": "Find the first names of all instructors who have taught some course and the course description." }
### QUESTION Find the first names and offices of all instructors who have taught some course and also find the course description. ### CONTEXT CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR, crs_code VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR, crs_code VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)", "question": "Find the first names and offices of all instructors who have taught some course and also find the course description." }
### QUESTION Find the first names and offices of all instructors who have taught some course and the course description and the department name. ### CONTEXT CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR, crs_code VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR, crs_code VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR)", "question": "Find the first names and offices of all instructors who have taught some course and the course description and the department name." }
### QUESTION Find names of all students who took some course and the course description. ### CONTEXT CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_lname VARCHAR, stu_num VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_lname VARCHAR, stu_num VARCHAR)", "question": "Find names of all students who took some course and the course description." }
### QUESTION Name the to par for 20 feb 2005 ### CONTEXT CREATE TABLE table_21469545_2 (to_par VARCHAR, date VARCHAR) ### ANSWER SELECT to_par FROM table_21469545_2 WHERE date = "20 Feb 2005"</s>
{ "answer": "SELECT to_par FROM table_21469545_2 WHERE date = \"20 Feb 2005\"", "context": "CREATE TABLE table_21469545_2 (to_par VARCHAR, date VARCHAR)", "question": "Name the to par for 20 feb 2005" }
### QUESTION Find the first names of all professors in the Accounting department who is teaching some course and the class room. ### CONTEXT CREATE TABLE CLASS (class_room VARCHAR, prof_num VARCHAR); CREATE TABLE professor (emp_num VARCHAR, dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE CLASS (class_room VARCHAR, prof_num VARCHAR); CREATE TABLE professor (emp_num VARCHAR, dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)", "question": "Find the first names of all professors in the Accounting department who is teaching some course and the class room." }
### QUESTION Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department. ### CONTEXT CREATE TABLE professor (prof_high_degree VARCHAR, emp_num VARCHAR, dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE professor (prof_high_degree VARCHAR, emp_num VARCHAR, dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR)", "question": "Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department." }
### QUESTION Find names of all students who took some course and got A or C. ### CONTEXT CREATE TABLE enroll (stu_num VARCHAR, enroll_grade VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_lname VARCHAR, stu_num VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE enroll (stu_num VARCHAR, enroll_grade VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_lname VARCHAR, stu_num VARCHAR)", "question": "Find names of all students who took some course and got A or C." }
### QUESTION Find the first name and office of history professor who did not get a Ph.D. degree. ### CONTEXT CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR) ### ANSWER 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.'</s>
{ "answer": "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.'", "context": "CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)", "question": "Find the first name and office of history professor who did not get a Ph.D. degree." }
### QUESTION Find the first names of professors who are teaching more than one class. ### CONTEXT CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR)", "question": "Find the first names of professors who are teaching more than one class." }
### QUESTION How many copies were sold of the game released on october 23, 2008? ### CONTEXT CREATE TABLE table_21458142_1 (total_copies_sold VARCHAR, release_date VARCHAR) ### ANSWER SELECT total_copies_sold FROM table_21458142_1 WHERE release_date = "October 23, 2008"</s>
{ "answer": "SELECT total_copies_sold FROM table_21458142_1 WHERE release_date = \"October 23, 2008\"", "context": "CREATE TABLE table_21458142_1 (total_copies_sold VARCHAR, release_date VARCHAR)", "question": "How many copies were sold of the game released on october 23, 2008?" }
### QUESTION What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class? ### CONTEXT CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR, stu_lname VARCHAR) ### ANSWER 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%'</s>
{ "answer": "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%'", "context": "CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR, stu_lname VARCHAR)", "question": "What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class?" }
### QUESTION What is the total number of First Elected, when Party is "Democratic", and when District is "Tennessee 5"? ### CONTEXT CREATE TABLE table_name_28 (first_elected VARCHAR, party VARCHAR, district VARCHAR) ### ANSWER SELECT COUNT(first_elected) FROM table_name_28 WHERE party = "democratic" AND district = "tennessee 5"</s>
{ "answer": "SELECT COUNT(first_elected) FROM table_name_28 WHERE party = \"democratic\" AND district = \"tennessee 5\"", "context": "CREATE TABLE table_name_28 (first_elected VARCHAR, party VARCHAR, district VARCHAR)", "question": "What is the total number of First Elected, when Party is \"Democratic\", and when District is \"Tennessee 5\"?" }
### QUESTION What change caused a change of staff in March 9, 1865? ### CONTEXT CREATE TABLE table_2147588_3 (reason_for_change VARCHAR, date_of_successors_formal_installation VARCHAR) ### ANSWER SELECT reason_for_change FROM table_2147588_3 WHERE date_of_successors_formal_installation = "March 9, 1865"</s>
{ "answer": "SELECT reason_for_change FROM table_2147588_3 WHERE date_of_successors_formal_installation = \"March 9, 1865\"", "context": "CREATE TABLE table_2147588_3 (reason_for_change VARCHAR, date_of_successors_formal_installation VARCHAR)", "question": "What change caused a change of staff in March 9, 1865?" }
### QUESTION When william b. campbell (u) is the successor what is the district? ### CONTEXT CREATE TABLE table_2147588_4 (district VARCHAR, successor VARCHAR) ### ANSWER SELECT district FROM table_2147588_4 WHERE successor = "William B. Campbell (U)"</s>
{ "answer": "SELECT district FROM table_2147588_4 WHERE successor = \"William B. Campbell (U)\"", "context": "CREATE TABLE table_2147588_4 (district VARCHAR, successor VARCHAR)", "question": "When william b. campbell (u) is the successor what is the district?" }
### QUESTION When james brooks (d) is the vacator what is the date the successor was seated? ### CONTEXT CREATE TABLE table_2147588_4 (date_successor_seated VARCHAR, vacator VARCHAR) ### ANSWER SELECT date_successor_seated FROM table_2147588_4 WHERE vacator = "James Brooks (D)"</s>
{ "answer": "SELECT date_successor_seated FROM table_2147588_4 WHERE vacator = \"James Brooks (D)\"", "context": "CREATE TABLE table_2147588_4 (date_successor_seated VARCHAR, vacator VARCHAR)", "question": "When james brooks (d) is the vacator what is the date the successor was seated?" }
### QUESTION What is the average points of players from club with name "AIB". ### CONTEXT CREATE TABLE player (Points INTEGER, Club_ID VARCHAR); CREATE TABLE club (Club_ID VARCHAR, name VARCHAR) ### ANSWER SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = "AIB"</s>
{ "answer": "SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = \"AIB\"", "context": "CREATE TABLE player (Points INTEGER, Club_ID VARCHAR); CREATE TABLE club (Club_ID VARCHAR, name VARCHAR)", "question": "What is the average points of players from club with name \"AIB\"." }
### QUESTION Which Season was the Division Two Fownhope Reserves champions? ### CONTEXT CREATE TABLE table_name_92 (season VARCHAR, division_two VARCHAR) ### ANSWER SELECT season FROM table_name_92 WHERE division_two = "fownhope reserves"</s>
{ "answer": "SELECT season FROM table_name_92 WHERE division_two = \"fownhope reserves\"", "context": "CREATE TABLE table_name_92 (season VARCHAR, division_two VARCHAR)", "question": "Which Season was the Division Two Fownhope Reserves champions?" }
### QUESTION What was the launch date for the sattelite with ado that was 4 kg and 3 meters in diameter? ### CONTEXT CREATE TABLE table_2150068_1 (launch_date__utc_ VARCHAR, diameter_m_ VARCHAR, usage VARCHAR, mass_kg_ VARCHAR) ### ANSWER SELECT launch_date__utc_ FROM table_2150068_1 WHERE usage = "ado" AND mass_kg_ = "4" AND diameter_m_ = "3"</s>
{ "answer": "SELECT launch_date__utc_ FROM table_2150068_1 WHERE usage = \"ado\" AND mass_kg_ = \"4\" AND diameter_m_ = \"3\"", "context": "CREATE TABLE table_2150068_1 (launch_date__utc_ VARCHAR, diameter_m_ VARCHAR, usage VARCHAR, mass_kg_ VARCHAR)", "question": "What was the launch date for the sattelite with ado that was 4 kg and 3 meters in diameter?" }
### QUESTION Find the countries that have never participated in any competition with Friendly type. ### CONTEXT CREATE TABLE competition (country VARCHAR, competition_type VARCHAR) ### ANSWER SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'</s>
{ "answer": "SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'", "context": "CREATE TABLE competition (country VARCHAR, competition_type VARCHAR)", "question": "Find the countries that have never participated in any competition with Friendly type." }
### QUESTION Name the Place which has a Score of 67-71=138, united states? ### CONTEXT CREATE TABLE table_name_17 (place VARCHAR, country VARCHAR, score VARCHAR) ### ANSWER SELECT place FROM table_name_17 WHERE country = "united states" AND score = 67 - 71 = 138</s>
{ "answer": "SELECT place FROM table_name_17 WHERE country = \"united states\" AND score = 67 - 71 = 138", "context": "CREATE TABLE table_name_17 (place VARCHAR, country VARCHAR, score VARCHAR)", "question": "Name the Place which has a Score of 67-71=138, united states?" }
### QUESTION What is every song title for the rock genre and Guitar Hero as original game and the artist is Queens of the Stone Age? ### CONTEXT CREATE TABLE table_21500850_1 (song_title VARCHAR, artist VARCHAR, genre VARCHAR, original_game VARCHAR) ### ANSWER SELECT song_title FROM table_21500850_1 WHERE genre = "Rock" AND original_game = "Guitar Hero" AND artist = "Queens of the Stone Age"</s>
{ "answer": "SELECT song_title FROM table_21500850_1 WHERE genre = \"Rock\" AND original_game = \"Guitar Hero\" AND artist = \"Queens of the Stone Age\"", "context": "CREATE TABLE table_21500850_1 (song_title VARCHAR, artist VARCHAR, genre VARCHAR, original_game VARCHAR)", "question": "What is every song title for the rock genre and Guitar Hero as original game and the artist is Queens of the Stone Age?" }
### QUESTION find the total market rate of the furnitures that have the top 2 market shares. ### CONTEXT CREATE TABLE furniture (market_rate INTEGER) ### ANSWER SELECT SUM(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2</s>
{ "answer": "SELECT SUM(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2", "context": "CREATE TABLE furniture (market_rate INTEGER)", "question": "find the total market rate of the furnitures that have the top 2 market shares." }
### QUESTION Find the names of furnitures whose prices are lower than the highest price. ### CONTEXT CREATE TABLE furniture_manufacte (Furniture_ID VARCHAR, Price_in_Dollar INTEGER); CREATE TABLE furniture (name VARCHAR, Furniture_ID VARCHAR); CREATE TABLE furniture_manufacte (Price_in_Dollar INTEGER) ### ANSWER 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)</s>
{ "answer": "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)", "context": "CREATE TABLE furniture_manufacte (Furniture_ID VARCHAR, Price_in_Dollar INTEGER); CREATE TABLE furniture (name VARCHAR, Furniture_ID VARCHAR); CREATE TABLE furniture_manufacte (Price_in_Dollar INTEGER)", "question": "Find the names of furnitures whose prices are lower than the highest price." }
### QUESTION Who won in 2003? ### CONTEXT CREATE TABLE table_name_19 (winner VARCHAR, year VARCHAR) ### ANSWER SELECT winner FROM table_name_19 WHERE year = 2003</s>
{ "answer": "SELECT winner FROM table_name_19 WHERE year = 2003", "context": "CREATE TABLE table_name_19 (winner VARCHAR, year VARCHAR)", "question": "Who won in 2003?" }
### QUESTION What week #(s featured sara bareilles as the original artist? ### CONTEXT CREATE TABLE table_21501564_1 (week__number VARCHAR, original_artist VARCHAR) ### ANSWER SELECT week__number FROM table_21501564_1 WHERE original_artist = "Sara Bareilles"</s>
{ "answer": "SELECT week__number FROM table_21501564_1 WHERE original_artist = \"Sara Bareilles\"", "context": "CREATE TABLE table_21501564_1 (week__number VARCHAR, original_artist VARCHAR)", "question": "What week #(s featured sara bareilles as the original artist?" }
### QUESTION Find the id and number of shops for the company that produces the most expensive furniture. ### CONTEXT CREATE TABLE manufacturer (manufacturer_id VARCHAR, num_of_shops VARCHAR); CREATE TABLE furniture_manufacte (manufacturer_id VARCHAR, Price_in_Dollar VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE manufacturer (manufacturer_id VARCHAR, num_of_shops VARCHAR); CREATE TABLE furniture_manufacte (manufacturer_id VARCHAR, Price_in_Dollar VARCHAR)", "question": "Find the id and number of shops for the company that produces the most expensive furniture." }
### QUESTION With order number 7 and the theme is Motown, who were the original artists? ### CONTEXT CREATE TABLE table_21501565_1 (original_artist VARCHAR, order__number VARCHAR, theme VARCHAR) ### ANSWER SELECT original_artist FROM table_21501565_1 WHERE order__number = "7" AND theme = "Motown"</s>
{ "answer": "SELECT original_artist FROM table_21501565_1 WHERE order__number = \"7\" AND theme = \"Motown\"", "context": "CREATE TABLE table_21501565_1 (original_artist VARCHAR, order__number VARCHAR, theme VARCHAR)", "question": "With order number 7 and the theme is Motown, who were the original artists?" }
### QUESTION Find the number of funiture types produced by each manufacturer as well as the company names. ### CONTEXT CREATE TABLE furniture_manufacte (manufacturer_id VARCHAR); CREATE TABLE manufacturer (name VARCHAR, manufacturer_id VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE furniture_manufacte (manufacturer_id VARCHAR); CREATE TABLE manufacturer (name VARCHAR, manufacturer_id VARCHAR)", "question": "Find the number of funiture types produced by each manufacturer as well as the company names." }
### QUESTION Find the market shares and names of furnitures which no any company is producing in our records. ### CONTEXT CREATE TABLE furniture (Market_Rate VARCHAR, name VARCHAR, Furniture_ID VARCHAR); CREATE TABLE furniture_manufacte (Market_Rate VARCHAR, name VARCHAR, Furniture_ID VARCHAR) ### ANSWER SELECT Market_Rate, name FROM furniture WHERE NOT Furniture_ID IN (SELECT Furniture_ID FROM furniture_manufacte)</s>
{ "answer": "SELECT Market_Rate, name FROM furniture WHERE NOT Furniture_ID IN (SELECT Furniture_ID FROM furniture_manufacte)", "context": "CREATE TABLE furniture (Market_Rate VARCHAR, name VARCHAR, Furniture_ID VARCHAR); CREATE TABLE furniture_manufacte (Market_Rate VARCHAR, name VARCHAR, Furniture_ID VARCHAR)", "question": "Find the market shares and names of furnitures which no any company is producing in our records." }
### QUESTION Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components. ### CONTEXT CREATE TABLE furniture_manufacte (Furniture_ID VARCHAR, manufacturer_id VARCHAR); CREATE TABLE manufacturer (name VARCHAR, manufacturer_id VARCHAR); CREATE TABLE furniture (Furniture_ID VARCHAR, num_of_component INTEGER) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE furniture_manufacte (Furniture_ID VARCHAR, manufacturer_id VARCHAR); CREATE TABLE manufacturer (name VARCHAR, manufacturer_id VARCHAR); CREATE TABLE furniture (Furniture_ID VARCHAR, num_of_component INTEGER)", "question": "Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components." }
### QUESTION What year was the Grand Prix with an i8 engine and a cc displacement of 1500? ### CONTEXT CREATE TABLE table_name_25 (year VARCHAR, displacement_cc VARCHAR, type VARCHAR, engine VARCHAR) ### ANSWER SELECT year FROM table_name_25 WHERE type = "grand prix" AND engine = "i8" AND displacement_cc = "1500"</s>
{ "answer": "SELECT year FROM table_name_25 WHERE type = \"grand prix\" AND engine = \"i8\" AND displacement_cc = \"1500\"", "context": "CREATE TABLE table_name_25 (year VARCHAR, displacement_cc VARCHAR, type VARCHAR, engine VARCHAR)", "question": "What year was the Grand Prix with an i8 engine and a cc displacement of 1500?" }
### QUESTION Display the first name and department name for each employee. ### CONTEXT CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR); CREATE TABLE employees (first_name VARCHAR, department_id VARCHAR) ### ANSWER SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id</s>
{ "answer": "SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "context": "CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR); CREATE TABLE employees (first_name VARCHAR, department_id VARCHAR)", "question": "Display the first name and department name for each employee." }
### QUESTION What is the total number of years won by Justin Leonard with a to par under 9? ### CONTEXT CREATE TABLE table_name_95 (year_s__won VARCHAR, player VARCHAR, to_par VARCHAR) ### ANSWER SELECT COUNT(year_s__won) FROM table_name_95 WHERE player = "justin leonard" AND to_par < 9</s>
{ "answer": "SELECT COUNT(year_s__won) FROM table_name_95 WHERE player = \"justin leonard\" AND to_par < 9", "context": "CREATE TABLE table_name_95 (year_s__won VARCHAR, player VARCHAR, to_par VARCHAR)", "question": "What is the total number of years won by Justin Leonard with a to par under 9?" }
### QUESTION What is Date (Opening), when Opening Film is "Another Myanmar, Mae Sot"? ### CONTEXT CREATE TABLE table_name_47 (date__opening_ VARCHAR, opening_film VARCHAR) ### ANSWER SELECT date__opening_ FROM table_name_47 WHERE opening_film = "another myanmar, mae sot"</s>
{ "answer": "SELECT date__opening_ FROM table_name_47 WHERE opening_film = \"another myanmar, mae sot\"", "context": "CREATE TABLE table_name_47 (date__opening_ VARCHAR, opening_film VARCHAR)", "question": "What is Date (Opening), when Opening Film is \"Another Myanmar, Mae Sot\"?" }
### QUESTION What are the full name (first and last name) and salary for all employees who does not have any value for commission? ### CONTEXT CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary VARCHAR, commission_pct VARCHAR) ### ANSWER SELECT first_name, last_name, salary FROM employees WHERE commission_pct = "null"</s>
{ "answer": "SELECT first_name, last_name, salary FROM employees WHERE commission_pct = \"null\"", "context": "CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary VARCHAR, commission_pct VARCHAR)", "question": "What are the full name (first and last name) and salary for all employees who does not have any value for commission?" }
### QUESTION Name the number of Earnings per share (¢) which has a Net profit (US $m) larger than 66, and a Year to April smaller than 2010? ### CONTEXT CREATE TABLE table_name_38 (earnings_per_share__ VARCHAR, net_profit__us_$m_ VARCHAR, year_to_april VARCHAR) ### ANSWER SELECT COUNT(earnings_per_share__) AS ¢_ FROM table_name_38 WHERE net_profit__us_$m_ > 66 AND year_to_april < 2010</s>
{ "answer": "SELECT COUNT(earnings_per_share__) AS ¢_ FROM table_name_38 WHERE net_profit__us_$m_ > 66 AND year_to_april < 2010", "context": "CREATE TABLE table_name_38 (earnings_per_share__ VARCHAR, net_profit__us_$m_ VARCHAR, year_to_april VARCHAR)", "question": "Name the number of Earnings per share (¢) which has a Net profit (US $m) larger than 66, and a Year to April smaller than 2010?" }
### QUESTION COunt the EBIT (US $m) which has a Revenue (US $million) larger than 434.8 and a Net profit (US $m) larger than 96.4? ### CONTEXT CREATE TABLE table_name_35 (ebit__us_ VARCHAR, revenue__us_$million_ VARCHAR, net_profit__us_$m_ VARCHAR) ### ANSWER SELECT COUNT(ebit__us_) AS $m_ FROM table_name_35 WHERE revenue__us_$million_ > 434.8 AND net_profit__us_$m_ > 96.4</s>
{ "answer": "SELECT COUNT(ebit__us_) AS $m_ FROM table_name_35 WHERE revenue__us_$million_ > 434.8 AND net_profit__us_$m_ > 96.4", "context": "CREATE TABLE table_name_35 (ebit__us_ VARCHAR, revenue__us_$million_ VARCHAR, net_profit__us_$m_ VARCHAR)", "question": "COunt the EBIT (US $m) which has a Revenue (US $million) larger than 434.8 and a Net profit (US $m) larger than 96.4?" }
### QUESTION 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. ### CONTEXT CREATE TABLE employees (salary VARCHAR, first_name VARCHAR) ### ANSWER SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC</s>
{ "answer": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC", "context": "CREATE TABLE employees (salary VARCHAR, first_name VARCHAR)", "question": "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." }
### QUESTION display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000. ### CONTEXT CREATE TABLE jobs (job_title VARCHAR, max_salary INTEGER, min_salary VARCHAR) ### ANSWER SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000</s>
{ "answer": "SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000", "context": "CREATE TABLE jobs (job_title VARCHAR, max_salary INTEGER, min_salary VARCHAR)", "question": "display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000." }
### QUESTION What is the lowest number of last cfs of the team with 2 cf appearances, 0 cup wins, and less than 0 cf wins? ### CONTEXT CREATE TABLE table_name_90 (last_cf INTEGER, cf_wins VARCHAR, cf_appearances VARCHAR, cup_wins VARCHAR) ### ANSWER SELECT MIN(last_cf) FROM table_name_90 WHERE cf_appearances = 2 AND cup_wins = 0 AND cf_wins < 0</s>
{ "answer": "SELECT MIN(last_cf) FROM table_name_90 WHERE cf_appearances = 2 AND cup_wins = 0 AND cf_wins < 0", "context": "CREATE TABLE table_name_90 (last_cf INTEGER, cf_wins VARCHAR, cf_appearances VARCHAR, cup_wins VARCHAR)", "question": "What is the lowest number of last cfs of the team with 2 cf appearances, 0 cup wins, and less than 0 cf wins?" }
### QUESTION display those departments where more than ten employees work who got a commission percentage. ### CONTEXT CREATE TABLE employees (department_id VARCHAR, commission_pct VARCHAR) ### ANSWER SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10</s>
{ "answer": "SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10", "context": "CREATE TABLE employees (department_id VARCHAR, commission_pct VARCHAR)", "question": "display those departments where more than ten employees work who got a commission percentage." }
### QUESTION What is the population in millions for 2011 where the GDP (nominal) (billions USD) is 4? ### CONTEXT CREATE TABLE table_2155836_1 (population__millions VARCHAR, _2011_ VARCHAR, gdp__nominal___billions_usd_ VARCHAR) ### ANSWER SELECT population__millions, _2011_ FROM table_2155836_1 WHERE gdp__nominal___billions_usd_ = "4"</s>
{ "answer": "SELECT population__millions, _2011_ FROM table_2155836_1 WHERE gdp__nominal___billions_usd_ = \"4\"", "context": "CREATE TABLE table_2155836_1 (population__millions VARCHAR, _2011_ VARCHAR, gdp__nominal___billions_usd_ VARCHAR)", "question": "What is the population in millions for 2011 where the GDP (nominal) (billions USD) is 4? " }
### QUESTION Find employee with ID and name of the country presently where (s)he is working. ### CONTEXT CREATE TABLE countries (country_name VARCHAR, country_id VARCHAR); CREATE TABLE departments (department_id VARCHAR, location_id VARCHAR); CREATE TABLE locations (location_id VARCHAR, country_id VARCHAR); CREATE TABLE employees (employee_id VARCHAR, department_id VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE countries (country_name VARCHAR, country_id VARCHAR); CREATE TABLE departments (department_id VARCHAR, location_id VARCHAR); CREATE TABLE locations (location_id VARCHAR, country_id VARCHAR); CREATE TABLE employees (employee_id VARCHAR, department_id VARCHAR)", "question": "Find employee with ID and name of the country presently where (s)he is working." }
### QUESTION What is the GDP (PPP) (USD, per capita) for Algeria? ### CONTEXT CREATE TABLE table_2155836_1 (_per_capita_ VARCHAR, gdp__ppp___usd INTEGER, country VARCHAR) ### ANSWER SELECT MIN(gdp__ppp___usd), _per_capita_ FROM table_2155836_1 WHERE country = "Algeria"</s>
{ "answer": "SELECT MIN(gdp__ppp___usd), _per_capita_ FROM table_2155836_1 WHERE country = \"Algeria\"", "context": "CREATE TABLE table_2155836_1 (_per_capita_ VARCHAR, gdp__ppp___usd INTEGER, country VARCHAR)", "question": "What is the GDP (PPP) (USD, per capita) for Algeria? " }
### QUESTION display the department name and number of employees in each of the department. ### CONTEXT CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR); CREATE TABLE employees (department_id VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR); CREATE TABLE employees (department_id VARCHAR)", "question": "display the department name and number of employees in each of the department." }
### QUESTION Which Score points has an Event of og beijing, and Rank points of olympic gold medalist? ### CONTEXT CREATE TABLE table_name_9 (score_points VARCHAR, event VARCHAR, rank_points VARCHAR) ### ANSWER SELECT score_points FROM table_name_9 WHERE event = "og beijing" AND rank_points = "olympic gold medalist"</s>
{ "answer": "SELECT score_points FROM table_name_9 WHERE event = \"og beijing\" AND rank_points = \"olympic gold medalist\"", "context": "CREATE TABLE table_name_9 (score_points VARCHAR, event VARCHAR, rank_points VARCHAR)", "question": "Which Score points has an Event of og beijing, and Rank points of olympic gold medalist?" }
### QUESTION Which Rank points has a Score points of olympic silver medalist? ### CONTEXT CREATE TABLE table_name_42 (rank_points VARCHAR, score_points VARCHAR) ### ANSWER SELECT rank_points FROM table_name_42 WHERE score_points = "olympic silver medalist"</s>
{ "answer": "SELECT rank_points FROM table_name_42 WHERE score_points = \"olympic silver medalist\"", "context": "CREATE TABLE table_name_42 (rank_points VARCHAR, score_points VARCHAR)", "question": "Which Rank points has a Score points of olympic silver medalist?" }
### QUESTION What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163? ### CONTEXT CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary INTEGER, employee_id VARCHAR) ### ANSWER SELECT first_name, last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163)</s>
{ "answer": "SELECT first_name, last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163)", "context": "CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary INTEGER, employee_id VARCHAR)", "question": "What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163?" }
### QUESTION Name Event of wc milan and a Total of 23? ### CONTEXT CREATE TABLE table_name_27 (score_points VARCHAR, event VARCHAR, total VARCHAR) ### ANSWER SELECT score_points FROM table_name_27 WHERE event = "wc milan" AND total = "23"</s>
{ "answer": "SELECT score_points FROM table_name_27 WHERE event = \"wc milan\" AND total = \"23\"", "context": "CREATE TABLE table_name_27 (score_points VARCHAR, event VARCHAR, total VARCHAR)", "question": "Name Event of wc milan and a Total of 23?" }
### QUESTION display the employee id and salary of all employees who report to Payam (first name). ### CONTEXT CREATE TABLE employees (employee_id VARCHAR, salary VARCHAR, manager_id VARCHAR, first_name VARCHAR) ### ANSWER SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam')</s>
{ "answer": "SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam')", "context": "CREATE TABLE employees (employee_id VARCHAR, salary VARCHAR, manager_id VARCHAR, first_name VARCHAR)", "question": "display the employee id and salary of all employees who report to Payam (first name)." }
### QUESTION find the name of all departments that do actually have one or more employees assigned to them. ### CONTEXT CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR); CREATE TABLE employees (department_id VARCHAR) ### ANSWER SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id</s>
{ "answer": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "context": "CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR); CREATE TABLE employees (department_id VARCHAR)", "question": "find the name of all departments that do actually have one or more employees assigned to them." }
### QUESTION get the details of employees who manage a department. ### CONTEXT CREATE TABLE departments (department_id VARCHAR, manager_id VARCHAR); CREATE TABLE employees (department_id VARCHAR, employee_id VARCHAR) ### ANSWER SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id</s>
{ "answer": "SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id", "context": "CREATE TABLE departments (department_id VARCHAR, manager_id VARCHAR); CREATE TABLE employees (department_id VARCHAR, employee_id VARCHAR)", "question": "get the details of employees who manage a department." }
### QUESTION display the employee ID and job name for all those jobs in department 80. ### CONTEXT CREATE TABLE jobs (job_title VARCHAR, job_id VARCHAR); CREATE TABLE employees (employee_id VARCHAR, job_id VARCHAR, department_id VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE jobs (job_title VARCHAR, job_id VARCHAR); CREATE TABLE employees (employee_id VARCHAR, job_id VARCHAR, department_id VARCHAR)", "question": "display the employee ID and job name for all those jobs in department 80." }
### QUESTION What is the first name and job id for all employees in the Finance department? ### CONTEXT CREATE TABLE departments (department_id VARCHAR, department_name VARCHAR); CREATE TABLE employees (first_name VARCHAR, job_id VARCHAR, department_id VARCHAR) ### ANSWER 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'</s>
{ "answer": "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'", "context": "CREATE TABLE departments (department_id VARCHAR, department_name VARCHAR); CREATE TABLE employees (first_name VARCHAR, job_id VARCHAR, department_id VARCHAR)", "question": "What is the first name and job id for all employees in the Finance department?" }
### QUESTION display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara. ### CONTEXT CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR, department_id VARCHAR) ### ANSWER SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = "Clara")</s>
{ "answer": "SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = \"Clara\")", "context": "CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR, department_id VARCHAR)", "question": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara." }
### QUESTION display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara. ### CONTEXT CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR, department_id VARCHAR) ### ANSWER 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"</s>
{ "answer": "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\"", "context": "CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR, department_id VARCHAR)", "question": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara." }
### QUESTION 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 ’T’. ### CONTEXT CREATE TABLE employees (employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, department_id VARCHAR) ### ANSWER SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%')</s>
{ "answer": "SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%')", "context": "CREATE TABLE employees (employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, department_id VARCHAR)", "question": "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 ’T’." }
### QUESTION 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. ### CONTEXT CREATE TABLE employees (employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, salary INTEGER, department_id VARCHAR) ### ANSWER 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%')</s>
{ "answer": "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%')", "context": "CREATE TABLE employees (employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, salary INTEGER, department_id VARCHAR)", "question": "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." }
### QUESTION 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. ### CONTEXT CREATE TABLE employees (employee_id VARCHAR, job_id VARCHAR, salary INTEGER) ### ANSWER SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN')</s>
{ "answer": "SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN')", "context": "CREATE TABLE employees (employee_id VARCHAR, job_id VARCHAR, salary INTEGER)", "question": "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." }
### QUESTION What is the average number of wins for entries with more than 32 points, a goal difference smaller than 23, and a Goals against of 36, and a Played smaller than 30? ### CONTEXT CREATE TABLE table_name_61 (wins INTEGER, played VARCHAR, goals_against VARCHAR, points VARCHAR, goal_difference VARCHAR) ### ANSWER SELECT AVG(wins) FROM table_name_61 WHERE points > 32 AND goal_difference < 23 AND goals_against = 36 AND played < 30</s>
{ "answer": "SELECT AVG(wins) FROM table_name_61 WHERE points > 32 AND goal_difference < 23 AND goals_against = 36 AND played < 30", "context": "CREATE TABLE table_name_61 (wins INTEGER, played VARCHAR, goals_against VARCHAR, points VARCHAR, goal_difference VARCHAR)", "question": "What is the average number of wins for entries with more than 32 points, a goal difference smaller than 23, and a Goals against of 36, and a Played smaller than 30?" }
### QUESTION What is the time when ss12 is stage? ### CONTEXT CREATE TABLE table_21578303_2 (time VARCHAR, stage VARCHAR) ### ANSWER SELECT time FROM table_21578303_2 WHERE stage = "SS12"</s>
{ "answer": "SELECT time FROM table_21578303_2 WHERE stage = \"SS12\"", "context": "CREATE TABLE table_21578303_2 (time VARCHAR, stage VARCHAR)", "question": "What is the time when ss12 is stage?" }
### QUESTION Name the state class for resigned november 3, 1964 ### CONTEXT CREATE TABLE table_2159506_3 (state__class_ VARCHAR, reason_for_change VARCHAR) ### ANSWER SELECT state__class_ FROM table_2159506_3 WHERE reason_for_change = "Resigned November 3, 1964"</s>
{ "answer": "SELECT state__class_ FROM table_2159506_3 WHERE reason_for_change = \"Resigned November 3, 1964\"", "context": "CREATE TABLE table_2159506_3 (state__class_ VARCHAR, reason_for_change VARCHAR)", "question": "Name the state class for resigned november 3, 1964" }
### QUESTION 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. ### CONTEXT CREATE TABLE employees (employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, job_id VARCHAR, salary INTEGER) ### ANSWER SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN')</s>
{ "answer": "SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN')", "context": "CREATE TABLE employees (employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, job_id VARCHAR, salary INTEGER)", "question": "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." }
### QUESTION display the first and last name, department, city, and state province for each employee. ### CONTEXT CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR, location_id VARCHAR); CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, department_id VARCHAR); CREATE TABLE locations (city VARCHAR, state_province VARCHAR, location_id VARCHAR) ### ANSWER 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</s>
{ "answer": "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", "context": "CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR, location_id VARCHAR); CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, department_id VARCHAR); CREATE TABLE locations (city VARCHAR, state_province VARCHAR, location_id VARCHAR)", "question": "display the first and last name, department, city, and state province for each employee." }
### QUESTION display the department ID, full name (first and last name), salary for those employees who is highest salary in every department. ### CONTEXT CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary INTEGER, department_id VARCHAR) ### ANSWER SELECT first_name, last_name, salary, department_id, MAX(salary) FROM employees GROUP BY department_id</s>
{ "answer": "SELECT first_name, last_name, salary, department_id, MAX(salary) FROM employees GROUP BY department_id", "context": "CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary INTEGER, department_id VARCHAR)", "question": "display the department ID, full name (first and last name), salary for those employees who is highest salary in every department." }
### QUESTION display the department name, city, and state province for each department. ### CONTEXT CREATE TABLE locations (city VARCHAR, state_province VARCHAR, location_id VARCHAR); CREATE TABLE departments (department_name VARCHAR, location_id VARCHAR) ### ANSWER SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id</s>
{ "answer": "SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id", "context": "CREATE TABLE locations (city VARCHAR, state_province VARCHAR, location_id VARCHAR); CREATE TABLE departments (department_name VARCHAR, location_id VARCHAR)", "question": "display the department name, city, and state province for each department." }