query-2a1003a8c3d3dd70c720d7980eecd056
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 ?item ?itemLabel (group_concat(distinct ?showLabel;separator=", ") as ?shows)
WHERE
{
values ?show {wd:Q18652415 wd:Q11241311 wd:Q13548225} # Add your shows here
?show wdt:P161 ?item.
?item wdt:P19/wdt:P131* wd:Q884 .
?item wdt:P21 wd:Q6581072 .
optional {?show rdfs:label ?showLabel . filter(lang(?showLabel)="en")}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} group by ?item ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v2("?show")
v1("?showLabel"):::projected
v4("?shows")
a1((" "))
c5(["wd:Q884"]):::iri
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c7(["wd:Q6581072"]):::iri
bind0[/VALUES ?show/]
bind0-->v2
bind00(["wd:Q18652415"])
bind00 --> bind0
bind01(["wd:Q11241311"])
bind01 --> bind0
bind02(["wd:Q13548225"])
bind02 --> bind0
v2 --"wdt:P161"--> v3
v3 --"wdt:P19"--> a1
a1 --"wdt:P131"--> c5
v3 --"wdt:P21"--> c7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."rdfs:label".-> v1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
bind2[/"?showLabel"/]
v1 --o bind2
bind2 --as--o v4