Here is my sample table for further description:
I have a original point layer:
| ID | Name | X(latitude) | Y(longtitude) |
|---|---|---|---|
| ID1 | Dog | A | 1 |
| ID2 | Cat | A | 1 |
| ID3 | Bird | B | 1 |
| ID4 | Cat | A | 2 |
| ID5 | Cat | B | 1 |
| ID6 | Dog | A | 1 |
Those points are inside a grid layer, lets say 2x2 for instance, and the points are inside the grid. I'll try my best to demonstrate it in the follow table:
| - | A | B |
|---|---|---|
| 1 | . . . (Three points, which are ID1, ID2, ID6) | . . (ID3, ID5) |
| 2 | . (ID4) | (NULL) |
Next, I use the count_points_in_polygon function and create a new layer, which by default adds a column "NUM_POINT".
| Grid_ID | NUM_POINT |
|---|---|
| A1 | 3 |
| A2 | 2 |
| B1 | 1 |
| B2 | 0 |
But what I actually want is a table that shows which "Name"s are in each polygon, like the following table shows. How to implement it?
The closest method I found is a guide from https://cornell-gis.github.io/gis-cookbook/qgis/count-multivalues, but it's still slightly different.


aggregatehard to master.GROUP_CONCAT, more details here: gis.stackexchange.com/questions/354187/…