query-b98daf2d9720f7b4b392632f08be67c5
11:30, 16 September 2023 (UTC)) talk (Shisma. How do I do that? – in a single query (Q3658341)literary character and (Q1114461)comics character , (Q15773317)television character part and query a list of classes instead. For example, I want to get all parent classes of (P31)instance of I'd like to skip the 11:34, 16 September 2023 (UTC)) talk (Shisma variable. The classes requested as well as those in the query. –?classAnd all classes should be in the
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 DISTINCT ?class ?classLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
{ wd:Q3658341 wdt:P279* ?class. }
UNION
{ BIND (wd:Q3658341 as ?class) }
UNION
{ wd:Q15773317 wdt:P279* ?class. }
UNION
{ BIND (wd:Q15773317 as ?class) }
UNION
{ wd:Q3658341 wdt:P279* ?class. }
UNION
{ BIND (wd:Q3658341 as ?class) }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?class"):::projected
c5(["wd:Q3658341"]):::iri
c2(["bd:serviceParam"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c7(["wd:Q15773317"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
subgraph union4[" Union "]
subgraph union4l[" "]
style union4l fill:#abf,stroke-dasharray: 3 3;
bind0[/"'wd:Q3658341'"/]
bind0 --as--o v2
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
c5 --"wdt:P279"--> v2
end
union4r <== or ==> union4l
end
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
bind1[/"'wd:Q15773317'"/]
bind1 --as--o v2
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
c7 --"wdt:P279"--> v2
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
bind2[/"'wd:Q3658341'"/]
bind2 --as--o v2
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
c5 --"wdt:P279"--> v2
end
union0r <== or ==> union0l
end