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
Can you please provide the names of all courses?
assistant
SELECT course_name FROM Courses;
human
Can you please provide the author id for the author that teaches the Advanced Database course?
assistant
SELECT author_id FROM Courses WHERE course_name = 'advanced database';
human
And what is the full name of the teacher with author id 6?
assistant
SELECT personal_name , middle_name , family_name FROM Course_Authors_and_Tutors WHERE author_id = 6;
human
And the login name for Adolf Keira Rohan?
assistant
SELECT login_name FROM Course_Authors_and_Tutors WHERE personal_name LIKE "%Adolf%" AND middle_name LIKE "%Keira%" AND family_name LIKE "%Rohan%" ;