I am trying to list the IDs of students who have all A's. Here is my XQuery:
for $s1 in doc("Unv.xml")//Enrollment[Grade = 'A']/StudentInfo/@oID
let $s2 := doc("Unv.xml")//Enrollment[Grade != 'A']/StudentInfo/@oID
where every $id in $s1
satisfies ($id != $s2)
return <StraightA> { $s1 } </StraightA>;
and here is a snippet of the Enrollment Section I am pulling the data from:
<Enrollment EnrollmentID="Enrollment217">
<OfferingInfo oType="OfferingType" oID="Offering009"/>
<StudentInfo oType="StudentType" oID="s895255243"/>
<Grade>B</Grade>
</Enrollment>
However, this only gives me a list of students who have at least one A. Thoughts?