PREFIX schema: CONSTRUCT { GRAPH ?graph { ?employee schema:areaServed ?territory } } WHERE { ?employee_territory <#employeeID> ?employeeID ; <#territoryID> ?territoryID . BIND(uri(concat(str($base), "employees/")) AS ?container) BIND(uri(concat(str(?container), encode_for_uri(?employeeID), "/")) AS ?graph) BIND(uri(concat(str(?graph), "#this")) AS ?employee) BIND(uri(concat(str($base), "territories/", encode_for_uri(?territoryID), "/#this")) AS ?territory) }