Question Locked

SQL/ACCESS

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Please help me with a solution

DESIGN A QUERY TO RETURN THE VALUE AGGREGATE:
a student takes 3 core subject and 2 optional subject. calculate aggregate of each student given that: Aggregate is calculated out of 4 subjects, i.e: all 3 core subject one high optional subject.

LOOK AT THIS SAMPLE DATA
student name , subject1 , subject2 , subject3 , option1 , option2 , AGGREGATE
raymond , 4 , 7 , 4 , 8 , 7 , 23
donald , 5 , 2 , 7 , 2 , 4 , 18
richard , 4 , 6 , 3 , 1 , 1 , 14

2 replies

by john.a.wills

SELECT SUM (subject1, subject2, subject3, MAX (option1, option2)) AS aggregate
FROM TheTable

This discussion is closed to new replies.