I have a table which contains student grades (SAG). I need to show all grades that aren’t NULL or '' from one row based on ID and ResultGroup and have all other grades coming from another row based on ID and ResultGroup in the same table.
TABLE - SAG
ID RESULTGROUP GRADE
-----------------------------
102 AC C
102 ACPJ B
124 AC A
124 ACPJ
242 AC B
242 ACPJ
101 AC D
101 ACPJ C
What I’m trying to work out is how to get the results from ResultGroup ACPJ and only those from ResultGroup AC if there is a NULL or '' in the Grade for that ID.
END RESULT? Something like…
SAG_COMBINED
ID FinalGrade
-----------------
102 B
124 A
242 B
101 C
1 Answer