Task: Text to Code
Input (English): Step 1: For each row in Semesters table, find the corresponding rows in Student_Enrolment table.
Step 2: find Student_Enrolment's semester_id of the results of step 1 whose semester_name equals Master.
Step 3: find Student_Enrolment's semester_id of the results of step 1 whose semester_name equals Bachelor.
Step 4: show the rows that are in both the results of step 2 and the results of step 3
Output (English): SELECT T2.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id WHERE T1.semester_name = "Master" INTERSECT SELECT T2.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id WHERE T1.semester_name = "Bachelor"