SELECT * FROM PointInPolygon ( ON source_passenger AS source partition BY ANY ON reference_terminal AS reference dimension SourceLocationColumn ('source_location_point') ReferenceLocationColumn ('reference_location_polygon') ReferenceNameColumns ('terminal_name') OutputAll ('true') Accumulate ('customer_id', 'customer_name') ) ORDER BY source_location_point;