Hello,
Much of this is confusing. It is a general practice to not store computed fields if the original data is present. HSQLDB embedded (your posted sample) does not have this capability. Firebird embedded does as do some other databases. Also it is easy enough to use SQL (a query) to compute any needed results.
For example:
Select "Math_ID", "Answer" As "Answer Given", "addend_1" + "addend_2" As "Correct Answer" From "Addition"
producing this:
This can be further refined to group by student and more. SQL can eliminate many problems.
Another point of confusion is why there is a grade for each record. Seems this would be for the result of a group of questions per student.
Edit:
How about:
SQL:
SELECT "Person_FK", Count("Person_FK") "Total", Sum("Answer") As "Correct", (Sum("Answer") * 1.00 / Count("Person_FK")) * 100 As "Percent" FROM
(SELECT "Math_ID", "Person_FK", Case When "Answer" = "addend_1" + "addend_2" Then 1 ELSE 0 END As "Answer" FROM "Addition") Group By "Person_FK" Order by "Person_FK" asc
More can be done such as adding names. SQL!
Edit 2021-04-23:
While far from complete, attached is sample with items requested and a bit more.
Sample ------- Math-01.odb