query-297e649bb9430489b94dba0f86723530

rq turtle/ttl

Exploring hierachy in KB manuscript codices

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?codex ?codexLabel ?manuscript ?manuscriptLabel ?text ?textLabel
WHERE 
{
  ?codex wdt:P31 wd:Q2217259; wdt:P195 wd:Q1526131 #manuscript codex from KB collection 
  OPTIONAL{?codex wdt:P527 ?manuscript.} #manuscripts
  OPTIONAL{?manuscript wdt:P527 ?text.} #texts

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } 
}
ORDER BY ASC (?codexLabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?codex"):::projected v1("?codexLabel"):::projected v3("?manuscript"):::projected v4("?text"):::projected c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c4(["wd:Q1526131"]):::iri c2(["wd:Q2217259"]):::iri v2 --"wdt:P31"--> c2 v2 --"wdt:P195"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P527".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P527".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end