query-875b12e1b876675a7b9515f3bf0c886a
All contemporary african musicians
which have at least a musicbrainz artist ID
SELECT DISTINCT ?musiker ?musikerLabel ?landLabel ?geb ?img WHERE { ?musiker wdt:P31 wd:Q5; wdt:P434 ?mb; wdt:P19/wdt:P17+ ?land; wdt:P569 ?geb. FILTER NOT EXISTS { ?musiker wdt:P570 ?gest. } ?land wdt:P30 wd:Q15. ?type wdt:P31/wdt:P279* wd:Q66715801. ?musiker wdt:P106 ?type. FILTER (BOUND(?mb)). OPTIONAL { ?musiker wdt:P18 ?img. } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr". } } ORDER BY ASC (?landLabel) LIMIT 3000
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 bd: <http://www.bigdata.com/rdf#>
# All contemporary african musicians
# which have at least a musicbrainz artist ID
SELECT DISTINCT ?musiker ?musikerLabel ?landLabel ?geb ?img
WHERE {
?musiker wdt:P31 wd:Q5;
wdt:P434 ?mb;
wdt:P19/wdt:P17+ ?land;
wdt:P569 ?geb.
FILTER NOT EXISTS { ?musiker wdt:P570 ?gest. }
?land wdt:P30 wd:Q15.
?type wdt:P31/wdt:P279* wd:Q66715801.
?musiker wdt:P106 ?type.
FILTER (BOUND(?mb)).
OPTIONAL { ?musiker wdt:P18 ?img. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr". }
}
ORDER BY ASC (?landLabel)
LIMIT 3000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?geb"):::projected
v4("?gest")
v8("?img"):::projected
v5("?land")
v1("?landLabel"):::projected
v2("?mb")
v3("?musiker"):::projected
v7("?type")
a1((" "))
a2((" "))
c17(["#91;AUTO_LANGUAGE#93;,en,fr"]):::literal
c9(["wd:Q15"]):::iri
c15(["bd:serviceParam"]):::iri
c3(["wd:Q5"]):::iri
c11(["wd:Q66715801"]):::iri
f0[["bound(?mb)"]]
f0 --> v2
f1[["not "]]
subgraph f1e0["Exists Clause"]
e0v1 --"wdt:P570"--> e0v2
e0v2("?gest"):::projected
e0v1("?musiker"):::projected
end
f1--EXISTS--> f1e0
f1 --> v3
f1 --> c1
f1 --> v4
v3 --"wdt:P570"--> v4
v3 --"wdt:P31"--> c3
v3 --"wdt:P434"--> v2
v3 --"wdt:P19"--> a1
a1 --"wdt:P17"--> v5
v3 --"wdt:P569"--> v6
v5 --"wdt:P30"--> c9
v7 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c11
v3 --"wdt:P106"--> v7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P18".-> v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
end