query-ff701c5afc27885566d99279d3688052
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?band ?bandLabel ?genre ?genreLabel ?location_of_formation ?location_of_formationLabel ?coordinates
{
?band wdt:P31 wd:Q215380. # ?band is a band
VALUES ?genre { wd:Q617240 wd:Q720959 wd:Q186170 wd:Q11366 wd:Q49451 }
?band wdt:P136 ?genre. # ?band has one of genres in ?genre
OPTIONAL { ?band wdt:P576 ?dissolved }
FILTER (! BOUND(?dissolved)) # Band has no dissolve date
OPTIONAL {
?band wdt:P740 ?location_of_formation.
OPTIONAL { ?location_of_formation wdt:P625 ?coordinates. }
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?band"):::projected
v5("?coordinates"):::projected
v1("?dissolved")
v3("?genre"):::projected
v4("?location_of_formation"):::projected
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q215380"]):::iri
f0[["not bound(?dissolved)"]]
f0 --> v1
v2 --"wdt:P31"--> c2
bind1[/VALUES ?genre/]
bind1-->v3
bind10(["wd:Q617240"])
bind10 --> bind1
bind11(["wd:Q720959"])
bind11 --> bind1
bind12(["wd:Q186170"])
bind12 --> bind1
bind13(["wd:Q11366"])
bind13 --> bind1
bind14(["wd:Q49451"])
bind14 --> bind1
v2 --"wdt:P136"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P576".-> v1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P740".-> v4
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P625".-> v5
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end