title: ORACLE SQL: select multiple rows basd on different values in one column for a same key value in another column
body: <p>For example, I want to fetch a list of students who were enrolled in all the 4 semesters of MARCH, JUNE, SEPTEMBER, and NOVEMBER.  But, I do not want to select students who missed enrolment in any of the above months and also were enrolled in semesters other than the above 4.</p>
  
  <h1>ENROLMENT_TABLE</h1>
  
  <pre><code>STUDENT_NAME    SEMESTER
  ------------    --------
  
  John            MAR  
  Christine       NOV  
  John            SEP  
  Nicholas        JAN  
  John            JUN  
  John            NOV  
  Linda           MAR  
  Christine       SEP  
  Linda           SEP  
  Nicholas        MAR  
  Linda           JUN  
  Linda           NOV  
  </code></pre>
  
  <p>The required results set are:<br>
  A)  </p>
  
  <pre><code>Student_Name    Semester  
  ------------    --------  
  John            MAR  
  John            JUN  
  John            SEP  
  John            NOV  
  Linda           MAR  
  Linda           JUN  
  Linda           SEP  
  Linda           NOV  
  </code></pre>
  
  <p>B)</p>
  
  <pre><code>% STUDENT ENROLLED IN 4 SEMESTERS    % STUDENT ENROLLED IN 2 SEMESTERS     % STUDENT ENROLLED IN 1 SEMESTERS  
  -------------------------            ---------------------------------     -------------------------  
  50                                   30                                     20  
  </code></pre>
  
  <p>What will be efficient SQL or PL/SQL for the above two outputs A and B?  </p>