| 1 | PREFIX pbo: <https://ontology.property.local/pbo#> |
| 2 | PREFIX ex: <https://ontology.property.local/pbo/example#> |
| 3 | PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> |
| 4 | PREFIX skos: <http://www.w3.org/2004/02/skos/core#> |
| 5 | PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> |
| 6 | |
| 7 | # CQ-003: parties and roles under an agreement, fixed-rent flag and outgoings allocation by lease type. |
| 8 | SELECT ?agreement ?agreementType ?party ?role ?fixedRent ?outgoing ?bearer WHERE { |
| 9 | ?a a ?type ; rdfs:label ?agreement ; pbo:hasParticipation ?p . |
| 10 | ?type rdfs:subClassOf* pbo:Agreement . ?type rdfs:label ?agreementType . |
| 11 | ?p pbo:participant ?pt ; pbo:inRole ?rl . ?pt rdfs:label ?party . ?rl skos:prefLabel ?role . |
| 12 | OPTIONAL { ?a pbo:fixedRent ?fixedRent } |
| 13 | OPTIONAL { ?a pbo:leaseType ?lt . ?lt pbo:allocatesOutgoing ?oa . ?oa pbo:outgoingCategory ?oc ; pbo:borneByRole ?br . ?oc skos:prefLabel ?outgoing . ?br skos:prefLabel ?bearer } |
| 14 | FILTER(?type != pbo:Agreement) |
| 15 | } ORDER BY ?agreement ?role ?outgoing |