This is my first question on here so bear with me. I have two tables in my Oracle database as following:
modules
with fields:
module_code
eg. INF211module_title
eg. Information technologycredits
eg.20module_progress
with fields:
student_id
eg. STU1module_code
eg. INF211module_year
eg. 1module_percent
eg. 65Each student takes 5 modules a year.
So this is what I want to put this all in one query/view if possible:
Can this be done?
SELECT student_id,
SUM(credits * module_percent) / SUM(credits) * 100.0
FROM module_progress mp
JOIN modules m
ON m.module_code = mp.module_code
GROUP BY
student_id
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With