Question: What are all the course names of the courses which ever have students enrolled in?
Schema: create table courses (course_name varchar, course_id varchar, PRIMARY KEY (course_name)); create table student_enrolment_courses (course_id varchar, PRIMARY KEY (course_id))
SQL: select distinct t1.course_name from courses as t1 join student_enrolment_courses as t2 on t1.course_id = t2.course_id