query-9dcfc2d43f1fe332ce715c42d17952d0

rq turtle/ttl

recursive to include e.g. films named after the James Cameron film, or in case there is a separate “Titanic” disaster item named after the ship; this is somewhat risky but at the time of writing, the results looked fine (in fact it made no difference at all).(P138)named after I made

Use at

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#>
#defaultView:Timeline
SELECT ?film ?filmLabel (MIN(?published_) AS ?published) WHERE {
  ?film wdt:P31/wdt:P279* wd:Q11424;
        wdt:P138+ wd:Q25173;
        wdt:P577 ?published_.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?film ?filmLabel # use the earliest publication date in case a film has multiple publication dates, e.g. in different markets

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?film"):::projected v3("?published") v2("?published_"):::projected a1((" ")) c8(["bd:serviceParam"]):::iri c5(["wd:Q25173"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal c3(["wd:Q11424"]):::iri v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v1 --"wdt:P138"--> c5 v1 --"wdt:P577"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end bind1[/"min(?published_)"/] v2 --o bind1 bind1 --as--o v3