I don’t know SQL so I’m not sure I understand the difference between LEFT JOIN and INNER JOIN, but I think you might want to compare these two queries:
for $x in input()/x, $y in input()/y
where $x/key = $y/key
return <xy> {$x, $y} </xy>
for $x in input()/x
return <x-suby> { $x, for $y in input()/y
where $y/key = $x/key
return <sub-y> {$y} </sub-y> } </x-suby>
#Tamino#API-Management#webMethods