query-68f5ea9c8f2f2000a3c8e4883a02f944
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?camp ?campLabel (GROUP_CONCAT(DISTINCT ?instance_ofLabel ; SEPARATOR=", ") AS ?type) ?coord ?propertyLabel ?refvalue ?refvalueLabel
WHERE
{
{
?camp wdt:P31 ?instance_of.
?instance_of wdt:P279* wd:Q328468. # Nazi concentration camp
}
UNION
{
?camp wdt:P31 ?instance_of.
?instance_of wdt:P279* wd:Q1719244. # Subcamp
}
UNION
{
?mother_camp wdt:P31 ?mc_instance_of.
?mc_instance_of wdt:P279* wd:Q328468. # Nazi concentration camp
?mother_camp wdt:P355 ?camp. # camp is a subsidiary of mother_camp
?camp wdt:P31 ?instance_of.
}
OPTIONAL {?camp p:P625 ?stat .
?stat ps:P625 ?coord .
OPTIONAL {?stat prov:wasDerivedFrom ?refstat .
?refstat ?predicate ?refvalue .
?property wikibase:reference ?predicate .
}
}
SERVICE wikibase:label
{
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de".
?camp rdfs:label ?campLabel.
?instance_of rdfs:label ?instance_ofLabel.
?property rdfs:label ?propertyLabel.
?refvalue rdfs:label ?refvalueLabel .
}
} GROUP BY ?camp ?campLabel ?propertyLabel ?refvalue ?refvalueLabel ?coord ORDER BY ?camp ?refvalue
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?camp"):::projected
v11("?campLabel"):::projected
v7("?coord"):::projected
v3("?instance_of")
v12("?instance_ofLabel"):::projected
v5("?mc_instance_of")
v4("?mother_camp")
v9("?predicate")
v10("?property")
v13("?propertyLabel"):::projected
v8("?refstat")
v2("?refvalue"):::projected
v14("?refvalueLabel"):::projected
v6("?stat")
v15("?type")
c11(["bd:serviceParam"]):::iri
c4(["wd:Q1719244"]):::iri
c3(["wd:Q328468"]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en,de"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v4 --"p:direct/P31"--> v5
v5 --"p:direct/P279"--> c3
v4 --"p:direct/P355"--> v1
v1 --"p:direct/P31"--> v3
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P31"--> v3
v3 --"p:direct/P279"--> c4
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P31"--> v3
v3 --"p:direct/P279"--> c3
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:P625".-> v6
v6 --"p:statement/P625"--> v7
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v6 -."prov:wasDerivedFrom".-> v8
v8 -->v9--> v2
v10 --"wikibase:reference"--> v9
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
v1 --"rdfs:label"--> v11
v3 --"rdfs:label"--> v12
v10 --"rdfs:label"--> v13
v2 --"rdfs:label"--> v14
end
bind1[/"?instance_ofLabel"/]
v12 --o bind1
bind1 --as--o v15