query-092013c477d93a9c364479ba034bcbbc
John Cummings:Q17769800(Q10076267)slave owner (Q806283)Bandeirante
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 schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
?item ?itemLabel (GROUP_CONCAT(?instance_ofLabel; SEPARATOR=", ") AS ?instance_ofLabels)
?location ?locationLabel ?country ?countryLabel ?wikipedia_en
?person ?personLabel ?occupation ?occupationLabel
WHERE
{
VALUES ?occupation { wd:Q17769800 wd:Q10076267 wd:Q806283} # slave trader, slave owner, Bandeirantes
?person wdt:P31 wd:Q5. # human
?person wdt:P106 ?occupation.
?item wdt:P138 ?person. # ?item is named after person
OPTIONAL { ?item wdt:P31 ?instance_of. }
OPTIONAL { ?item wdt:P131 ?location. }
OPTIONAL { ?item wdt:P17 ?country. }
OPTIONAL
{
?wikipedia_en schema:about ?item.
?wikipedia_en schema:isPartOf <https://en.wikipedia.org/> .
}
SERVICE wikibase:label
{
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?item rdfs:label ?itemLabel.
?instance_of rdfs:label ?instance_ofLabel.
?location rdfs:label ?locationLabel.
?country rdfs:label ?countryLabel.
?person rdfs:label ?personLabel.
?occupation rdfs:label ?occupationLabel.
}
}
GROUP BY
?item ?itemLabel ?location ?locationLabel ?country ?countryLabel ?wikipedia_en
?person ?personLabel ?occupation ?occupationLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?country"):::projected
v11("?countryLabel"):::projected
v4("?instance_of")
v9("?instance_ofLabel"):::projected
v14("?instance_ofLabels")
v3("?item"):::projected
v8("?itemLabel"):::projected
v5("?location"):::projected
v10("?locationLabel"):::projected
v1("?occupation"):::projected
v13("?occupationLabel"):::projected
v2("?person"):::projected
v12("?personLabel"):::projected
v7("?wikipedia_en"):::projected
c9([https://en.wikipedia.org/]):::iri
c11(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?occupation/]
bind0-->v1
bind00(["wd:Q17769800"])
bind00 --> bind0
bind01(["wd:Q10076267"])
bind01 --> bind0
bind02(["wd:Q806283"])
bind02 --> bind0
v2 --"wdt:P31"--> c2
v2 --"wdt:P106"--> v1
v3 --"wdt:P138"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P31".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P131".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P17".-> v6
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v7 -."schema:about".-> v3
v7 --"schema:isPartOf"--> c9
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
v3 --"rdfs:label"--> v8
v4 --"rdfs:label"--> v9
v5 --"rdfs:label"--> v10
v6 --"rdfs:label"--> v11
v2 --"rdfs:label"--> v12
v1 --"rdfs:label"--> v13
end
bind2[/"?instance_ofLabel"/]
v9 --o bind2
bind2 --as--o v14