Skip to content

Instantly share code, notes, and snippets.

@cosmin-marginean
Created February 5, 2023 10:05
Show Gist options
  • Save cosmin-marginean/47e67dce5e5aca8d220de6bd866d392b to your computer and use it in GitHub Desktop.
Save cosmin-marginean/47e67dce5e5aca8d220de6bd866d392b to your computer and use it in GitHub Desktop.
BODS RDF - Find UBOs ownership chain
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX bods: <http://bods.openownership.org/vocabulary/>
PREFIX bods-res: <http://bods.openownership.org/resource/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?uboName ?parent ?child
WHERE {
?ubo bods:ownsOrControls* ?a .
?ubo foaf:name ?uboName .
?ubo rdf:type bods:Person .
?a foaf:name ?parent .
?a bods:ownsOrControls ?b .
?b foaf:name ?child .
?b bods:ownsOrControls*
bods-res:openownership-register-6295574063848670981 .
}
ORDER BY ?uboName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment