query-0f30813bc255e6b268ddd80281bfdc43
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 DISTINCT ?item ?itemLabel WHERE {
values ?term {wd:Q10379} #this is the input term
{?item wdt:P31/wdt:P279* ?term .} #this gets instances of the term, or subclasses of the term
UNION
{?item wdt:P921 ?term .} #this gets items which have the term as their main subject
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v1("?term")
a1((" "))
c5(["bd:serviceParam"]):::iri
c7(["it,en"]):::literal
bind0[/VALUES ?term/]
bind0-->v1
bind00(["wd:Q10379"])
bind00 --> bind0
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P921"--> v1
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> v1
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end