The query below requires that the shipping of an object should follow a scheduled route of length at most 3.
PATTERN SEQ(Scan a, !(Scan+ b), Scan c)
AND a.location = “New York”
AND c.location = “Amherst”
AND b.location = a.next
AND b[i].location = b[i-1].next
AND c.location = b[b.LEN].next
AND b.LEN ≤ 3
RETURN c.object_id, c.courier_id
The next query captures an alert for a contaminated site and report a unique series of inflected shipments in each pattern match.
PATTERN SEQ(Alert a, Shipment+ b[ ])
WHERE a.type = 'contaminated'
AND b.from = a.site
AND b[i].from = b[i-1].to
WITHIN 3 hours
RETURN a.type, a.site, b[ ].to
Last updated: 07/16/14 11:35:56