CREATE TABLE subjects (subject_id DECIMAL, subject_name TEXT)
CREATE TABLE courses (course_id DECIMAL, author_id DECIMAL, subject_id DECIMAL, course_name TEXT, course_description TEXT)
CREATE TABLE course_authors_and_tutors (author_id DECIMAL, author_tutor_atb TEXT, login_name TEXT, password TEXT, personal_name TEXT, middle_name TEXT, family_name TEXT, gender_mf TEXT, address_line_1 TEXT)
CREATE TABLE students (student_id DECIMAL, date_of_registration TIME, date_of_latest_logon TIME, login_name TEXT, password TEXT, personal_name TEXT, middle_name TEXT, family_name TEXT)
CREATE TABLE student_course_enrolment (registration_id DECIMAL, student_id DECIMAL, course_id DECIMAL, date_of_enrolment TIME, date_of_completion TIME)
CREATE TABLE student_tests_taken (registration_id DECIMAL, date_test_taken TIME, test_result TEXT)

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(*) <= 2