SELECT * FROM PointInPolygon( ON source_passenger1 AS source PARTITION BY ANY ON reference_terminal AS reference DIMENSION SourceLocationColumn ('x', 'y') ReferenceLocationColumn ('reference_location_polygon') ReferenceNameColumns ('terminal_name') OutputAll ('false') Accumulate ('customer_id', 'customer_name') ) ORDER BY x, y;