title: SQL query to apply multiple conditions against grouped data
body: <p>Given the tables: </p>
  
  <pre><code>Exam (ExamId, SubjectId)
  Result (ExamId, StudentId, GradeId)
  </code></pre>
  
  <p>What's the best way of retrieving a list of Students who received GradeId='A' in SubjectId='Maths' AND GradeId = 'B' in SubjectId='English' for their most recent exams in each subject? We can either assume ExamIds increase over time, or add an ExamDate column to Exam.</p>
  
  <p>Thanks!</p>