title: caculating a grade point average
body: <p>This sample code her just figures out the     grade average for table 3, not the true GPA : SELECT *
     FROM (
     SELECT AVG(g.Grade) as average_grade, g.SSN
     FROM Grade g
     group by g.SSN) a
     inner join Student s on a.ssn = s.ssn;</p>
  
  <p>Tying to figure out the correct formula: Here is what I have came up with but it is not correct
      SELECT *
     FROM (
     SELECT SUM(Grade*CreditHour)/(SUM(CreditHour) as average_grade, g.SSN
     FROM Grade g
     group by g.SSN) a
     inner join Student s on a.ssn = s.ssn;</p>
  
  <pre><code>Need some help stuck on this problem?
  </code></pre>