query-06268e8a55c096d7a8cbee9cfe1ce5f9

rq turtle/ttl

Propertieshas part(s) (P527)instance of (P31)place of burial (P119)image of grave (P1442)reference URL (P854)stated in (P248)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?cemeteryLabel ?person ?personLabel ?statement ?refURL ?refStatedIn ?imggrave{ 
 wd:Q252312 wdt:P527 ?cemeteryPart.  # Norra Begravningsplatsen has parts 
 ?person wdt:P31 wd:Q5.
 {?person wdt:P119 ?cemeteryPart}
    UNION
 {?person wdt:P119 wd:Q252312}

 ?person wdt:P119 ?cemetery .
 ?person p:P119 ?statement .
 OPTIONAL {?statement prov:wasDerivedFrom ?ref .
            ?ref pr:P854 ?refURL}
 OPTIONAL {?statement prov:wasDerivedFrom ?ref .
            ?ref pr:P248 ?refStatedIn}
 OPTIONAL {?person wdt:P1442 ?imggrave}
 SERVICE wikibase:label { bd:serviceParam wikibase:language "sv","en" }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?cemetery") v1("?cemeteryPart") v8("?imggrave"):::projected v2("?person"):::projected v5("?ref") v7("?refStatedIn"):::projected v6("?refURL"):::projected v4("?statement"):::projected c14(["sv"]):::literal c15(["en"]):::literal c12(["bd:serviceParam"]):::iri c1(["wd:Q252312"]):::iri c4(["wd:Q5"]):::iri c1 --"p:direct/P527"--> v1 v2 --"p:direct/P31"--> c4 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P119"--> c1 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P119"--> v1 end union0r <== or ==> union0l end v2 --"p:direct/P119"--> v3 v2 --"p:P119"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."prov:wasDerivedFrom".-> v5 v5 --"p:reference/P854"--> v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."prov:wasDerivedFrom".-> v5 v5 --"p:reference/P248"--> v7 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P1442".-> v8 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 c12 --"wikibase:language"--> c15 end