human
Schema:
Course_Authors_and_Tutors (author_id, author_tutor_ATB, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1)
Students (student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name)
Subjects (subject_id, subject_name)
Courses (course_id, author_id, subject_id, course_name, course_description)
Student_Course_Enrolment (registration_id, student_id, course_id, date_of_enrolment, date_of_completion)
Student_Tests_Taken (registration_id, date_test_taken, test_result)
Please answer with SQL.
assistant
Sure, I understand.
human
List all the login names and family names of course author and tutors.
assistant
SELECT login_name , family_name FROM Course_Authors_and_Tutors
human
Find the personal names of students not enrolled in any course.
assistant
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
human
List all the dates of enrollment and completion of students.
assistant
SELECT date_of_enrolment , date_of_completion FROM Student_Course_Enrolment
human
List all the information about course authors and tutors in alphabetical order of the personal name.
assistant
SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name
human
What are the dates of the latest logon of the students with family name 'Jaskolski' or 'Langosh'?
assistant
SELECT date_of_latest_logon FROM Students WHERE family_name = 'Jaskolski' OR family_name = 'Langosh'
human
On what dates did the student whose personal name is 'Karson' enroll in and complete the courses?
assistant
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" ;