db_id
stringlengths
4
31
query
stringlengths
18
577
question
stringlengths
16
224
query_toks
listlengths
4
90
query_toks_no_value
listlengths
4
125
question_toks
listlengths
4
44
e_learning
SELECT test_result , COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC
List each test result and its count in descending order of count.
[ "SELECT", "test_result", ",", "COUNT", "(", "*", ")", "FROM", "Student_Tests_Taken", "GROUP", "BY", "test_result", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC" ]
[ "select", "test_result", ",", "count", "(", "*", ")", "from", "student_tests_taken", "group", "by", "test_result", "order", "by", "count", "(", "*", ")", "desc" ]
[ "List", "each", "test", "result", "and", "its", "count", "in", "descending", "order", "of", "count", "." ]
e_learning
SELECT test_result , COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC
For each distinct test result, find the number of students who got the result.
[ "SELECT", "test_result", ",", "COUNT", "(", "*", ")", "FROM", "Student_Tests_Taken", "GROUP", "BY", "test_result", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC" ]
[ "select", "test_result", ",", "count", "(", "*", ")", "from", "student_tests_taken", "group", "by", "test_result", "order", "by", "count", "(", "*", ")", "desc" ]
[ "For", "each", "distinct", "test", "result", ",", "find", "the", "number", "of", "students", "who", "got", "the", "result", "." ]
e_learning
SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "advanced database"
Find the login name of the course author that teaches the course with name "advanced database".
[ "SELECT", "T1.login_name", "FROM", "Course_Authors_and_Tutors", "AS", "T1", "JOIN", "Courses", "AS", "T2", "ON", "T1.author_id", "=", "T2.author_id", "WHERE", "T2.course_name", "=", "``", "advanced", "database", "''" ]
[ "select", "t1", ".", "login_name", "from", "course_authors_and_tutors", "as", "t1", "join", "courses", "as", "t2", "on", "t1", ".", "author_id", "=", "t2", ".", "author_id", "where", "t2", ".", "course_name", "=", "value" ]
[ "Find", "the", "login", "name", "of", "the", "course", "author", "that", "teaches", "the", "course", "with", "name", "``", "advanced", "database", "''", "." ]
e_learning
SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "advanced database"
Which course author teaches the "advanced database" course? Give me his or her login name.
[ "SELECT", "T1.login_name", "FROM", "Course_Authors_and_Tutors", "AS", "T1", "JOIN", "Courses", "AS", "T2", "ON", "T1.author_id", "=", "T2.author_id", "WHERE", "T2.course_name", "=", "``", "advanced", "database", "''" ]
[ "select", "t1", ".", "login_name", "from", "course_authors_and_tutors", "as", "t1", "join", "courses", "as", "t2", "on", "t1", ".", "author_id", "=", "t2", ".", "author_id", "where", "t2", ".", "course_name", "=", "value" ]
[ "Which", "course", "author", "teaches", "the", "``", "advanced", "database", "''", "course", "?", "Give", "me", "his", "or", "her", "login", "name", "." ]
e_learning
SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "operating system" OR T2.course_name = "data structure"
Find the addresses of the course authors who teach the course with name "operating system" or "data structure".
[ "SELECT", "T1.address_line_1", "FROM", "Course_Authors_and_Tutors", "AS", "T1", "JOIN", "Courses", "AS", "T2", "ON", "T1.author_id", "=", "T2.author_id", "WHERE", "T2.course_name", "=", "``", "operating", "system", "''", "OR", "T2.course_name", "=", "``", "data", "structure", "''" ]
[ "select", "t1", ".", "address_line_1", "from", "course_authors_and_tutors", "as", "t1", "join", "courses", "as", "t2", "on", "t1", ".", "author_id", "=", "t2", ".", "author_id", "where", "t2", ".", "course_name", "=", "value", "or", "t2", ".", "course_name", "=", "value" ]
[ "Find", "the", "addresses", "of", "the", "course", "authors", "who", "teach", "the", "course", "with", "name", "``", "operating", "system", "''", "or", "``", "data", "structure", "''", "." ]
e_learning
SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "operating system" OR T2.course_name = "data structure"
What are the addresses of the course authors who teach either "operating system" or "data structure" course.
[ "SELECT", "T1.address_line_1", "FROM", "Course_Authors_and_Tutors", "AS", "T1", "JOIN", "Courses", "AS", "T2", "ON", "T1.author_id", "=", "T2.author_id", "WHERE", "T2.course_name", "=", "``", "operating", "system", "''", "OR", "T2.course_name", "=", "``", "data", "structure", "''" ]
[ "select", "t1", ".", "address_line_1", "from", "course_authors_and_tutors", "as", "t1", "join", "courses", "as", "t2", "on", "t1", ".", "author_id", "=", "t2", ".", "author_id", "where", "t2", ".", "course_name", "=", "value", "or", "t2", ".", "course_name", "=", "value" ]
[ "What", "are", "the", "addresses", "of", "the", "course", "authors", "who", "teach", "either", "``", "operating", "system", "''", "or", "``", "data", "structure", "''", "course", "." ]
e_learning
SELECT T1.personal_name , T1.family_name , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1
Find the personal name, family name, and author ID of the course author that teaches the most courses.
[ "SELECT", "T1.personal_name", ",", "T1.family_name", ",", "T2.author_id", "FROM", "Course_Authors_and_Tutors", "AS", "T1", "JOIN", "Courses", "AS", "T2", "ON", "T1.author_id", "=", "T2.author_id", "GROUP", "BY", "T2.author_id", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "personal_name", ",", "t1", ".", "family_name", ",", "t2", ".", "author_id", "from", "course_authors_and_tutors", "as", "t1", "join", "courses", "as", "t2", "on", "t1", ".", "author_id", "=", "t2", ".", "author_id", "group", "by", "t2", ".", "author_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Find", "the", "personal", "name", ",", "family", "name", ",", "and", "author", "ID", "of", "the", "course", "author", "that", "teaches", "the", "most", "courses", "." ]
e_learning
SELECT T1.personal_name , T1.family_name , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1
What are the personal name, family name, and author ID of the course author who teaches the most courses?
[ "SELECT", "T1.personal_name", ",", "T1.family_name", ",", "T2.author_id", "FROM", "Course_Authors_and_Tutors", "AS", "T1", "JOIN", "Courses", "AS", "T2", "ON", "T1.author_id", "=", "T2.author_id", "GROUP", "BY", "T2.author_id", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "personal_name", ",", "t1", ".", "family_name", ",", "t2", ".", "author_id", "from", "course_authors_and_tutors", "as", "t1", "join", "courses", "as", "t2", "on", "t1", ".", "author_id", "=", "t2", ".", "author_id", "group", "by", "t2", ".", "author_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "What", "are", "the", "personal", "name", ",", "family", "name", ",", "and", "author", "ID", "of", "the", "course", "author", "who", "teaches", "the", "most", "courses", "?" ]
e_learning
SELECT T1.address_line_1 , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING Count(*) >= 2
Find the addresses and author IDs of the course authors that teach at least two courses.
[ "SELECT", "T1.address_line_1", ",", "T2.author_id", "FROM", "Course_Authors_and_Tutors", "AS", "T1", "JOIN", "Courses", "AS", "T2", "ON", "T1.author_id", "=", "T2.author_id", "GROUP", "BY", "T2.author_id", "HAVING", "Count", "(", "*", ")", ">", "=", "2" ]
[ "select", "t1", ".", "address_line_1", ",", "t2", ".", "author_id", "from", "course_authors_and_tutors", "as", "t1", "join", "courses", "as", "t2", "on", "t1", ".", "author_id", "=", "t2", ".", "author_id", "group", "by", "t2", ".", "author_id", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "Find", "the", "addresses", "and", "author", "IDs", "of", "the", "course", "authors", "that", "teach", "at", "least", "two", "courses", "." ]
e_learning
SELECT T1.address_line_1 , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING Count(*) >= 2
Which course authors teach two or more courses? Give me their addresses and author IDs.
[ "SELECT", "T1.address_line_1", ",", "T2.author_id", "FROM", "Course_Authors_and_Tutors", "AS", "T1", "JOIN", "Courses", "AS", "T2", "ON", "T1.author_id", "=", "T2.author_id", "GROUP", "BY", "T2.author_id", "HAVING", "Count", "(", "*", ")", ">", "=", "2" ]
[ "select", "t1", ".", "address_line_1", ",", "t2", ".", "author_id", "from", "course_authors_and_tutors", "as", "t1", "join", "courses", "as", "t2", "on", "t1", ".", "author_id", "=", "t2", ".", "author_id", "group", "by", "t2", ".", "author_id", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "Which", "course", "authors", "teach", "two", "or", "more", "courses", "?", "Give", "me", "their", "addresses", "and", "author", "IDs", "." ]
e_learning
SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = "Julio"
Find the names of courses taught by the tutor who has personal name "Julio".
[ "SELECT", "T2.course_name", "FROM", "Course_Authors_and_Tutors", "AS", "T1", "JOIN", "Courses", "AS", "T2", "ON", "T1.author_id", "=", "T2.author_id", "WHERE", "T1.personal_name", "=", "``", "Julio", "''" ]
[ "select", "t2", ".", "course_name", "from", "course_authors_and_tutors", "as", "t1", "join", "courses", "as", "t2", "on", "t1", ".", "author_id", "=", "t2", ".", "author_id", "where", "t1", ".", "personal_name", "=", "value" ]
[ "Find", "the", "names", "of", "courses", "taught", "by", "the", "tutor", "who", "has", "personal", "name", "``", "Julio", "''", "." ]
e_learning
SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = "Julio"
What are the names of the courses taught by the tutor whose personal name is "Julio"?
[ "SELECT", "T2.course_name", "FROM", "Course_Authors_and_Tutors", "AS", "T1", "JOIN", "Courses", "AS", "T2", "ON", "T1.author_id", "=", "T2.author_id", "WHERE", "T1.personal_name", "=", "``", "Julio", "''" ]
[ "select", "t2", ".", "course_name", "from", "course_authors_and_tutors", "as", "t1", "join", "courses", "as", "t2", "on", "t1", ".", "author_id", "=", "t2", ".", "author_id", "where", "t1", ".", "personal_name", "=", "value" ]
[ "What", "are", "the", "names", "of", "the", "courses", "taught", "by", "the", "tutor", "whose", "personal", "name", "is", "``", "Julio", "''", "?" ]
e_learning
SELECT T1.course_name , T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = "Computer Science"
Find the names and descriptions of courses that belong to the subject named "Computer Science".
[ "SELECT", "T1.course_name", ",", "T1.course_description", "FROM", "Courses", "AS", "T1", "JOIN", "Subjects", "AS", "T2", "ON", "T1.subject_id", "=", "T2.subject_id", "WHERE", "T2.subject_name", "=", "``", "Computer", "Science", "''" ]
[ "select", "t1", ".", "course_name", ",", "t1", ".", "course_description", "from", "courses", "as", "t1", "join", "subjects", "as", "t2", "on", "t1", ".", "subject_id", "=", "t2", ".", "subject_id", "where", "t2", ".", "subject_name", "=", "value" ]
[ "Find", "the", "names", "and", "descriptions", "of", "courses", "that", "belong", "to", "the", "subject", "named", "``", "Computer", "Science", "''", "." ]
e_learning
SELECT T1.course_name , T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = "Computer Science"
What are the names and descriptions of the all courses under the "Computer Science" subject?
[ "SELECT", "T1.course_name", ",", "T1.course_description", "FROM", "Courses", "AS", "T1", "JOIN", "Subjects", "AS", "T2", "ON", "T1.subject_id", "=", "T2.subject_id", "WHERE", "T2.subject_name", "=", "``", "Computer", "Science", "''" ]
[ "select", "t1", ".", "course_name", ",", "t1", ".", "course_description", "from", "courses", "as", "t1", "join", "subjects", "as", "t2", "on", "t1", ".", "subject_id", "=", "t2", ".", "subject_id", "where", "t2", ".", "subject_name", "=", "value" ]
[ "What", "are", "the", "names", "and", "descriptions", "of", "the", "all", "courses", "under", "the", "``", "Computer", "Science", "''", "subject", "?" ]
e_learning
SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id
Find the subject ID, subject name, and the corresponding number of available courses for each subject.
[ "SELECT", "T1.subject_id", ",", "T2.subject_name", ",", "COUNT", "(", "*", ")", "FROM", "Courses", "AS", "T1", "JOIN", "Subjects", "AS", "T2", "ON", "T1.subject_id", "=", "T2.subject_id", "GROUP", "BY", "T1.subject_id" ]
[ "select", "t1", ".", "subject_id", ",", "t2", ".", "subject_name", ",", "count", "(", "*", ")", "from", "courses", "as", "t1", "join", "subjects", "as", "t2", "on", "t1", ".", "subject_id", "=", "t2", ".", "subject_id", "group", "by", "t1", ".", "subject_id" ]
[ "Find", "the", "subject", "ID", ",", "subject", "name", ",", "and", "the", "corresponding", "number", "of", "available", "courses", "for", "each", "subject", "." ]
e_learning
SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id
What are the subject ID, subject name, and the number of available courses for each subject?
[ "SELECT", "T1.subject_id", ",", "T2.subject_name", ",", "COUNT", "(", "*", ")", "FROM", "Courses", "AS", "T1", "JOIN", "Subjects", "AS", "T2", "ON", "T1.subject_id", "=", "T2.subject_id", "GROUP", "BY", "T1.subject_id" ]
[ "select", "t1", ".", "subject_id", ",", "t2", ".", "subject_name", ",", "count", "(", "*", ")", "from", "courses", "as", "t1", "join", "subjects", "as", "t2", "on", "t1", ".", "subject_id", "=", "t2", ".", "subject_id", "group", "by", "t1", ".", "subject_id" ]
[ "What", "are", "the", "subject", "ID", ",", "subject", "name", ",", "and", "the", "number", "of", "available", "courses", "for", "each", "subject", "?" ]
e_learning
SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC
Find the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order.
[ "SELECT", "T1.subject_id", ",", "T2.subject_name", ",", "COUNT", "(", "*", ")", "FROM", "Courses", "AS", "T1", "JOIN", "Subjects", "AS", "T2", "ON", "T1.subject_id", "=", "T2.subject_id", "GROUP", "BY", "T1.subject_id", "ORDER", "BY", "COUNT", "(", "*", ")", "ASC" ]
[ "select", "t1", ".", "subject_id", ",", "t2", ".", "subject_name", ",", "count", "(", "*", ")", "from", "courses", "as", "t1", "join", "subjects", "as", "t2", "on", "t1", ".", "subject_id", "=", "t2", ".", "subject_id", "group", "by", "t1", ".", "subject_id", "order", "by", "count", "(", "*", ")", "asc" ]
[ "Find", "the", "subject", "ID", ",", "name", "of", "subject", "and", "the", "corresponding", "number", "of", "courses", "for", "each", "subject", ",", "and", "sort", "by", "the", "course", "count", "in", "ascending", "order", "." ]
e_learning
SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC
List the subject ID, name of subject and the number of courses available for each subject in ascending order of the course counts.
[ "SELECT", "T1.subject_id", ",", "T2.subject_name", ",", "COUNT", "(", "*", ")", "FROM", "Courses", "AS", "T1", "JOIN", "Subjects", "AS", "T2", "ON", "T1.subject_id", "=", "T2.subject_id", "GROUP", "BY", "T1.subject_id", "ORDER", "BY", "COUNT", "(", "*", ")", "ASC" ]
[ "select", "t1", ".", "subject_id", ",", "t2", ".", "subject_name", ",", "count", "(", "*", ")", "from", "courses", "as", "t1", "join", "subjects", "as", "t2", "on", "t1", ".", "subject_id", "=", "t2", ".", "subject_id", "group", "by", "t1", ".", "subject_id", "order", "by", "count", "(", "*", ")", "asc" ]
[ "List", "the", "subject", "ID", ",", "name", "of", "subject", "and", "the", "number", "of", "courses", "available", "for", "each", "subject", "in", "ascending", "order", "of", "the", "course", "counts", "." ]
e_learning
SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "Spanish"
What is the date of enrollment of the course named "Spanish"?
[ "SELECT", "T2.date_of_enrolment", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Course_Enrolment", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "WHERE", "T1.course_name", "=", "``", "Spanish", "''" ]
[ "select", "t2", ".", "date_of_enrolment", "from", "courses", "as", "t1", "join", "student_course_enrolment", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "where", "t1", ".", "course_name", "=", "value" ]
[ "What", "is", "the", "date", "of", "enrollment", "of", "the", "course", "named", "``", "Spanish", "''", "?" ]
e_learning
SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "Spanish"
Find the the date of enrollment of the "Spanish" course.
[ "SELECT", "T2.date_of_enrolment", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Course_Enrolment", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "WHERE", "T1.course_name", "=", "``", "Spanish", "''" ]
[ "select", "t2", ".", "date_of_enrolment", "from", "courses", "as", "t1", "join", "student_course_enrolment", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "where", "t1", ".", "course_name", "=", "value" ]
[ "Find", "the", "the", "date", "of", "enrollment", "of", "the", "``", "Spanish", "''", "course", "." ]
e_learning
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1
What is the name of the course that has the most student enrollment?
[ "SELECT", "T1.course_name", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Course_Enrolment", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_name", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "course_name", "from", "courses", "as", "t1", "join", "student_course_enrolment", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "What", "is", "the", "name", "of", "the", "course", "that", "has", "the", "most", "student", "enrollment", "?" ]
e_learning
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1
Which course is enrolled in by the most students? Give me the course name.
[ "SELECT", "T1.course_name", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Course_Enrolment", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_name", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "course_name", "from", "courses", "as", "t1", "join", "student_course_enrolment", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_name", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Which", "course", "is", "enrolled", "in", "by", "the", "most", "students", "?", "Give", "me", "the", "course", "name", "." ]
e_learning
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1
What are the names of the courses that have exactly 1 student enrollment?
[ "SELECT", "T1.course_name", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Course_Enrolment", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_name", "HAVING", "COUNT", "(", "*", ")", "=", "1" ]
[ "select", "t1", ".", "course_name", "from", "courses", "as", "t1", "join", "student_course_enrolment", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_name", "having", "count", "(", "*", ")", "=", "value" ]
[ "What", "are", "the", "names", "of", "the", "courses", "that", "have", "exactly", "1", "student", "enrollment", "?" ]
e_learning
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1
Find the names of the courses that have just one student enrollment.
[ "SELECT", "T1.course_name", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Course_Enrolment", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_name", "HAVING", "COUNT", "(", "*", ")", "=", "1" ]
[ "select", "t1", ".", "course_name", "from", "courses", "as", "t1", "join", "student_course_enrolment", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_name", "having", "count", "(", "*", ")", "=", "value" ]
[ "Find", "the", "names", "of", "the", "courses", "that", "have", "just", "one", "student", "enrollment", "." ]
e_learning
SELECT T1.course_description , T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2
What are the descriptions and names of the courses that have student enrollment bigger than 2?
[ "SELECT", "T1.course_description", ",", "T1.course_name", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Course_Enrolment", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_name", "HAVING", "COUNT", "(", "*", ")", ">", "2" ]
[ "select", "t1", ".", "course_description", ",", "t1", ".", "course_name", "from", "courses", "as", "t1", "join", "student_course_enrolment", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_name", "having", "count", "(", "*", ")", ">", "value" ]
[ "What", "are", "the", "descriptions", "and", "names", "of", "the", "courses", "that", "have", "student", "enrollment", "bigger", "than", "2", "?" ]
e_learning
SELECT T1.course_description , T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2
Return the descriptions and names of the courses that have more than two students enrolled in.
[ "SELECT", "T1.course_description", ",", "T1.course_name", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Course_Enrolment", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_name", "HAVING", "COUNT", "(", "*", ")", ">", "2" ]
[ "select", "t1", ".", "course_description", ",", "t1", ".", "course_name", "from", "courses", "as", "t1", "join", "student_course_enrolment", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_name", "having", "count", "(", "*", ")", ">", "value" ]
[ "Return", "the", "descriptions", "and", "names", "of", "the", "courses", "that", "have", "more", "than", "two", "students", "enrolled", "in", "." ]
e_learning
SELECT T1.course_name , COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name
What is the name of each course and the corresponding number of student enrollment?
[ "SELECT", "T1.course_name", ",", "COUNT", "(", "*", ")", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Course_Enrolment", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_name" ]
[ "select", "t1", ".", "course_name", ",", "count", "(", "*", ")", "from", "courses", "as", "t1", "join", "student_course_enrolment", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_name" ]
[ "What", "is", "the", "name", "of", "each", "course", "and", "the", "corresponding", "number", "of", "student", "enrollment", "?" ]
e_learning
SELECT T1.course_name , COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name
List the name and the number of enrolled student for each course.
[ "SELECT", "T1.course_name", ",", "COUNT", "(", "*", ")", "FROM", "Courses", "AS", "T1", "JOIN", "Student_Course_Enrolment", "AS", "T2", "ON", "T1.course_id", "=", "T2.course_id", "GROUP", "BY", "T1.course_name" ]
[ "select", "t1", ".", "course_name", ",", "count", "(", "*", ")", "from", "courses", "as", "t1", "join", "student_course_enrolment", "as", "t2", "on", "t1", ".", "course_id", "=", "t2", ".", "course_id", "group", "by", "t1", ".", "course_name" ]
[ "List", "the", "name", "and", "the", "number", "of", "enrolled", "student", "for", "each", "course", "." ]
e_learning
SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass"
What are the enrollment dates of all the tests that have result "Pass"?
[ "SELECT", "T1.date_of_enrolment", "FROM", "Student_Course_Enrolment", "AS", "T1", "JOIN", "Student_Tests_Taken", "AS", "T2", "ON", "T1.registration_id", "=", "T2.registration_id", "WHERE", "T2.test_result", "=", "``", "Pass", "''" ]
[ "select", "t1", ".", "date_of_enrolment", "from", "student_course_enrolment", "as", "t1", "join", "student_tests_taken", "as", "t2", "on", "t1", ".", "registration_id", "=", "t2", ".", "registration_id", "where", "t2", ".", "test_result", "=", "value" ]
[ "What", "are", "the", "enrollment", "dates", "of", "all", "the", "tests", "that", "have", "result", "``", "Pass", "''", "?" ]
e_learning
SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass"
Find the enrollment date for all the tests that have "Pass" result.
[ "SELECT", "T1.date_of_enrolment", "FROM", "Student_Course_Enrolment", "AS", "T1", "JOIN", "Student_Tests_Taken", "AS", "T2", "ON", "T1.registration_id", "=", "T2.registration_id", "WHERE", "T2.test_result", "=", "``", "Pass", "''" ]
[ "select", "t1", ".", "date_of_enrolment", "from", "student_course_enrolment", "as", "t1", "join", "student_tests_taken", "as", "t2", "on", "t1", ".", "registration_id", "=", "t2", ".", "registration_id", "where", "t2", ".", "test_result", "=", "value" ]
[ "Find", "the", "enrollment", "date", "for", "all", "the", "tests", "that", "have", "``", "Pass", "''", "result", "." ]
e_learning
SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail"
What are the completion dates of all the tests that have result "Fail"?
[ "SELECT", "T1.date_of_completion", "FROM", "Student_Course_Enrolment", "AS", "T1", "JOIN", "Student_Tests_Taken", "AS", "T2", "ON", "T1.registration_id", "=", "T2.registration_id", "WHERE", "T2.test_result", "=", "``", "Fail", "''" ]
[ "select", "t1", ".", "date_of_completion", "from", "student_course_enrolment", "as", "t1", "join", "student_tests_taken", "as", "t2", "on", "t1", ".", "registration_id", "=", "t2", ".", "registration_id", "where", "t2", ".", "test_result", "=", "value" ]
[ "What", "are", "the", "completion", "dates", "of", "all", "the", "tests", "that", "have", "result", "``", "Fail", "''", "?" ]
e_learning
SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail"
Return the completion date for all the tests that have "Fail" result.
[ "SELECT", "T1.date_of_completion", "FROM", "Student_Course_Enrolment", "AS", "T1", "JOIN", "Student_Tests_Taken", "AS", "T2", "ON", "T1.registration_id", "=", "T2.registration_id", "WHERE", "T2.test_result", "=", "``", "Fail", "''" ]
[ "select", "t1", ".", "date_of_completion", "from", "student_course_enrolment", "as", "t1", "join", "student_tests_taken", "as", "t2", "on", "t1", ".", "registration_id", "=", "t2", ".", "registration_id", "where", "t2", ".", "test_result", "=", "value" ]
[ "Return", "the", "completion", "date", "for", "all", "the", "tests", "that", "have", "``", "Fail", "''", "result", "." ]
e_learning
SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = "Karson"
List the dates of enrollment and completion of the student with personal name "Karson".
[ "SELECT", "T1.date_of_enrolment", ",", "T1.date_of_completion", "FROM", "Student_Course_Enrolment", "AS", "T1", "JOIN", "Students", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "WHERE", "T2.personal_name", "=", "``", "Karson", "''" ]
[ "select", "t1", ".", "date_of_enrolment", ",", "t1", ".", "date_of_completion", "from", "student_course_enrolment", "as", "t1", "join", "students", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "where", "t2", ".", "personal_name", "=", "value" ]
[ "List", "the", "dates", "of", "enrollment", "and", "completion", "of", "the", "student", "with", "personal", "name", "``", "Karson", "''", "." ]
e_learning
SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = "Karson"
On what dates did the student whose personal name is "Karson" enroll in and complete the courses?
[ "SELECT", "T1.date_of_enrolment", ",", "T1.date_of_completion", "FROM", "Student_Course_Enrolment", "AS", "T1", "JOIN", "Students", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "WHERE", "T2.personal_name", "=", "``", "Karson", "''" ]
[ "select", "t1", ".", "date_of_enrolment", ",", "t1", ".", "date_of_completion", "from", "student_course_enrolment", "as", "t1", "join", "students", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "where", "t2", ".", "personal_name", "=", "value" ]
[ "On", "what", "dates", "did", "the", "student", "whose", "personal", "name", "is", "``", "Karson", "''", "enroll", "in", "and", "complete", "the", "courses", "?" ]
e_learning
SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = "Zieme" AND T2.personal_name = "Bernie"
List the dates of enrollment and completion of the student with family name "Zieme" and personal name "Bernie".
[ "SELECT", "T1.date_of_enrolment", ",", "T1.date_of_completion", "FROM", "Student_Course_Enrolment", "AS", "T1", "JOIN", "Students", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "WHERE", "T2.family_name", "=", "``", "Zieme", "''", "AND", "T2.personal_name", "=", "``", "Bernie", "''" ]
[ "select", "t1", ".", "date_of_enrolment", ",", "t1", ".", "date_of_completion", "from", "student_course_enrolment", "as", "t1", "join", "students", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "where", "t2", ".", "family_name", "=", "value", "and", "t2", ".", "personal_name", "=", "value" ]
[ "List", "the", "dates", "of", "enrollment", "and", "completion", "of", "the", "student", "with", "family", "name", "``", "Zieme", "''", "and", "personal", "name", "``", "Bernie", "''", "." ]
e_learning
SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = "Zieme" AND T2.personal_name = "Bernie"
On what dates did the student with family name "Zieme" and personal name "Bernie" enroll in and complete the courses?
[ "SELECT", "T1.date_of_enrolment", ",", "T1.date_of_completion", "FROM", "Student_Course_Enrolment", "AS", "T1", "JOIN", "Students", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "WHERE", "T2.family_name", "=", "``", "Zieme", "''", "AND", "T2.personal_name", "=", "``", "Bernie", "''" ]
[ "select", "t1", ".", "date_of_enrolment", ",", "t1", ".", "date_of_completion", "from", "student_course_enrolment", "as", "t1", "join", "students", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "where", "t2", ".", "family_name", "=", "value", "and", "t2", ".", "personal_name", "=", "value" ]
[ "On", "what", "dates", "did", "the", "student", "with", "family", "name", "``", "Zieme", "''", "and", "personal", "name", "``", "Bernie", "''", "enroll", "in", "and", "complete", "the", "courses", "?" ]
e_learning
SELECT T1.student_id , T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
Find the student ID and login name of the student with the most course enrollments
[ "SELECT", "T1.student_id", ",", "T2.login_name", "FROM", "Student_Course_Enrolment", "AS", "T1", "JOIN", "Students", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "student_id", ",", "t2", ".", "login_name", "from", "student_course_enrolment", "as", "t1", "join", "students", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Find", "the", "student", "ID", "and", "login", "name", "of", "the", "student", "with", "the", "most", "course", "enrollments" ]
e_learning
SELECT T1.student_id , T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
What are the student ID and login name of the student who are enrolled in the most courses?
[ "SELECT", "T1.student_id", ",", "T2.login_name", "FROM", "Student_Course_Enrolment", "AS", "T1", "JOIN", "Students", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "student_id", ",", "t2", ".", "login_name", "from", "student_course_enrolment", "as", "t1", "join", "students", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "What", "are", "the", "student", "ID", "and", "login", "name", "of", "the", "student", "who", "are", "enrolled", "in", "the", "most", "courses", "?" ]
e_learning
SELECT T1.student_id , T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2
Find the student ID and personal name of the student with at least two enrollments.
[ "SELECT", "T1.student_id", ",", "T2.personal_name", "FROM", "Student_Course_Enrolment", "AS", "T1", "JOIN", "Students", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "GROUP", "BY", "T1.student_id", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ]
[ "select", "t1", ".", "student_id", ",", "t2", ".", "personal_name", "from", "student_course_enrolment", "as", "t1", "join", "students", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "Find", "the", "student", "ID", "and", "personal", "name", "of", "the", "student", "with", "at", "least", "two", "enrollments", "." ]
e_learning
SELECT T1.student_id , T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2
Which student are enrolled in at least two courses? Give me the student ID and personal name.
[ "SELECT", "T1.student_id", ",", "T2.personal_name", "FROM", "Student_Course_Enrolment", "AS", "T1", "JOIN", "Students", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "GROUP", "BY", "T1.student_id", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ]
[ "select", "t1", ".", "student_id", ",", "t2", ".", "personal_name", "from", "student_course_enrolment", "as", "t1", "join", "students", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "Which", "student", "are", "enrolled", "in", "at", "least", "two", "courses", "?", "Give", "me", "the", "student", "ID", "and", "personal", "name", "." ]
e_learning
SELECT T1.student_id , T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2
Find the student ID and middle name for all the students with at most two enrollments.
[ "SELECT", "T1.student_id", ",", "T2.middle_name", "FROM", "Student_Course_Enrolment", "AS", "T1", "JOIN", "Students", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "GROUP", "BY", "T1.student_id", "HAVING", "COUNT", "(", "*", ")", "<", "=", "2" ]
[ "select", "t1", ".", "student_id", ",", "t2", ".", "middle_name", "from", "student_course_enrolment", "as", "t1", "join", "students", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", "<", "=", "value" ]
[ "Find", "the", "student", "ID", "and", "middle", "name", "for", "all", "the", "students", "with", "at", "most", "two", "enrollments", "." ]
e_learning
SELECT T1.student_id , T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2
What are the student IDs and middle names of the students enrolled in at most two courses?
[ "SELECT", "T1.student_id", ",", "T2.middle_name", "FROM", "Student_Course_Enrolment", "AS", "T1", "JOIN", "Students", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id", "GROUP", "BY", "T1.student_id", "HAVING", "COUNT", "(", "*", ")", "<", "=", "2" ]
[ "select", "t1", ".", "student_id", ",", "t2", ".", "middle_name", "from", "student_course_enrolment", "as", "t1", "join", "students", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", "<", "=", "value" ]
[ "What", "are", "the", "student", "IDs", "and", "middle", "names", "of", "the", "students", "enrolled", "in", "at", "most", "two", "courses", "?" ]
e_learning
SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id
Find the personal names of students not enrolled in any course.
[ "SELECT", "personal_name", "FROM", "Students", "EXCEPT", "SELECT", "T1.personal_name", "FROM", "Students", "AS", "T1", "JOIN", "Student_Course_Enrolment", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id" ]
[ "select", "personal_name", "from", "students", "except", "select", "t1", ".", "personal_name", "from", "students", "as", "t1", "join", "student_course_enrolment", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id" ]
[ "Find", "the", "personal", "names", "of", "students", "not", "enrolled", "in", "any", "course", "." ]
e_learning
SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id
Which students not enrolled in any course? Find their personal names.
[ "SELECT", "personal_name", "FROM", "Students", "EXCEPT", "SELECT", "T1.personal_name", "FROM", "Students", "AS", "T1", "JOIN", "Student_Course_Enrolment", "AS", "T2", "ON", "T1.student_id", "=", "T2.student_id" ]
[ "select", "personal_name", "from", "students", "except", "select", "t1", ".", "personal_name", "from", "students", "as", "t1", "join", "student_course_enrolment", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "student_id" ]
[ "Which", "students", "not", "enrolled", "in", "any", "course", "?", "Find", "their", "personal", "names", "." ]
e_learning
SELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)
How many students did not have any course enrollment?
[ "SELECT", "count", "(", "*", ")", "FROM", "Students", "WHERE", "student_id", "NOT", "IN", "(", "SELECT", "student_id", "FROM", "Student_Course_Enrolment", ")" ]
[ "select", "count", "(", "*", ")", "from", "students", "where", "student_id", "not", "in", "(", "select", "student_id", "from", "student_course_enrolment", ")" ]
[ "How", "many", "students", "did", "not", "have", "any", "course", "enrollment", "?" ]
e_learning
SELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)
Count the number of students who did not enroll in any course.
[ "SELECT", "count", "(", "*", ")", "FROM", "Students", "WHERE", "student_id", "NOT", "IN", "(", "SELECT", "student_id", "FROM", "Student_Course_Enrolment", ")" ]
[ "select", "count", "(", "*", ")", "from", "students", "where", "student_id", "not", "in", "(", "select", "student_id", "from", "student_course_enrolment", ")" ]
[ "Count", "the", "number", "of", "students", "who", "did", "not", "enroll", "in", "any", "course", "." ]
e_learning
SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students
Find the common login name of course authors and students.
[ "SELECT", "login_name", "FROM", "Course_Authors_and_Tutors", "INTERSECT", "SELECT", "login_name", "FROM", "Students" ]
[ "select", "login_name", "from", "course_authors_and_tutors", "intersect", "select", "login_name", "from", "students" ]
[ "Find", "the", "common", "login", "name", "of", "course", "authors", "and", "students", "." ]
e_learning
SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students
What are the login names used both by some course authors and some students?
[ "SELECT", "login_name", "FROM", "Course_Authors_and_Tutors", "INTERSECT", "SELECT", "login_name", "FROM", "Students" ]
[ "select", "login_name", "from", "course_authors_and_tutors", "intersect", "select", "login_name", "from", "students" ]
[ "What", "are", "the", "login", "names", "used", "both", "by", "some", "course", "authors", "and", "some", "students", "?" ]
e_learning
SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students
Find the common personal name of course authors and students.
[ "SELECT", "personal_name", "FROM", "Course_Authors_and_Tutors", "INTERSECT", "SELECT", "personal_name", "FROM", "Students" ]
[ "select", "personal_name", "from", "course_authors_and_tutors", "intersect", "select", "personal_name", "from", "students" ]
[ "Find", "the", "common", "personal", "name", "of", "course", "authors", "and", "students", "." ]
e_learning
SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students
What are the personal names used both by some course authors and some students?
[ "SELECT", "personal_name", "FROM", "Course_Authors_and_Tutors", "INTERSECT", "SELECT", "personal_name", "FROM", "Students" ]
[ "select", "personal_name", "from", "course_authors_and_tutors", "intersect", "select", "personal_name", "from", "students" ]
[ "What", "are", "the", "personal", "names", "used", "both", "by", "some", "course", "authors", "and", "some", "students", "?" ]
insurance_policies
SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING count(*) > 2 UNION SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = ( SELECT max(Amount_Claimed) FROM Claims )
Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id.
[ "SELECT", "T1.Date_Claim_Made", ",", "T1.Claim_id", "FROM", "Claims", "AS", "T1", "JOIN", "Settlements", "AS", "T2", "ON", "T1.Claim_id", "=", "T2.Claim_id", "GROUP", "BY", "T1.Claim_id", "HAVING", "count", "(", "*", ")", ">", "2", "UNION", "SELECT", "T1.Date_Claim_Made", ",", "T1.Claim_id", "FROM", "Claims", "AS", "T1", "JOIN", "Settlements", "AS", "T2", "ON", "T1.Claim_id", "=", "T2.Claim_id", "WHERE", "T1.Amount_Claimed", "=", "(", "SELECT", "max", "(", "Amount_Claimed", ")", "FROM", "Claims", ")" ]
[ "select", "t1", ".", "date_claim_made", ",", "t1", ".", "claim_id", "from", "claims", "as", "t1", "join", "settlements", "as", "t2", "on", "t1", ".", "claim_id", "=", "t2", ".", "claim_id", "group", "by", "t1", ".", "claim_id", "having", "count", "(", "*", ")", ">", "value", "union", "select", "t1", ".", "date_claim_made", ",", "t1", ".", "claim_id", "from", "claims", "as", "t1", "join", "settlements", "as", "t2", "on", "t1", ".", "claim_id", "=", "t2", ".", "claim_id", "where", "t1", ".", "amount_claimed", "=", "(", "select", "max", "(", "amount_claimed", ")", "from", "claims", ")" ]
[ "Which", "claims", "caused", "more", "than", "2", "settlements", "or", "have", "the", "maximum", "claim", "value", "?", "List", "the", "date", "the", "claim", "was", "made", "and", "the", "claim", "id", "." ]
insurance_policies
SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING count(*) > 2 UNION SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = ( SELECT max(Amount_Claimed) FROM Claims )
Find the claims that led to more than two settlements or have the maximum claim value. For each of them, return the date the claim was made and the id of the claim.
[ "SELECT", "T1.Date_Claim_Made", ",", "T1.Claim_id", "FROM", "Claims", "AS", "T1", "JOIN", "Settlements", "AS", "T2", "ON", "T1.Claim_id", "=", "T2.Claim_id", "GROUP", "BY", "T1.Claim_id", "HAVING", "count", "(", "*", ")", ">", "2", "UNION", "SELECT", "T1.Date_Claim_Made", ",", "T1.Claim_id", "FROM", "Claims", "AS", "T1", "JOIN", "Settlements", "AS", "T2", "ON", "T1.Claim_id", "=", "T2.Claim_id", "WHERE", "T1.Amount_Claimed", "=", "(", "SELECT", "max", "(", "Amount_Claimed", ")", "FROM", "Claims", ")" ]
[ "select", "t1", ".", "date_claim_made", ",", "t1", ".", "claim_id", "from", "claims", "as", "t1", "join", "settlements", "as", "t2", "on", "t1", ".", "claim_id", "=", "t2", ".", "claim_id", "group", "by", "t1", ".", "claim_id", "having", "count", "(", "*", ")", ">", "value", "union", "select", "t1", ".", "date_claim_made", ",", "t1", ".", "claim_id", "from", "claims", "as", "t1", "join", "settlements", "as", "t2", "on", "t1", ".", "claim_id", "=", "t2", ".", "claim_id", "where", "t1", ".", "amount_claimed", "=", "(", "select", "max", "(", "amount_claimed", ")", "from", "claims", ")" ]
[ "Find", "the", "claims", "that", "led", "to", "more", "than", "two", "settlements", "or", "have", "the", "maximum", "claim", "value", ".", "For", "each", "of", "them", ",", "return", "the", "date", "the", "claim", "was", "made", "and", "the", "id", "of", "the", "claim", "." ]
insurance_policies
SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2 EXCEPT SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JOIN Claims AS T3 ON T2.policy_id = T3.policy_id
Which customer had at least 2 policies but did not file any claims? List the customer details and id.
[ "SELECT", "T1.customer_details", ",", "T1.customer_id", "FROM", "Customers", "AS", "T1", "JOIN", "Customer_Policies", "AS", "T2", "ON", "T1.Customer_id", "=", "T2.customer_id", "GROUP", "BY", "T1.customer_id", "HAVING", "count", "(", "*", ")", ">", "=", "2", "EXCEPT", "SELECT", "T1.customer_details", ",", "T1.customer_id", "FROM", "Customers", "AS", "T1", "JOIN", "Customer_Policies", "AS", "T2", "ON", "T1.Customer_id", "=", "T2.customer_id", "JOIN", "Claims", "AS", "T3", "ON", "T2.policy_id", "=", "T3.policy_id" ]
[ "select", "t1", ".", "customer_details", ",", "t1", ".", "customer_id", "from", "customers", "as", "t1", "join", "customer_policies", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id", "group", "by", "t1", ".", "customer_id", "having", "count", "(", "*", ")", ">", "=", "value", "except", "select", "t1", ".", "customer_details", ",", "t1", ".", "customer_id", "from", "customers", "as", "t1", "join", "customer_policies", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id", "join", "claims", "as", "t3", "on", "t2", ".", "policy_id", "=", "t3", ".", "policy_id" ]
[ "Which", "customer", "had", "at", "least", "2", "policies", "but", "did", "not", "file", "any", "claims", "?", "List", "the", "customer", "details", "and", "id", "." ]
insurance_policies
SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2 EXCEPT SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JOIN Claims AS T3 ON T2.policy_id = T3.policy_id
Give me the the customer details and id for the customers who had two or more policies but did not file any claims.
[ "SELECT", "T1.customer_details", ",", "T1.customer_id", "FROM", "Customers", "AS", "T1", "JOIN", "Customer_Policies", "AS", "T2", "ON", "T1.Customer_id", "=", "T2.customer_id", "GROUP", "BY", "T1.customer_id", "HAVING", "count", "(", "*", ")", ">", "=", "2", "EXCEPT", "SELECT", "T1.customer_details", ",", "T1.customer_id", "FROM", "Customers", "AS", "T1", "JOIN", "Customer_Policies", "AS", "T2", "ON", "T1.Customer_id", "=", "T2.customer_id", "JOIN", "Claims", "AS", "T3", "ON", "T2.policy_id", "=", "T3.policy_id" ]
[ "select", "t1", ".", "customer_details", ",", "t1", ".", "customer_id", "from", "customers", "as", "t1", "join", "customer_policies", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id", "group", "by", "t1", ".", "customer_id", "having", "count", "(", "*", ")", ">", "=", "value", "except", "select", "t1", ".", "customer_details", ",", "t1", ".", "customer_id", "from", "customers", "as", "t1", "join", "customer_policies", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id", "join", "claims", "as", "t3", "on", "t2", ".", "policy_id", "=", "t3", ".", "policy_id" ]
[ "Give", "me", "the", "the", "customer", "details", "and", "id", "for", "the", "customers", "who", "had", "two", "or", "more", "policies", "but", "did", "not", "file", "any", "claims", "." ]
insurance_policies
SELECT Payment_Method_Code , Date_Payment_Made , Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC
List the method, date and amount of all the payments, in ascending order of date.
[ "SELECT", "Payment_Method_Code", ",", "Date_Payment_Made", ",", "Amount_Payment", "FROM", "Payments", "ORDER", "BY", "Date_Payment_Made", "ASC" ]
[ "select", "payment_method_code", ",", "date_payment_made", ",", "amount_payment", "from", "payments", "order", "by", "date_payment_made", "asc" ]
[ "List", "the", "method", ",", "date", "and", "amount", "of", "all", "the", "payments", ",", "in", "ascending", "order", "of", "date", "." ]
insurance_policies
SELECT Payment_Method_Code , Date_Payment_Made , Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC
What are the method, date and amount of each payment? Sort the list in ascending order of date.
[ "SELECT", "Payment_Method_Code", ",", "Date_Payment_Made", ",", "Amount_Payment", "FROM", "Payments", "ORDER", "BY", "Date_Payment_Made", "ASC" ]
[ "select", "payment_method_code", ",", "date_payment_made", ",", "amount_payment", "from", "payments", "order", "by", "date_payment_made", "asc" ]
[ "What", "are", "the", "method", ",", "date", "and", "amount", "of", "each", "payment", "?", "Sort", "the", "list", "in", "ascending", "order", "of", "date", "." ]
insurance_policies
SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1
Among all the claims, what is the settlement amount of the claim with the largest claim amount? List both the settlement amount and claim amount.
[ "SELECT", "Amount_Settled", ",", "Amount_Claimed", "FROM", "Claims", "ORDER", "BY", "Amount_Claimed", "DESC", "LIMIT", "1" ]
[ "select", "amount_settled", ",", "amount_claimed", "from", "claims", "order", "by", "amount_claimed", "desc", "limit", "value" ]
[ "Among", "all", "the", "claims", ",", "what", "is", "the", "settlement", "amount", "of", "the", "claim", "with", "the", "largest", "claim", "amount", "?", "List", "both", "the", "settlement", "amount", "and", "claim", "amount", "." ]
insurance_policies
SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1
Find the settlement amount of the claim with the largest claim amount. Show both the settlement amount and claim amount.
[ "SELECT", "Amount_Settled", ",", "Amount_Claimed", "FROM", "Claims", "ORDER", "BY", "Amount_Claimed", "DESC", "LIMIT", "1" ]
[ "select", "amount_settled", ",", "amount_claimed", "from", "claims", "order", "by", "amount_claimed", "desc", "limit", "value" ]
[ "Find", "the", "settlement", "amount", "of", "the", "claim", "with", "the", "largest", "claim", "amount", ".", "Show", "both", "the", "settlement", "amount", "and", "claim", "amount", "." ]
insurance_policies
SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC LIMIT 1
Among all the claims, what is the amount claimed in the claim with the least amount settled? List both the settlement amount and claim amount.
[ "SELECT", "Amount_Settled", ",", "Amount_Claimed", "FROM", "Claims", "ORDER", "BY", "Amount_Settled", "ASC", "LIMIT", "1" ]
[ "select", "amount_settled", ",", "amount_claimed", "from", "claims", "order", "by", "amount_settled", "asc", "limit", "value" ]
[ "Among", "all", "the", "claims", ",", "what", "is", "the", "amount", "claimed", "in", "the", "claim", "with", "the", "least", "amount", "settled", "?", "List", "both", "the", "settlement", "amount", "and", "claim", "amount", "." ]
insurance_policies
SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC LIMIT 1
Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount.
[ "SELECT", "Amount_Settled", ",", "Amount_Claimed", "FROM", "Claims", "ORDER", "BY", "Amount_Settled", "ASC", "LIMIT", "1" ]
[ "select", "amount_settled", ",", "amount_claimed", "from", "claims", "order", "by", "amount_settled", "asc", "limit", "value" ]
[ "Find", "the", "claimed", "amount", "in", "the", "claim", "with", "the", "least", "amount", "settled", ".", "Show", "both", "the", "settlement", "amount", "and", "claim", "amount", "." ]
insurance_policies
SELECT Date_Claim_Made , Date_Claim_Settled FROM Claims WHERE Amount_Claimed > ( SELECT avg(Amount_Claimed) FROM Claims )
Among all the claims, which claims have a claimed amount larger than the average? List the date the claim was made and the date it was settled.
[ "SELECT", "Date_Claim_Made", ",", "Date_Claim_Settled", "FROM", "Claims", "WHERE", "Amount_Claimed", ">", "(", "SELECT", "avg", "(", "Amount_Claimed", ")", "FROM", "Claims", ")" ]
[ "select", "date_claim_made", ",", "date_claim_settled", "from", "claims", "where", "amount_claimed", ">", "(", "select", "avg", "(", "amount_claimed", ")", "from", "claims", ")" ]
[ "Among", "all", "the", "claims", ",", "which", "claims", "have", "a", "claimed", "amount", "larger", "than", "the", "average", "?", "List", "the", "date", "the", "claim", "was", "made", "and", "the", "date", "it", "was", "settled", "." ]
insurance_policies
SELECT Date_Claim_Made , Date_Claim_Settled FROM Claims WHERE Amount_Claimed > ( SELECT avg(Amount_Claimed) FROM Claims )
Give me the claim date, settlement date for all the claims whose claimed amount is larger than the average.
[ "SELECT", "Date_Claim_Made", ",", "Date_Claim_Settled", "FROM", "Claims", "WHERE", "Amount_Claimed", ">", "(", "SELECT", "avg", "(", "Amount_Claimed", ")", "FROM", "Claims", ")" ]
[ "select", "date_claim_made", ",", "date_claim_settled", "from", "claims", "where", "amount_claimed", ">", "(", "select", "avg", "(", "amount_claimed", ")", "from", "claims", ")" ]
[ "Give", "me", "the", "claim", "date", ",", "settlement", "date", "for", "all", "the", "claims", "whose", "claimed", "amount", "is", "larger", "than", "the", "average", "." ]
insurance_policies
SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= ( SELECT avg(Amount_Settled) FROM Claims )
Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date.
[ "SELECT", "Date_Claim_Made", "FROM", "Claims", "WHERE", "Amount_Settled", "<", "=", "(", "SELECT", "avg", "(", "Amount_Settled", ")", "FROM", "Claims", ")" ]
[ "select", "date_claim_made", "from", "claims", "where", "amount_settled", "<", "=", "(", "select", "avg", "(", "amount_settled", ")", "from", "claims", ")" ]
[ "Among", "all", "the", "claims", ",", "which", "settlements", "have", "a", "claimed", "amount", "that", "is", "no", "more", "than", "the", "average", "?", "List", "the", "claim", "start", "date", "." ]
insurance_policies
SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= ( SELECT avg(Amount_Settled) FROM Claims )
Return the claim start date for the claims whose claimed amount is no more than the average
[ "SELECT", "Date_Claim_Made", "FROM", "Claims", "WHERE", "Amount_Settled", "<", "=", "(", "SELECT", "avg", "(", "Amount_Settled", ")", "FROM", "Claims", ")" ]
[ "select", "date_claim_made", "from", "claims", "where", "amount_settled", "<", "=", "(", "select", "avg", "(", "amount_settled", ")", "from", "claims", ")" ]
[ "Return", "the", "claim", "start", "date", "for", "the", "claims", "whose", "claimed", "amount", "is", "no", "more", "than", "the", "average" ]
insurance_policies
SELECT T1.Claim_id , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id
How many settlements does each claim correspond to? List the claim id and the number of settlements.
[ "SELECT", "T1.Claim_id", ",", "count", "(", "*", ")", "FROM", "Claims", "AS", "T1", "JOIN", "Settlements", "AS", "T2", "ON", "T1.claim_id", "=", "T2.claim_id", "GROUP", "BY", "T1.claim_id" ]
[ "select", "t1", ".", "claim_id", ",", "count", "(", "*", ")", "from", "claims", "as", "t1", "join", "settlements", "as", "t2", "on", "t1", ".", "claim_id", "=", "t2", ".", "claim_id", "group", "by", "t1", ".", "claim_id" ]
[ "How", "many", "settlements", "does", "each", "claim", "correspond", "to", "?", "List", "the", "claim", "id", "and", "the", "number", "of", "settlements", "." ]
insurance_policies
SELECT T1.Claim_id , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id
Find the number of settlements each claim corresponds to. Show the number together with the claim id.
[ "SELECT", "T1.Claim_id", ",", "count", "(", "*", ")", "FROM", "Claims", "AS", "T1", "JOIN", "Settlements", "AS", "T2", "ON", "T1.claim_id", "=", "T2.claim_id", "GROUP", "BY", "T1.claim_id" ]
[ "select", "t1", ".", "claim_id", ",", "count", "(", "*", ")", "from", "claims", "as", "t1", "join", "settlements", "as", "t2", "on", "t1", ".", "claim_id", "=", "t2", ".", "claim_id", "group", "by", "t1", ".", "claim_id" ]
[ "Find", "the", "number", "of", "settlements", "each", "claim", "corresponds", "to", ".", "Show", "the", "number", "together", "with", "the", "claim", "id", "." ]
insurance_policies
SELECT T1.claim_id , T1.date_claim_made , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY count(*) DESC LIMIT 1
Which claim incurred the most number of settlements? List the claim id, the date the claim was made, and the number.
[ "SELECT", "T1.claim_id", ",", "T1.date_claim_made", ",", "count", "(", "*", ")", "FROM", "Claims", "AS", "T1", "JOIN", "Settlements", "AS", "T2", "ON", "T1.claim_id", "=", "T2.claim_id", "GROUP", "BY", "T1.claim_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "claim_id", ",", "t1", ".", "date_claim_made", ",", "count", "(", "*", ")", "from", "claims", "as", "t1", "join", "settlements", "as", "t2", "on", "t1", ".", "claim_id", "=", "t2", ".", "claim_id", "group", "by", "t1", ".", "claim_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Which", "claim", "incurred", "the", "most", "number", "of", "settlements", "?", "List", "the", "claim", "id", ",", "the", "date", "the", "claim", "was", "made", ",", "and", "the", "number", "." ]
insurance_policies
SELECT T1.claim_id , T1.date_claim_made , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY count(*) DESC LIMIT 1
Find the claim id and claim date of the claim that incurred the most settlement count. Also tell me the count.
[ "SELECT", "T1.claim_id", ",", "T1.date_claim_made", ",", "count", "(", "*", ")", "FROM", "Claims", "AS", "T1", "JOIN", "Settlements", "AS", "T2", "ON", "T1.claim_id", "=", "T2.claim_id", "GROUP", "BY", "T1.claim_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "claim_id", ",", "t1", ".", "date_claim_made", ",", "count", "(", "*", ")", "from", "claims", "as", "t1", "join", "settlements", "as", "t2", "on", "t1", ".", "claim_id", "=", "t2", ".", "claim_id", "group", "by", "t1", ".", "claim_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Find", "the", "claim", "id", "and", "claim", "date", "of", "the", "claim", "that", "incurred", "the", "most", "settlement", "count", ".", "Also", "tell", "me", "the", "count", "." ]
insurance_policies
SELECT count(*) , T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled DESC LIMIT 1
How many settlements were made on the claim with the most recent claim settlement date? List the number and the claim id.
[ "SELECT", "count", "(", "*", ")", ",", "T1.claim_id", "FROM", "Claims", "AS", "T1", "JOIN", "Settlements", "AS", "T2", "ON", "T1.claim_id", "=", "T2.claim_id", "GROUP", "BY", "T1.claim_id", "ORDER", "BY", "T1.Date_Claim_Settled", "DESC", "LIMIT", "1" ]
[ "select", "count", "(", "*", ")", ",", "t1", ".", "claim_id", "from", "claims", "as", "t1", "join", "settlements", "as", "t2", "on", "t1", ".", "claim_id", "=", "t2", ".", "claim_id", "group", "by", "t1", ".", "claim_id", "order", "by", "t1", ".", "date_claim_settled", "desc", "limit", "value" ]
[ "How", "many", "settlements", "were", "made", "on", "the", "claim", "with", "the", "most", "recent", "claim", "settlement", "date", "?", "List", "the", "number", "and", "the", "claim", "id", "." ]
insurance_policies
SELECT count(*) , T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled DESC LIMIT 1
Find the claim id and the number of settlements made for the claim with the most recent settlement date.
[ "SELECT", "count", "(", "*", ")", ",", "T1.claim_id", "FROM", "Claims", "AS", "T1", "JOIN", "Settlements", "AS", "T2", "ON", "T1.claim_id", "=", "T2.claim_id", "GROUP", "BY", "T1.claim_id", "ORDER", "BY", "T1.Date_Claim_Settled", "DESC", "LIMIT", "1" ]
[ "select", "count", "(", "*", ")", ",", "t1", ".", "claim_id", "from", "claims", "as", "t1", "join", "settlements", "as", "t2", "on", "t1", ".", "claim_id", "=", "t2", ".", "claim_id", "group", "by", "t1", ".", "claim_id", "order", "by", "t1", ".", "date_claim_settled", "desc", "limit", "value" ]
[ "Find", "the", "claim", "id", "and", "the", "number", "of", "settlements", "made", "for", "the", "claim", "with", "the", "most", "recent", "settlement", "date", "." ]
insurance_policies
SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1
Of all the claims, what was the earliest date when any claim was made?
[ "SELECT", "Date_Claim_Made", "FROM", "Claims", "ORDER", "BY", "Date_Claim_Made", "ASC", "LIMIT", "1" ]
[ "select", "date_claim_made", "from", "claims", "order", "by", "date_claim_made", "asc", "limit", "value" ]
[ "Of", "all", "the", "claims", ",", "what", "was", "the", "earliest", "date", "when", "any", "claim", "was", "made", "?" ]
insurance_policies
SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1
Tell me the the date when the first claim was made.
[ "SELECT", "Date_Claim_Made", "FROM", "Claims", "ORDER", "BY", "Date_Claim_Made", "ASC", "LIMIT", "1" ]
[ "select", "date_claim_made", "from", "claims", "order", "by", "date_claim_made", "asc", "limit", "value" ]
[ "Tell", "me", "the", "the", "date", "when", "the", "first", "claim", "was", "made", "." ]
insurance_policies
SELECT sum(Amount_Settled) FROM Settlements
What is the total amount of settlement made for all the settlements?
[ "SELECT", "sum", "(", "Amount_Settled", ")", "FROM", "Settlements" ]
[ "select", "sum", "(", "amount_settled", ")", "from", "settlements" ]
[ "What", "is", "the", "total", "amount", "of", "settlement", "made", "for", "all", "the", "settlements", "?" ]
insurance_policies
SELECT sum(Amount_Settled) FROM Settlements
Compute the total amount of settlement across all the settlements.
[ "SELECT", "sum", "(", "Amount_Settled", ")", "FROM", "Settlements" ]
[ "select", "sum", "(", "amount_settled", ")", "from", "settlements" ]
[ "Compute", "the", "total", "amount", "of", "settlement", "across", "all", "the", "settlements", "." ]
insurance_policies
SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING count(*) > 1
Who are the customers that had more than 1 policy? List the customer details and id.
[ "SELECT", "T1.customer_details", ",", "T1.customer_id", "FROM", "Customers", "AS", "T1", "JOIN", "Customer_Policies", "AS", "T2", "ON", "T1.Customer_id", "=", "T2.Customer_id", "GROUP", "BY", "T1.customer_id", "HAVING", "count", "(", "*", ")", ">", "1" ]
[ "select", "t1", ".", "customer_details", ",", "t1", ".", "customer_id", "from", "customers", "as", "t1", "join", "customer_policies", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id", "group", "by", "t1", ".", "customer_id", "having", "count", "(", "*", ")", ">", "value" ]
[ "Who", "are", "the", "customers", "that", "had", "more", "than", "1", "policy", "?", "List", "the", "customer", "details", "and", "id", "." ]
insurance_policies
SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING count(*) > 1
Find the the customer details and id for the customers who had more than one policy.
[ "SELECT", "T1.customer_details", ",", "T1.customer_id", "FROM", "Customers", "AS", "T1", "JOIN", "Customer_Policies", "AS", "T2", "ON", "T1.Customer_id", "=", "T2.Customer_id", "GROUP", "BY", "T1.customer_id", "HAVING", "count", "(", "*", ")", ">", "1" ]
[ "select", "t1", ".", "customer_details", ",", "t1", ".", "customer_id", "from", "customers", "as", "t1", "join", "customer_policies", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id", "group", "by", "t1", ".", "customer_id", "having", "count", "(", "*", ")", ">", "value" ]
[ "Find", "the", "the", "customer", "details", "and", "id", "for", "the", "customers", "who", "had", "more", "than", "one", "policy", "." ]
insurance_policies
SELECT Date_Claim_Made , Date_Claim_Settled FROM Settlements
What are the claim dates and settlement dates of all the settlements?
[ "SELECT", "Date_Claim_Made", ",", "Date_Claim_Settled", "FROM", "Settlements" ]
[ "select", "date_claim_made", ",", "date_claim_settled", "from", "settlements" ]
[ "What", "are", "the", "claim", "dates", "and", "settlement", "dates", "of", "all", "the", "settlements", "?" ]
insurance_policies
SELECT Date_Claim_Made , Date_Claim_Settled FROM Settlements
Tell me the the claim date and settlement date for each settlement case.
[ "SELECT", "Date_Claim_Made", ",", "Date_Claim_Settled", "FROM", "Settlements" ]
[ "select", "date_claim_made", ",", "date_claim_settled", "from", "settlements" ]
[ "Tell", "me", "the", "the", "claim", "date", "and", "settlement", "date", "for", "each", "settlement", "case", "." ]
insurance_policies
SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) DESC LIMIT 1
What is the most popular payment method?
[ "SELECT", "Payment_Method_Code", "FROM", "Payments", "GROUP", "BY", "Payment_Method_Code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "payment_method_code", "from", "payments", "group", "by", "payment_method_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "What", "is", "the", "most", "popular", "payment", "method", "?" ]
insurance_policies
SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) DESC LIMIT 1
Which payment method is used the most often?
[ "SELECT", "Payment_Method_Code", "FROM", "Payments", "GROUP", "BY", "Payment_Method_Code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "payment_method_code", "from", "payments", "group", "by", "payment_method_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Which", "payment", "method", "is", "used", "the", "most", "often", "?" ]
insurance_policies
SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) ASC LIMIT 1
With which kind of payment method were the least number of payments processed?
[ "SELECT", "Payment_Method_Code", "FROM", "Payments", "GROUP", "BY", "Payment_Method_Code", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ]
[ "select", "payment_method_code", "from", "payments", "group", "by", "payment_method_code", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ]
[ "With", "which", "kind", "of", "payment", "method", "were", "the", "least", "number", "of", "payments", "processed", "?" ]
insurance_policies
SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) ASC LIMIT 1
What is the payment method that were used the least often?
[ "SELECT", "Payment_Method_Code", "FROM", "Payments", "GROUP", "BY", "Payment_Method_Code", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ]
[ "select", "payment_method_code", "from", "payments", "group", "by", "payment_method_code", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ]
[ "What", "is", "the", "payment", "method", "that", "were", "used", "the", "least", "often", "?" ]
insurance_policies
SELECT sum(Amount_Payment) FROM Payments
What is the total amount of payment?
[ "SELECT", "sum", "(", "Amount_Payment", ")", "FROM", "Payments" ]
[ "select", "sum", "(", "amount_payment", ")", "from", "payments" ]
[ "What", "is", "the", "total", "amount", "of", "payment", "?" ]
insurance_policies
SELECT sum(Amount_Payment) FROM Payments
Compute the total amount of payment processed.
[ "SELECT", "sum", "(", "Amount_Payment", ")", "FROM", "Payments" ]
[ "select", "sum", "(", "amount_payment", ")", "from", "payments" ]
[ "Compute", "the", "total", "amount", "of", "payment", "processed", "." ]
insurance_policies
SELECT DISTINCT customer_details FROM Customers
What are all the distinct details of the customers?
[ "SELECT", "DISTINCT", "customer_details", "FROM", "Customers" ]
[ "select", "distinct", "customer_details", "from", "customers" ]
[ "What", "are", "all", "the", "distinct", "details", "of", "the", "customers", "?" ]
insurance_policies
SELECT DISTINCT customer_details FROM Customers
Return the distinct customer details.
[ "SELECT", "DISTINCT", "customer_details", "FROM", "Customers" ]
[ "select", "distinct", "customer_details", "from", "customers" ]
[ "Return", "the", "distinct", "customer", "details", "." ]
insurance_policies
SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY count(*) DESC LIMIT 1
Which kind of policy type was chosen by the most customers?
[ "SELECT", "Policy_Type_Code", "FROM", "Customer_Policies", "GROUP", "BY", "Policy_Type_Code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "policy_type_code", "from", "customer_policies", "group", "by", "policy_type_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Which", "kind", "of", "policy", "type", "was", "chosen", "by", "the", "most", "customers", "?" ]
insurance_policies
SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY count(*) DESC LIMIT 1
Find the policy type the most customers choose.
[ "SELECT", "Policy_Type_Code", "FROM", "Customer_Policies", "GROUP", "BY", "Policy_Type_Code", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "policy_type_code", "from", "customer_policies", "group", "by", "policy_type_code", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Find", "the", "policy", "type", "the", "most", "customers", "choose", "." ]
insurance_policies
SELECT count(*) FROM Settlements
How many settlements are there in total?
[ "SELECT", "count", "(", "*", ")", "FROM", "Settlements" ]
[ "select", "count", "(", "*", ")", "from", "settlements" ]
[ "How", "many", "settlements", "are", "there", "in", "total", "?" ]
insurance_policies
SELECT count(*) FROM Settlements
Count the total number of settlements made.
[ "SELECT", "count", "(", "*", ")", "FROM", "Settlements" ]
[ "select", "count", "(", "*", ")", "from", "settlements" ]
[ "Count", "the", "total", "number", "of", "settlements", "made", "." ]
insurance_policies
SELECT Payment_ID , Date_Payment_Made , Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'
Which Payments were processed with Visa? List the payment Id, the date and the amount.
[ "SELECT", "Payment_ID", ",", "Date_Payment_Made", ",", "Amount_Payment", "FROM", "Payments", "WHERE", "Payment_Method_Code", "=", "'Visa", "'" ]
[ "select", "payment_id", ",", "date_payment_made", ",", "amount_payment", "from", "payments", "where", "payment_method_code", "=", "value" ]
[ "Which", "Payments", "were", "processed", "with", "Visa", "?", "List", "the", "payment", "Id", ",", "the", "date", "and", "the", "amount", "." ]
insurance_policies
SELECT Payment_ID , Date_Payment_Made , Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'
Give me the payment Id, the date and the amount for all the payments processed with Visa.
[ "SELECT", "Payment_ID", ",", "Date_Payment_Made", ",", "Amount_Payment", "FROM", "Payments", "WHERE", "Payment_Method_Code", "=", "'Visa", "'" ]
[ "select", "payment_id", ",", "date_payment_made", ",", "amount_payment", "from", "payments", "where", "payment_method_code", "=", "value" ]
[ "Give", "me", "the", "payment", "Id", ",", "the", "date", "and", "the", "amount", "for", "all", "the", "payments", "processed", "with", "Visa", "." ]
insurance_policies
SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id
List the details of the customers who do not have any policies.
[ "SELECT", "customer_details", "FROM", "Customers", "EXCEPT", "SELECT", "T1.customer_details", "FROM", "Customers", "AS", "T1", "JOIN", "Customer_Policies", "AS", "T2", "ON", "T1.customer_id", "=", "T2.customer_id" ]
[ "select", "customer_details", "from", "customers", "except", "select", "t1", ".", "customer_details", "from", "customers", "as", "t1", "join", "customer_policies", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id" ]
[ "List", "the", "details", "of", "the", "customers", "who", "do", "not", "have", "any", "policies", "." ]
insurance_policies
SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id
Which customers do not have any policies? Find the details of these customers.
[ "SELECT", "customer_details", "FROM", "Customers", "EXCEPT", "SELECT", "T1.customer_details", "FROM", "Customers", "AS", "T1", "JOIN", "Customer_Policies", "AS", "T2", "ON", "T1.customer_id", "=", "T2.customer_id" ]
[ "select", "customer_details", "from", "customers", "except", "select", "t1", ".", "customer_details", "from", "customers", "as", "t1", "join", "customer_policies", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id" ]
[ "Which", "customers", "do", "not", "have", "any", "policies", "?", "Find", "the", "details", "of", "these", "customers", "." ]
insurance_policies
SELECT T1.claim_id , T1.date_claim_made , T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING count(*) = 1
List the date the claim was made, the date it was settled and the amount settled for all the claims which had exactly one settlement.
[ "SELECT", "T1.claim_id", ",", "T1.date_claim_made", ",", "T1.Date_Claim_Settled", "FROM", "Claims", "AS", "T1", "JOIN", "Settlements", "AS", "T2", "ON", "T1.Claim_id", "=", "T2.Claim_id", "GROUP", "BY", "T1.claim_id", "HAVING", "count", "(", "*", ")", "=", "1" ]
[ "select", "t1", ".", "claim_id", ",", "t1", ".", "date_claim_made", ",", "t1", ".", "date_claim_settled", "from", "claims", "as", "t1", "join", "settlements", "as", "t2", "on", "t1", ".", "claim_id", "=", "t2", ".", "claim_id", "group", "by", "t1", ".", "claim_id", "having", "count", "(", "*", ")", "=", "value" ]
[ "List", "the", "date", "the", "claim", "was", "made", ",", "the", "date", "it", "was", "settled", "and", "the", "amount", "settled", "for", "all", "the", "claims", "which", "had", "exactly", "one", "settlement", "." ]
insurance_policies
SELECT T1.claim_id , T1.date_claim_made , T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING count(*) = 1
Which claims had exactly one settlement? For each, tell me the the date the claim was made, the date it was settled and the amount settled.
[ "SELECT", "T1.claim_id", ",", "T1.date_claim_made", ",", "T1.Date_Claim_Settled", "FROM", "Claims", "AS", "T1", "JOIN", "Settlements", "AS", "T2", "ON", "T1.Claim_id", "=", "T2.Claim_id", "GROUP", "BY", "T1.claim_id", "HAVING", "count", "(", "*", ")", "=", "1" ]
[ "select", "t1", ".", "claim_id", ",", "t1", ".", "date_claim_made", ",", "t1", ".", "date_claim_settled", "from", "claims", "as", "t1", "join", "settlements", "as", "t2", "on", "t1", ".", "claim_id", "=", "t2", ".", "claim_id", "group", "by", "t1", ".", "claim_id", "having", "count", "(", "*", ")", "=", "value" ]
[ "Which", "claims", "had", "exactly", "one", "settlement", "?", "For", "each", ",", "tell", "me", "the", "the", "date", "the", "claim", "was", "made", ",", "the", "date", "it", "was", "settled", "and", "the", "amount", "settled", "." ]
insurance_policies
SELECT sum(Amount_Claimed) FROM Claims
Find the total claimed amount of all the claims.
[ "SELECT", "sum", "(", "Amount_Claimed", ")", "FROM", "Claims" ]
[ "select", "sum", "(", "amount_claimed", ")", "from", "claims" ]
[ "Find", "the", "total", "claimed", "amount", "of", "all", "the", "claims", "." ]
insurance_policies
SELECT sum(Amount_Claimed) FROM Claims
What is total amount claimed summed across all the claims?
[ "SELECT", "sum", "(", "Amount_Claimed", ")", "FROM", "Claims" ]
[ "select", "sum", "(", "amount_claimed", ")", "from", "claims" ]
[ "What", "is", "total", "amount", "claimed", "summed", "across", "all", "the", "claims", "?" ]
hospital_1
SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) DESC LIMIT 1;
Which department has the largest number of employees?
[ "SELECT", "name", "FROM", "department", "GROUP", "BY", "departmentID", "ORDER", "BY", "count", "(", "departmentID", ")", "DESC", "LIMIT", "1", ";" ]
[ "select", "name", "from", "department", "group", "by", "departmentid", "order", "by", "count", "(", "departmentid", ")", "desc", "limit", "value" ]
[ "Which", "department", "has", "the", "largest", "number", "of", "employees", "?" ]
hospital_1
SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) DESC LIMIT 1;
Find the department with the most employees.
[ "SELECT", "name", "FROM", "department", "GROUP", "BY", "departmentID", "ORDER", "BY", "count", "(", "departmentID", ")", "DESC", "LIMIT", "1", ";" ]
[ "select", "name", "from", "department", "group", "by", "departmentid", "order", "by", "count", "(", "departmentid", ")", "desc", "limit", "value" ]
[ "Find", "the", "department", "with", "the", "most", "employees", "." ]