One-to-many spatial join with results in one row

In QGIS I can suggest using a "Virtual Layer" through Layer > Add Layer > Add/Edit Virtual Layer...

Let's assume we have two polygon layers "Layer_A" (brown) and "Layer_B" (green) respectively, see image below.

example

With the following query, it is possible to achieve the result, i.e. to perform a spatial join and put the result comma seperated in just one row.

SELECT a.*, GROUP_CONCAT(b.info) AS concat_b_info
FROM "Layer_B" AS b, "Layer_A" As a
WHERE ST_INTERSECTS(a.geometry, b.geometry)
GROUP BY a.id

The output Virtual Layer will look like as follwoing

result

As an alternative you may try the solution offered in this article "Summary Aggregate and Spatial Filters in QGIS". So, the expression in the FIeld Calculator for above example will look like:

aggregate(
  layer:='Layer_B',
  aggregate:='concatenate',
  expression:="info",
  concatenator:=',',
  filter:=intersects($geometry,geometry(@parent))
)

References:

  • SQLite GROUP_CONCAT

Alright I figured out a way.

First I did a spatial join like you would normal do with the one-to-many option.

Then I downloaded the Plugin "Dissolve with stats". Here I dissolved the "Zone_ID_A" and choose the option "uniquification" at the field "Zone_ID_B". The Ouput was exactly what I wanted and descriped in the Original Post.