So I have an XML file that has elements with numbers in them, and also some sub elements with numbers in them. Something like:
<data>
<points>
<score>80</score>
<score>90</score>
<score>10</score>
<score>13</score>
</points>
<favor>50</favor>
<ranked>
<rank>50</rank>
<rank>10</rank>
</ranked>
</data>
I want to compute the average across all these elements that have numbers including sub elements. So, I want a query that could produce:
(80+90+10+13+50+50+10) / 7 = 43.285714286
