i need some help in an sql query in Access 2007 although i have done it in Oracle . to understand the problem you have to take the pain of reading this whole thing 
i have a table in this format
student_id | subject | total_marks | marks_obtained
1 Math 100 40
1 English 150 54
1 Physics 75 45
2 Economis 100 56
2 Maths 100 43
3 Philosophy 100 25
...........
-students can have different combination of subjects.
-subjects can have different total marks.
i want to run a query that return me the above table plus an additional field total_marks_obtained as in the following format
student_id | subject | total_marks | marks_obtained | total_marks_obtained
under the field of total_marks_obtained, i should get the sum of obtained_marks(of all the subjects-a student appeared in exam for) of only those students who get passed.
Passing criteria: only those students are considered as passed who secured equal to or greater than 33% marks in every subject he/she appeared in exam for.i.e, any student who obtained less than 33% marks in one or more subject is considered as fail.
in Oracle i was able to get the desired result in the following format.
select student_id, subject, marks_obtained,
case
when min (100 * marks_obtained / total_marks) over
(partition by student_id) >= 33
then sum (marks_obtained) over
(partition by student_id)
else null
end as total_marks_obtained
from test_tab
will appreciate your cooperation in this regard

i have a table in this format
student_id | subject | total_marks | marks_obtained
1 Math 100 40
1 English 150 54
1 Physics 75 45
2 Economis 100 56
2 Maths 100 43
3 Philosophy 100 25
...........
-students can have different combination of subjects.
-subjects can have different total marks.
i want to run a query that return me the above table plus an additional field total_marks_obtained as in the following format
student_id | subject | total_marks | marks_obtained | total_marks_obtained
under the field of total_marks_obtained, i should get the sum of obtained_marks(of all the subjects-a student appeared in exam for) of only those students who get passed.
Passing criteria: only those students are considered as passed who secured equal to or greater than 33% marks in every subject he/she appeared in exam for.i.e, any student who obtained less than 33% marks in one or more subject is considered as fail.
in Oracle i was able to get the desired result in the following format.
select student_id, subject, marks_obtained,
case
when min (100 * marks_obtained / total_marks) over
(partition by student_id) >= 33
then sum (marks_obtained) over
(partition by student_id)
else null
end as total_marks_obtained
from test_tab
will appreciate your cooperation in this regard