| [ |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY count(*) DESC LIMIT 1", |
| "question": "which course has most number of registered students?", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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", |
| "value" |
| ], |
| "question_toks": [ |
| "which", |
| "course", |
| "has", |
| "most", |
| "number", |
| "of", |
| "registered", |
| "students", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY count(*) DESC LIMIT 1", |
| "question": "What is the name of the course with the most registered students?", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "name", |
| "of", |
| "the", |
| "course", |
| "with", |
| "the", |
| "most", |
| "registered", |
| "students", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY count(*) LIMIT 1", |
| "question": "what is id of students who registered some courses but the least number of courses in these students?", |
| "query_toks": [ |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_registrations", |
| "GROUP", |
| "BY", |
| "student_id", |
| "ORDER", |
| "BY", |
| "count", |
| "(", |
| "*", |
| ")", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "student_id", |
| "from", |
| "student_course_registrations", |
| "group", |
| "by", |
| "student_id", |
| "order", |
| "by", |
| "count", |
| "(", |
| "*", |
| ")", |
| "limit", |
| "value" |
| ], |
| "question_toks": [ |
| "what", |
| "is", |
| "id", |
| "of", |
| "students", |
| "who", |
| "registered", |
| "some", |
| "courses", |
| "but", |
| "the", |
| "least", |
| "number", |
| "of", |
| "courses", |
| "in", |
| "these", |
| "students", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY count(*) LIMIT 1", |
| "question": "What are the ids of the students who registered for some courses but had the least number of courses for all students?", |
| "query_toks": [ |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_registrations", |
| "GROUP", |
| "BY", |
| "student_id", |
| "ORDER", |
| "BY", |
| "count", |
| "(", |
| "*", |
| ")", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "student_id", |
| "from", |
| "student_course_registrations", |
| "group", |
| "by", |
| "student_id", |
| "order", |
| "by", |
| "count", |
| "(", |
| "*", |
| ")", |
| "limit", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "the", |
| "students", |
| "who", |
| "registered", |
| "for", |
| "some", |
| "courses", |
| "but", |
| "had", |
| "the", |
| "least", |
| "number", |
| "of", |
| "courses", |
| "for", |
| "all", |
| "students", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id", |
| "question": "what are the first name and last name of all candidates?", |
| "query_toks": [ |
| "SELECT", |
| "T2.first_name", |
| ",", |
| "T2.last_name", |
| "FROM", |
| "candidates", |
| "AS", |
| "T1", |
| "JOIN", |
| "people", |
| "AS", |
| "T2", |
| "ON", |
| "T1.candidate_id", |
| "=", |
| "T2.person_id" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t2", |
| ".", |
| "first_name", |
| ",", |
| "t2", |
| ".", |
| "last_name", |
| "from", |
| "candidates", |
| "as", |
| "t1", |
| "join", |
| "people", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "candidate_id", |
| "=", |
| "t2", |
| ".", |
| "person_id" |
| ], |
| "question_toks": [ |
| "what", |
| "are", |
| "the", |
| "first", |
| "name", |
| "and", |
| "last", |
| "name", |
| "of", |
| "all", |
| "candidates", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id", |
| "question": "What are the first and last names of all the candidates?", |
| "query_toks": [ |
| "SELECT", |
| "T2.first_name", |
| ",", |
| "T2.last_name", |
| "FROM", |
| "candidates", |
| "AS", |
| "T1", |
| "JOIN", |
| "people", |
| "AS", |
| "T2", |
| "ON", |
| "T1.candidate_id", |
| "=", |
| "T2.person_id" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t2", |
| ".", |
| "first_name", |
| ",", |
| "t2", |
| ".", |
| "last_name", |
| "from", |
| "candidates", |
| "as", |
| "t1", |
| "join", |
| "people", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "candidate_id", |
| "=", |
| "t2", |
| ".", |
| "person_id" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "first", |
| "and", |
| "last", |
| "names", |
| "of", |
| "all", |
| "the", |
| "candidates", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)", |
| "question": "List the id of students who never attends courses?", |
| "query_toks": [ |
| "SELECT", |
| "student_id", |
| "FROM", |
| "students", |
| "WHERE", |
| "student_id", |
| "NOT", |
| "IN", |
| "(", |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_attendance", |
| ")" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "student_id", |
| "from", |
| "students", |
| "where", |
| "student_id", |
| "not", |
| "in", |
| "(", |
| "select", |
| "student_id", |
| "from", |
| "student_course_attendance", |
| ")" |
| ], |
| "question_toks": [ |
| "List", |
| "the", |
| "id", |
| "of", |
| "students", |
| "who", |
| "never", |
| "attends", |
| "courses", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)", |
| "question": "What are the ids of every student who has never attended a course?", |
| "query_toks": [ |
| "SELECT", |
| "student_id", |
| "FROM", |
| "students", |
| "WHERE", |
| "student_id", |
| "NOT", |
| "IN", |
| "(", |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_attendance", |
| ")" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "student_id", |
| "from", |
| "students", |
| "where", |
| "student_id", |
| "not", |
| "in", |
| "(", |
| "select", |
| "student_id", |
| "from", |
| "student_course_attendance", |
| ")" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "every", |
| "student", |
| "who", |
| "has", |
| "never", |
| "attended", |
| "a", |
| "course", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT student_id FROM student_course_attendance", |
| "question": "List the id of students who attended some courses?", |
| "query_toks": [ |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_attendance" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "student_id", |
| "from", |
| "student_course_attendance" |
| ], |
| "question_toks": [ |
| "List", |
| "the", |
| "id", |
| "of", |
| "students", |
| "who", |
| "attended", |
| "some", |
| "courses", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT student_id FROM student_course_attendance", |
| "question": "What are the ids of all students who have attended at least one course?", |
| "query_toks": [ |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_attendance" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "student_id", |
| "from", |
| "student_course_attendance" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "all", |
| "students", |
| "who", |
| "have", |
| "attended", |
| "at", |
| "least", |
| "one", |
| "course", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T1.student_id , T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id", |
| "question": "What are the ids of all students for courses and what are the names of those courses?", |
| "query_toks": [ |
| "SELECT", |
| "T1.student_id", |
| ",", |
| "T2.course_name", |
| "FROM", |
| "student_course_registrations", |
| "AS", |
| "T1", |
| "JOIN", |
| "courses", |
| "AS", |
| "T2", |
| "ON", |
| "T1.course_id", |
| "=", |
| "T2.course_id" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "student_id", |
| ",", |
| "t2", |
| ".", |
| "course_name", |
| "from", |
| "student_course_registrations", |
| "as", |
| "t1", |
| "join", |
| "courses", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "course_id", |
| "=", |
| "t2", |
| ".", |
| "course_id" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "all", |
| "students", |
| "for", |
| "courses", |
| "and", |
| "what", |
| "are", |
| "the", |
| "names", |
| "of", |
| "those", |
| "courses", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1", |
| "question": "What is detail of the student who most recently registered course?", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "is", |
| "detail", |
| "of", |
| "the", |
| "student", |
| "who", |
| "most", |
| "recently", |
| "registered", |
| "course", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1", |
| "question": "What details do we have on the students who registered for courses most recently?", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "details", |
| "do", |
| "we", |
| "have", |
| "on", |
| "the", |
| "students", |
| "who", |
| "registered", |
| "for", |
| "courses", |
| "most", |
| "recently", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"English\"", |
| "question": "How many students attend course English?", |
| "query_toks": [ |
| "SELECT", |
| "count", |
| "(", |
| "*", |
| ")", |
| "FROM", |
| "courses", |
| "AS", |
| "T1", |
| "JOIN", |
| "student_course_attendance", |
| "AS", |
| "T2", |
| "ON", |
| "T1.course_id", |
| "=", |
| "T2.course_id", |
| "WHERE", |
| "T1.course_name", |
| "=", |
| "``", |
| "English", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "count", |
| "(", |
| "*", |
| ")", |
| "from", |
| "courses", |
| "as", |
| "t1", |
| "join", |
| "student_course_attendance", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "course_id", |
| "=", |
| "t2", |
| ".", |
| "course_id", |
| "where", |
| "t1", |
| ".", |
| "course_name", |
| "=", |
| "value" |
| ], |
| "question_toks": [ |
| "How", |
| "many", |
| "students", |
| "attend", |
| "course", |
| "English", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"English\"", |
| "question": "How many students are attending English courses?", |
| "query_toks": [ |
| "SELECT", |
| "count", |
| "(", |
| "*", |
| ")", |
| "FROM", |
| "courses", |
| "AS", |
| "T1", |
| "JOIN", |
| "student_course_attendance", |
| "AS", |
| "T2", |
| "ON", |
| "T1.course_id", |
| "=", |
| "T2.course_id", |
| "WHERE", |
| "T1.course_name", |
| "=", |
| "``", |
| "English", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "count", |
| "(", |
| "*", |
| ")", |
| "from", |
| "courses", |
| "as", |
| "t1", |
| "join", |
| "student_course_attendance", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "course_id", |
| "=", |
| "t2", |
| ".", |
| "course_id", |
| "where", |
| "t1", |
| ".", |
| "course_name", |
| "=", |
| "value" |
| ], |
| "question_toks": [ |
| "How", |
| "many", |
| "students", |
| "are", |
| "attending", |
| "English", |
| "courses", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171", |
| "question": "How many courses do the student whose id is 171 attend?", |
| "query_toks": [ |
| "SELECT", |
| "count", |
| "(", |
| "*", |
| ")", |
| "FROM", |
| "courses", |
| "AS", |
| "T1", |
| "JOIN", |
| "student_course_attendance", |
| "AS", |
| "T2", |
| "ON", |
| "T1.course_id", |
| "=", |
| "T2.course_id", |
| "WHERE", |
| "T2.student_id", |
| "=", |
| "171" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "count", |
| "(", |
| "*", |
| ")", |
| "from", |
| "courses", |
| "as", |
| "t1", |
| "join", |
| "student_course_attendance", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "course_id", |
| "=", |
| "t2", |
| ".", |
| "course_id", |
| "where", |
| "t2", |
| ".", |
| "student_id", |
| "=", |
| "value" |
| ], |
| "question_toks": [ |
| "How", |
| "many", |
| "courses", |
| "do", |
| "the", |
| "student", |
| "whose", |
| "id", |
| "is", |
| "171", |
| "attend", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171", |
| "question": "How many courses does the student with id 171 actually attend?", |
| "query_toks": [ |
| "SELECT", |
| "count", |
| "(", |
| "*", |
| ")", |
| "FROM", |
| "courses", |
| "AS", |
| "T1", |
| "JOIN", |
| "student_course_attendance", |
| "AS", |
| "T2", |
| "ON", |
| "T1.course_id", |
| "=", |
| "T2.course_id", |
| "WHERE", |
| "T2.student_id", |
| "=", |
| "171" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "count", |
| "(", |
| "*", |
| ")", |
| "from", |
| "courses", |
| "as", |
| "t1", |
| "join", |
| "student_course_attendance", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "course_id", |
| "=", |
| "t2", |
| ".", |
| "course_id", |
| "where", |
| "t2", |
| ".", |
| "student_id", |
| "=", |
| "value" |
| ], |
| "question_toks": [ |
| "How", |
| "many", |
| "courses", |
| "does", |
| "the", |
| "student", |
| "with", |
| "id", |
| "171", |
| "actually", |
| "attend", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = \"stanley.monahan@example.org\"", |
| "question": "Find id of the candidate whose email is stanley.monahan@example.org?", |
| "query_toks": [ |
| "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", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t2", |
| ".", |
| "candidate_id", |
| "from", |
| "people", |
| "as", |
| "t1", |
| "join", |
| "candidates", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "person_id", |
| "=", |
| "t2", |
| ".", |
| "candidate_id", |
| "where", |
| "t1", |
| ".", |
| "email_address", |
| "=", |
| "value" |
| ], |
| "question_toks": [ |
| "Find", |
| "id", |
| "of", |
| "the", |
| "candidate", |
| "whose", |
| "email", |
| "is", |
| "stanley.monahan", |
| "@", |
| "example.org", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = \"stanley.monahan@example.org\"", |
| "question": "What is the id of the candidate whose email is stanley.monahan@example.org?", |
| "query_toks": [ |
| "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", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t2", |
| ".", |
| "candidate_id", |
| "from", |
| "people", |
| "as", |
| "t1", |
| "join", |
| "candidates", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "person_id", |
| "=", |
| "t2", |
| ".", |
| "candidate_id", |
| "where", |
| "t1", |
| ".", |
| "email_address", |
| "=", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "id", |
| "of", |
| "the", |
| "candidate", |
| "whose", |
| "email", |
| "is", |
| "stanley.monahan", |
| "@", |
| "example.org", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1", |
| "question": "Find id of the candidate who most recently accessed the course?", |
| "query_toks": [ |
| "SELECT", |
| "candidate_id", |
| "FROM", |
| "candidate_assessments", |
| "ORDER", |
| "BY", |
| "assessment_date", |
| "DESC", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "candidate_id", |
| "from", |
| "candidate_assessments", |
| "order", |
| "by", |
| "assessment_date", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question_toks": [ |
| "Find", |
| "id", |
| "of", |
| "the", |
| "candidate", |
| "who", |
| "most", |
| "recently", |
| "accessed", |
| "the", |
| "course", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1", |
| "question": "What is the id of the candidate who most recently accessed the course?", |
| "query_toks": [ |
| "SELECT", |
| "candidate_id", |
| "FROM", |
| "candidate_assessments", |
| "ORDER", |
| "BY", |
| "assessment_date", |
| "DESC", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "candidate_id", |
| "from", |
| "candidate_assessments", |
| "order", |
| "by", |
| "assessment_date", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "id", |
| "of", |
| "the", |
| "candidate", |
| "who", |
| "most", |
| "recently", |
| "accessed", |
| "the", |
| "course", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", |
| "question": "What is detail of the student who registered the most number of courses?", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "is", |
| "detail", |
| "of", |
| "the", |
| "student", |
| "who", |
| "registered", |
| "the", |
| "most", |
| "number", |
| "of", |
| "courses", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", |
| "question": "What are the details of the student who registered for the most number of courses?", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "details", |
| "of", |
| "the", |
| "student", |
| "who", |
| "registered", |
| "for", |
| "the", |
| "most", |
| "number", |
| "of", |
| "courses", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T1.student_id , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id", |
| "question": "List the id of students who registered some courses and the number of their registered courses?", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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" |
| ], |
| "question_toks": [ |
| "List", |
| "the", |
| "id", |
| "of", |
| "students", |
| "who", |
| "registered", |
| "some", |
| "courses", |
| "and", |
| "the", |
| "number", |
| "of", |
| "their", |
| "registered", |
| "courses", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T1.student_id , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id", |
| "question": "For every student who is registered for some course, how many courses are they registered for?", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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" |
| ], |
| "question_toks": [ |
| "For", |
| "every", |
| "student", |
| "who", |
| "is", |
| "registered", |
| "for", |
| "some", |
| "course", |
| ",", |
| "how", |
| "many", |
| "courses", |
| "are", |
| "they", |
| "registered", |
| "for", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T3.course_name , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id", |
| "question": "How many registed students do each course have? List course name and the number of their registered students?", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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" |
| ], |
| "question_toks": [ |
| "How", |
| "many", |
| "registed", |
| "students", |
| "do", |
| "each", |
| "course", |
| "have", |
| "?", |
| "List", |
| "course", |
| "name", |
| "and", |
| "the", |
| "number", |
| "of", |
| "their", |
| "registered", |
| "students", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T3.course_name , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id", |
| "question": "For each course id, how many students are registered and what are the course names?", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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" |
| ], |
| "question_toks": [ |
| "For", |
| "each", |
| "course", |
| "id", |
| ",", |
| "how", |
| "many", |
| "students", |
| "are", |
| "registered", |
| "and", |
| "what", |
| "are", |
| "the", |
| "course", |
| "names", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = \"Pass\"", |
| "question": "Find id of candidates whose assessment code is \"Pass\"?", |
| "query_toks": [ |
| "SELECT", |
| "candidate_id", |
| "FROM", |
| "candidate_assessments", |
| "WHERE", |
| "asessment_outcome_code", |
| "=", |
| "``", |
| "Pass", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "candidate_id", |
| "from", |
| "candidate_assessments", |
| "where", |
| "asessment_outcome_code", |
| "=", |
| "value" |
| ], |
| "question_toks": [ |
| "Find", |
| "id", |
| "of", |
| "candidates", |
| "whose", |
| "assessment", |
| "code", |
| "is", |
| "``", |
| "Pass", |
| "''", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = \"Pass\"", |
| "question": "What are the ids of the candidates that have an outcome code of Pass?", |
| "query_toks": [ |
| "SELECT", |
| "candidate_id", |
| "FROM", |
| "candidate_assessments", |
| "WHERE", |
| "asessment_outcome_code", |
| "=", |
| "``", |
| "Pass", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "candidate_id", |
| "from", |
| "candidate_assessments", |
| "where", |
| "asessment_outcome_code", |
| "=", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "the", |
| "candidates", |
| "that", |
| "have", |
| "an", |
| "outcome", |
| "code", |
| "of", |
| "Pass", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = \"Fail\"", |
| "question": "Find the cell mobile number of the candidates whose assessment code is \"Fail\"?", |
| "query_toks": [ |
| "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", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "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", |
| "=", |
| "value" |
| ], |
| "question_toks": [ |
| "Find", |
| "the", |
| "cell", |
| "mobile", |
| "number", |
| "of", |
| "the", |
| "candidates", |
| "whose", |
| "assessment", |
| "code", |
| "is", |
| "``", |
| "Fail", |
| "''", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = \"Fail\"", |
| "question": "What are the cell phone numbers of the candidates that received an assessment code of \"Fail\"?", |
| "query_toks": [ |
| "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", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "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", |
| "=", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "cell", |
| "phone", |
| "numbers", |
| "of", |
| "the", |
| "candidates", |
| "that", |
| "received", |
| "an", |
| "assessment", |
| "code", |
| "of", |
| "``", |
| "Fail", |
| "''", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT student_id FROM student_course_attendance WHERE course_id = 301", |
| "question": "What are the id of students who registered course 301?", |
| "query_toks": [ |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_attendance", |
| "WHERE", |
| "course_id", |
| "=", |
| "301" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "student_id", |
| "from", |
| "student_course_attendance", |
| "where", |
| "course_id", |
| "=", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "id", |
| "of", |
| "students", |
| "who", |
| "registered", |
| "course", |
| "301", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT student_id FROM student_course_attendance WHERE course_id = 301", |
| "question": "What are the ids of the students who registered for course 301?", |
| "query_toks": [ |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_attendance", |
| "WHERE", |
| "course_id", |
| "=", |
| "301" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "student_id", |
| "from", |
| "student_course_attendance", |
| "where", |
| "course_id", |
| "=", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "the", |
| "students", |
| "who", |
| "registered", |
| "for", |
| "course", |
| "301", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1", |
| "question": "What is the id of the student who most recently registered course 301?", |
| "query_toks": [ |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_attendance", |
| "WHERE", |
| "course_id", |
| "=", |
| "301", |
| "ORDER", |
| "BY", |
| "date_of_attendance", |
| "DESC", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "student_id", |
| "from", |
| "student_course_attendance", |
| "where", |
| "course_id", |
| "=", |
| "value", |
| "order", |
| "by", |
| "date_of_attendance", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "id", |
| "of", |
| "the", |
| "student", |
| "who", |
| "most", |
| "recently", |
| "registered", |
| "course", |
| "301", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1", |
| "question": "What are the ids of the students who registered for course 301 most recently?", |
| "query_toks": [ |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_attendance", |
| "WHERE", |
| "course_id", |
| "=", |
| "301", |
| "ORDER", |
| "BY", |
| "date_of_attendance", |
| "DESC", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "student_id", |
| "from", |
| "student_course_attendance", |
| "where", |
| "course_id", |
| "=", |
| "value", |
| "order", |
| "by", |
| "date_of_attendance", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "the", |
| "students", |
| "who", |
| "registered", |
| "for", |
| "course", |
| "301", |
| "most", |
| "recently", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id", |
| "question": "Find distinct cities of addresses of people?", |
| "query_toks": [ |
| "SELECT", |
| "DISTINCT", |
| "T1.city", |
| "FROM", |
| "addresses", |
| "AS", |
| "T1", |
| "JOIN", |
| "people_addresses", |
| "AS", |
| "T2", |
| "ON", |
| "T1.address_id", |
| "=", |
| "T2.address_id" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "distinct", |
| "t1", |
| ".", |
| "city", |
| "from", |
| "addresses", |
| "as", |
| "t1", |
| "join", |
| "people_addresses", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "address_id", |
| "=", |
| "t2", |
| ".", |
| "address_id" |
| ], |
| "question_toks": [ |
| "Find", |
| "distinct", |
| "cities", |
| "of", |
| "addresses", |
| "of", |
| "people", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id", |
| "question": "What are the different cities where people live?", |
| "query_toks": [ |
| "SELECT", |
| "DISTINCT", |
| "T1.city", |
| "FROM", |
| "addresses", |
| "AS", |
| "T1", |
| "JOIN", |
| "people_addresses", |
| "AS", |
| "T2", |
| "ON", |
| "T1.address_id", |
| "=", |
| "T2.address_id" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "distinct", |
| "t1", |
| ".", |
| "city", |
| "from", |
| "addresses", |
| "as", |
| "t1", |
| "join", |
| "people_addresses", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "address_id", |
| "=", |
| "t2", |
| ".", |
| "address_id" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "different", |
| "cities", |
| "where", |
| "people", |
| "live", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id", |
| "question": "Find distinct cities of address of students?", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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" |
| ], |
| "question_toks": [ |
| "Find", |
| "distinct", |
| "cities", |
| "of", |
| "address", |
| "of", |
| "students", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id", |
| "question": "What are the different cities where students live?", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "different", |
| "cities", |
| "where", |
| "students", |
| "live", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT course_name FROM courses ORDER BY course_name", |
| "question": "List the names of courses in alphabetical order?", |
| "query_toks": [ |
| "SELECT", |
| "course_name", |
| "FROM", |
| "courses", |
| "ORDER", |
| "BY", |
| "course_name" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "course_name", |
| "from", |
| "courses", |
| "order", |
| "by", |
| "course_name" |
| ], |
| "question_toks": [ |
| "List", |
| "the", |
| "names", |
| "of", |
| "courses", |
| "in", |
| "alphabetical", |
| "order", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT course_name FROM courses ORDER BY course_name", |
| "question": "What are the names of the courses in alphabetical order?", |
| "query_toks": [ |
| "SELECT", |
| "course_name", |
| "FROM", |
| "courses", |
| "ORDER", |
| "BY", |
| "course_name" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "course_name", |
| "from", |
| "courses", |
| "order", |
| "by", |
| "course_name" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "names", |
| "of", |
| "the", |
| "courses", |
| "in", |
| "alphabetical", |
| "order", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT first_name FROM people ORDER BY first_name", |
| "question": "List the first names of people in alphabetical order?", |
| "query_toks": [ |
| "SELECT", |
| "first_name", |
| "FROM", |
| "people", |
| "ORDER", |
| "BY", |
| "first_name" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "first_name", |
| "from", |
| "people", |
| "order", |
| "by", |
| "first_name" |
| ], |
| "question_toks": [ |
| "List", |
| "the", |
| "first", |
| "names", |
| "of", |
| "people", |
| "in", |
| "alphabetical", |
| "order", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT first_name FROM people ORDER BY first_name", |
| "question": "What are the first names of the people in alphabetical order?", |
| "query_toks": [ |
| "SELECT", |
| "first_name", |
| "FROM", |
| "people", |
| "ORDER", |
| "BY", |
| "first_name" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "first_name", |
| "from", |
| "people", |
| "order", |
| "by", |
| "first_name" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "first", |
| "names", |
| "of", |
| "the", |
| "people", |
| "in", |
| "alphabetical", |
| "order", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance", |
| "question": "What are the id of students who registered courses or attended courses?", |
| "query_toks": [ |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_registrations", |
| "UNION", |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_attendance" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "student_id", |
| "from", |
| "student_course_registrations", |
| "union", |
| "select", |
| "student_id", |
| "from", |
| "student_course_attendance" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "id", |
| "of", |
| "students", |
| "who", |
| "registered", |
| "courses", |
| "or", |
| "attended", |
| "courses", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance", |
| "question": "What are the ids of the students who either registered or attended a course?", |
| "query_toks": [ |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_registrations", |
| "UNION", |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_attendance" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "student_id", |
| "from", |
| "student_course_registrations", |
| "union", |
| "select", |
| "student_id", |
| "from", |
| "student_course_attendance" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "the", |
| "students", |
| "who", |
| "either", |
| "registered", |
| "or", |
| "attended", |
| "a", |
| "course", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121", |
| "question": "Find the id of courses which are registered or attended by student whose id is 121?", |
| "query_toks": [ |
| "SELECT", |
| "course_id", |
| "FROM", |
| "student_course_registrations", |
| "WHERE", |
| "student_id", |
| "=", |
| "121", |
| "UNION", |
| "SELECT", |
| "course_id", |
| "FROM", |
| "student_course_attendance", |
| "WHERE", |
| "student_id", |
| "=", |
| "121" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "course_id", |
| "from", |
| "student_course_registrations", |
| "where", |
| "student_id", |
| "=", |
| "value", |
| "union", |
| "select", |
| "course_id", |
| "from", |
| "student_course_attendance", |
| "where", |
| "student_id", |
| "=", |
| "value" |
| ], |
| "question_toks": [ |
| "Find", |
| "the", |
| "id", |
| "of", |
| "courses", |
| "which", |
| "are", |
| "registered", |
| "or", |
| "attended", |
| "by", |
| "student", |
| "whose", |
| "id", |
| "is", |
| "121", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121", |
| "question": "What are the ids of the courses that are registered or attended by the student whose id is 121?", |
| "query_toks": [ |
| "SELECT", |
| "course_id", |
| "FROM", |
| "student_course_registrations", |
| "WHERE", |
| "student_id", |
| "=", |
| "121", |
| "UNION", |
| "SELECT", |
| "course_id", |
| "FROM", |
| "student_course_attendance", |
| "WHERE", |
| "student_id", |
| "=", |
| "121" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "course_id", |
| "from", |
| "student_course_registrations", |
| "where", |
| "student_id", |
| "=", |
| "value", |
| "union", |
| "select", |
| "course_id", |
| "from", |
| "student_course_attendance", |
| "where", |
| "student_id", |
| "=", |
| "value" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "the", |
| "courses", |
| "that", |
| "are", |
| "registered", |
| "or", |
| "attended", |
| "by", |
| "the", |
| "student", |
| "whose", |
| "id", |
| "is", |
| "121", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)", |
| "question": "What are all info of students who registered courses but not attended courses?", |
| "query_toks": [ |
| "SELECT", |
| "*", |
| "FROM", |
| "student_course_registrations", |
| "WHERE", |
| "student_id", |
| "NOT", |
| "IN", |
| "(", |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_attendance", |
| ")" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "*", |
| "from", |
| "student_course_registrations", |
| "where", |
| "student_id", |
| "not", |
| "in", |
| "(", |
| "select", |
| "student_id", |
| "from", |
| "student_course_attendance", |
| ")" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "all", |
| "info", |
| "of", |
| "students", |
| "who", |
| "registered", |
| "courses", |
| "but", |
| "not", |
| "attended", |
| "courses", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)", |
| "question": "What are all details of the students who registered but did not attend any course?", |
| "query_toks": [ |
| "SELECT", |
| "*", |
| "FROM", |
| "student_course_registrations", |
| "WHERE", |
| "student_id", |
| "NOT", |
| "IN", |
| "(", |
| "SELECT", |
| "student_id", |
| "FROM", |
| "student_course_attendance", |
| ")" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "*", |
| "from", |
| "student_course_registrations", |
| "where", |
| "student_id", |
| "not", |
| "in", |
| "(", |
| "select", |
| "student_id", |
| "from", |
| "student_course_attendance", |
| ")" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "all", |
| "details", |
| "of", |
| "the", |
| "students", |
| "who", |
| "registered", |
| "but", |
| "did", |
| "not", |
| "attend", |
| "any", |
| "course", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"statistics\" ORDER BY T2.registration_date", |
| "question": "List the id of students who registered course statistics in the order of registration date.", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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", |
| "=", |
| "value", |
| "order", |
| "by", |
| "t2", |
| ".", |
| "registration_date" |
| ], |
| "question_toks": [ |
| "List", |
| "the", |
| "id", |
| "of", |
| "students", |
| "who", |
| "registered", |
| "course", |
| "statistics", |
| "in", |
| "the", |
| "order", |
| "of", |
| "registration", |
| "date", |
| "." |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"statistics\" ORDER BY T2.registration_date", |
| "question": "What are the ids of the students who registered course statistics by order of registration date?", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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", |
| "=", |
| "value", |
| "order", |
| "by", |
| "t2", |
| ".", |
| "registration_date" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "the", |
| "students", |
| "who", |
| "registered", |
| "course", |
| "statistics", |
| "by", |
| "order", |
| "of", |
| "registration", |
| "date", |
| "?" |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"statistics\" ORDER BY T2.date_of_attendance", |
| "question": "List the id of students who attended statistics courses in the order of attendance date.", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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", |
| "=", |
| "value", |
| "order", |
| "by", |
| "t2", |
| ".", |
| "date_of_attendance" |
| ], |
| "question_toks": [ |
| "List", |
| "the", |
| "id", |
| "of", |
| "students", |
| "who", |
| "attended", |
| "statistics", |
| "courses", |
| "in", |
| "the", |
| "order", |
| "of", |
| "attendance", |
| "date", |
| "." |
| ] |
| }, |
| { |
| "db_id": "student_assessment", |
| "query": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"statistics\" ORDER BY T2.date_of_attendance", |
| "question": "What are the ids of the students who attended courses in the statistics department in order of attendance date.", |
| "query_toks": [ |
| "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" |
| ], |
| "query_toks_no_value": [ |
| "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", |
| "=", |
| "value", |
| "order", |
| "by", |
| "t2", |
| ".", |
| "date_of_attendance" |
| ], |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "the", |
| "students", |
| "who", |
| "attended", |
| "courses", |
| "in", |
| "the", |
| "statistics", |
| "department", |
| "in", |
| "order", |
| "of", |
| "attendance", |
| "date", |
| "." |
| ] |
| } |
| ] |