title: Select rows that have two different values in same column
body: <p>I would like to select all students that have been passed <code>semester</code> <strong>1</strong> and <strong>4</strong>, with my query it shows only one row by student, I was expecting two.</p>
  
  <pre><code>SELECT Student.mat_stud, fname, lname, dbirth, materials_notes, semester
  FROM Student, Notes 
  WHERE Notes.mat_stud = Student.mat_stud
      AND fails_status = 1
      AND Notes.mat_div = 1
      AND semester IN(1 , 4)
      AND Notes.level = 1 
      AND school_year = 2015
  Group By Notes.mat_stud
  Having count(fname) = 2
  Order By Notes.mat_stud
  </code></pre>
  
  <p>My database tables looks like this:</p>
  
  <pre><code>Student
  -------------------------
  mat_stud    fname   lname
  -------------------------
  142-3698    fname   name    
  142-3699    fname   name        
  142-3701    fname   name    
  142-3700    fname   name    
  
  
  
  Notes
  ---------------------------------------------------------------
  mat_stud    materials_notes     semester    level   school_year
  ---------------------------------------------------------------
  142-3698                        1           1       2015
  142-3699                        1           1       2015
  142-3701                        1           1       2015
  142-3698                        4           1       2015
  142-3700                        1           1       2015
  142-3700                        4           1       2015
  </code></pre>
  
  <p>Expected result:</p>
  
  <pre><code>mat_stud    fname   lname   materials_notes     semester
  142-3698    fname   name                        1
  142-3698    fname   name                        4
  142-3700    fname   name                        1
  142-3700    fname   name                        4
  </code></pre>