title: SQL query get course number for certain student grades
body: <p>I'm working through some problems and I can't seem to get the expected results for this one. The question is below with what is in my code right now and also the expected results. If anyone help that would be great. I'm just trying to get a understanding on this and can't seem to get my head around what exactly this is asking as you can see my code I have now isn't close to what the expected result is as of right now. Also I added the schema this will show whats in what table if needed for your guys help.</p>
  
  <p><strong>Question</strong>:</p>
  
  <p>List the course number of courses wherein students have received grades for every one of the possible defined grade types. Order by course number.</p>
  
  <p>My code so far:</p>
  
  <pre><code>SELECT g.Student_id, g.Grade_type_code
  FROM Grade g LEFT OUTER JOIN Section s
  ON g.Section_id = s.Section_id
  GROUP BY g.Student_id, g.Grade_type_code
  ORDER BY g.Student_id;
  </code></pre>
  
  <p>Any help would be great, also <a href="http://authors.phptr.com/rischert/documents/AppendixD.pdf" rel="nofollow">here is the Schema</a>.</p>
  
  <p>DBMS: I'm using Oracle SQL Developer</p>
  
  <p>Here is the Expected Result</p>
  
  <pre><code>COURSE_NO
  ----------
  20
  25
  100
  120
  122
  125
  130
  135
  </code></pre>
  
  <p>Note: The Chapter for this problem is based off using</p>
  
  <pre><code>LEFT OUTER JOIN
  </code></pre>
  
  <p>My Current results</p>
  
  <pre><code>STUDENT_ID GRADE_TYPE_CODE
  ---------- ---------------
     102 FI              
     102 HM              
     102 MT              
     102 PA              
     102 QZ              
     103 FI              
     103 HM              
     103 MT              
     103 PA              
     103 QZ              
     104 FI              
     104 HM              
  </code></pre>