query-7eb9b2f141946e9d28cc687c87a69956
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?camp ?campLabel (GROUP_CONCAT(DISTINCT ?instance_ofLabel ; SEPARATOR=", ") AS ?type)
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
}
SERVICE wikibase:label
{
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?camp rdfs:label ?campLabel.
?instance_of rdfs:label ?instance_ofLabel.
}
}
GROUP BY ?camp ?campLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?camp"):::projected
v3("?campLabel"):::projected
v2("?instance_of")
v4("?instance_ofLabel"):::projected
v5("?type")
c6(["bd:serviceParam"]):::iri
c4(["wd:Q1719244"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q328468"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> v2
v2 --"wdt:P279"--> c4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> v2
v2 --"wdt:P279"--> c3
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
v1 --"rdfs:label"--> v3
v2 --"rdfs:label"--> v4
end
bind1[/"?instance_ofLabel"/]
v4 --o bind1
bind1 --as--o v5