PREFIX gesli: PREFIX rdfs: SELECT ?customerName ?counterpartyType ?counterpartyName ?country ?region WHERE { ?customer rdfs:label ?customerName . { ?customer gesli:hasCustomerCounterparty ?counterparty . BIND("客户的客户" AS ?counterpartyType) } UNION { ?customer gesli:hasSupplierCounterparty ?counterparty . BIND("客户的供应商" AS ?counterpartyType) } ?counterparty rdfs:label ?counterpartyName . OPTIONAL { ?counterparty gesli:country ?country . } OPTIONAL { ?counterparty gesli:region ?region . } } ORDER BY ?customerName ?counterpartyType