query-f5a38163b8026602389a2d00f2b6e58f
Propertiesinstance of (P31)subclass of (P279)based on (P144)publication date (P577)part of the series (P179)
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 ?novel ?novelLabel (YEAR(?bookPubDate) AS ?novelYear) ?film ?filmLabel (YEAR(?filmPubDate) AS ?filmYear)
WHERE {
?film wdt:P31/wdt:P279* wd:Q11424;
wdt:P144 ?novel;
wdt:P577 ?filmPubDate .
?novel wdt:P31/wdt:P279* wd:Q571;
wdt:P577 ?bookPubDate ;
wdt:P179 wd:Q8337 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY ?bookYear ?filmYear
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?bookPubDate"):::projected
v1("?bookYear")
v3("?film"):::projected
v5("?filmPubDate"):::projected
v8("?filmYear")
v4("?novel"):::projected
v7("?novelYear")
a1((" "))
a2((" "))
c10(["bd:serviceParam"]):::iri
c12(["en"]):::literal
c3(["wd:Q11424"]):::iri
c8(["wd:Q8337"]):::iri
c6(["wd:Q571"]):::iri
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v3 --"wdt:P144"--> v4
v3 --"wdt:P577"--> v5
v4 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c6
v4 --"wdt:P577"--> v6
v4 --"wdt:P179"--> c8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
bind0[/"year-from-dateTime(?bookPubDate)"/]
v6 --o bind0
bind0 --as--o v7
bind1[/"year-from-dateTime(?filmPubDate)"/]
v5 --o bind1
bind1 --as--o v8