Hi,
I have to compare two sequences and find common items, irrespective of their positions:
for $a in (1,2,3,5,3)
for $u in (1,3,2,3)
where $a = $u
group by $o := $a
return
<c>{$a}</c>
This returns
<c>1</c>
<c>2</c>
<c>3 3 3 3</c>
I would like 3 to be repeated only twice (i.e., each item in the first sequence should pair only with one in the second sentence): is there an XQuery "trick" for that in the FLOWR expression?