query-a7a2c847db756bc28a085c560868738c
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#>
#defaultView:Graph
SELECT DISTINCT ?genre ?genreLabel ?rgb ?OLAC ?_subclass_of ?_subclass_ofLabel {
?genre wdt:P31 wd:Q659563.
OPTIONAL { ?genre wdt:P279 ?_subclass_of. ?_subclass_of wdt:P31 wd:Q659563. }
OPTIONAL { ?genre wdt:P6352 ?OLAC. }
BIND(IF(BOUND(?OLAC),"FFA500","7FFF00") AS ?rgb)
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;
v3("?OLAC"):::projected
v2("?_subclass_of"):::projected
v1("?genre"):::projected
v4("?rgb"):::projected
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q659563"]):::iri
v1 --"wdt:P31"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P279".-> v2
v2 --"wdt:P31"--> c2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P6352".-> v3
end
bind0[/"if(bound(?OLAC),'FFA500','7FFF00')"/]
v3 --o bind0
bind0 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end