Hi Martin,

What I was looking for is a “quick way” to get a comparison such that an item (when it is repeated more than once) is returned only as many times as it appears in both sequences. For example, in 

for $a in (1,2,3,5,3,3)
where $a = (1,3,2,3, 2)
group by $k := $a
return
<c>{$a}</c>

you get 

<c>1</c>
<c>2</c>
<c>3 3 3</c>

with three 3 even if in the second sequence you have two 3.


On 26. Nov 2020, at 08:30, Martin Honnen <martin.honnen@gmx.de> wrote:

Am 26.11.2020 um 07:14 schrieb Martin Honnen:
My bad, use
group by $k := $a return <c>{$a}</c>

To describe it clearer, the whole FLOWR should be

for $a in (1,2,3,5)
where $a = (1,3,2,3)
group by $k := $a
return
<c>{$a}</c>