query-2b86ddb9df0a309f2d569b634d83e9dd
Movie after a work by OR based on works from Jane Austen SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q11424 . # item is a film ?work wdt:P50 wd:Q36322 . # work is by Austen {?item wdt:P144 ?work } # item is based on work union {?item wdt:P1877 ?work }. # OR item is after work
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
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#>
#Movie after a work by OR based on works from Jane Austen
SELECT ?item ?itemLabel
WHERE
{
?item wdt:P31 wd:Q11424 . # item is a film
?work wdt:P50 wd:Q36322 . # work is by Austen
{?item wdt:P144* ?work } # item is based on work
union {?item wdt:P1877* ?work }. # OR item is after work
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;
v1("?item"):::projected
v2("?work")
c4(["wd:Q36322"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q11424"]):::iri
v1 --"wdt:P31"--> c2
v2 --"wdt:P50"--> c4
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P1877"--> v2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P144"--> v2
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end