Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I query only students with A’s and B’s and calculate their average GPA?

3413295Mar 11 2017 — edited Mar 16 2017

I have a query that is set to pull grades for specific math courses for 11th and 12th graders and would like to make the following changes:

Students 1, 3 and 4 have only A’s and B’s. I want all the grades for these students.

I also want to calculate their average GPA, factoring in that the course with 0.5 credit hours (CRHRS) only counts half.

Student 1’s GPA would be ((4 * .5) + 4 + 4 + 3) / 3.5 = 3.714

Student 3’s GPA would be ((3.667 * .5) + 3 ) / 1.5 = 3.222

Student 4's GPA would be ((2.667 * .5) / .5) = 2.667 or could be left alone

Student 2 has a C in Algebra 2/Trigonometry. I want to exclude all this student’s grades (highlighted in yellow).

Any help would be much appreciated.

pastedImage_4.png

This post has been answered by 3413295 on Mar 13 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2017
Added on Mar 11 2017
49 comments
7,860 views