Даны следующие таблицы:



Students



| StudentID | Name | Age | Gender |

|-----------|-----------|-----|--------|

| 1 | John | 20 | Male |

| 2 | Jane | 22 | Female |

| 3 | Mark | 21 | Male |

| 4 | Sarah | 23 | Female |

| 5 | Michael | 20 | Male |



Courses



| CourseID | CourseName | Credits |

|----------|------------------|---------|

| 101 | Mathematics | 3 |

| 102 | Physics | 4 |

| 103 | Chemistry | 3 |

| 104 | English | 2 |

| 105 | History | 3 |



Enrollments

| EnrollmentID | StudentID | CourseID |

|--------------|-----------|----------|

| 1 | 1 | 101 |

| 2 | 2 | 101 |

| 3 | 3 | 102 |

| 4 | 4 | 101 |

| 5 | 1 | 103 |

| 6 | 2 | 105 |

| 7 | 3 | 104 |

| 8 | 4 | 102 |

| 9 | 5 | 101 |

| 10 | 5 | 103 |



Какой из следующих SQL запросов отберет всех студентов женского пола, записанных на курс "Mathemetics"?



A) SELECT Name FROM Students WHERE Gender = 'Female' AND StudentID IN (SELECT StudentID FROM Enrollments WHERE CourseName = 'Mathematics')



B) SELECT Name FROM Students JOIN Enrollments ON Students.StudentID = Enrollments.StudentID WHERE Gender = 'Female' AND CourseName = 'Mathematics'



C) SELECT Name FROM Students WHERE Gender = 'Female' AND StudentID = (SELECT StudentID FROM Enrollments WHERE CourseName = 'Mathematics')



D) SELECT Name FROM Students JOIN Enrollments ON Students.StudentID = Enrollments.StudentID WHERE Gender = 'Female' AND CourseID = 101