Performing an aggregation for a set of nodes that match an expression is fairly simple. However, performing the same aggregation for only unique items introduces more complexity. For the sample XML snippet,
<applicant>
<address_details>
<court_judgements id="CJR" title="MRS" forename="R" surname=" JONES" value="42300" type="CJP" case_number="6XT01ZZZ"/>
<court_judgements id="CJR" title ...
[Read more]