In QGIS 3.28.1 I have a map with many points (it does not contain polygons and lines), and there are some duplicate points on top of each other in the same geographic location, and I would like to aggregate these points when they are in the exact same place + have the same name.
I tried doing an aggregate with the expression:


This aggregates all points that are in the same place regardless of their names.

I tried to use the expression:

geom_to_wkb($geometry) AND name

But that didn't work

Mu input:

My desired output:

Can you help me find the appropriate expression for the aggregate of points duplicated in the same place and with the same name?


1 Answer 1


Instead of using logical operator AND, try the ||-joint:

geom_to_wkt($geometry) || "name"
  • 1
    even easier: $x || $y || "name"
    – Babel
    Dec 3, 2022 at 16:41
  • 1
    I do not think it is easier
    – Taras
    Dec 3, 2022 at 16:58
  • 1
    it is shorter -
    – Babel
    Dec 3, 2022 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.