query-7c3a02da8610a235d4aace641ff10e30
Films
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX target: <http://www.wikidata.org/entity/Q294647>
SELECT
(xsd:date(?release_datetime) AS ?release_date)
?film ?filmLabel
(CONCAT("#film/", SUBSTR(STR(?film), 32)) AS ?filmUrl)
?filmDescription
WHERE {
{
SELECT
(MIN(?release_datetimes) AS ?release_datetime)
?film
WHERE {
?film wdt:P161 target: .
OPTIONAL {
?film wdt:P577 ?release_datetimes .
}
}
GROUP BY ?film
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?release_date)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?film"):::projected
v5("?filmUrl")
v5("?release_date")
v4("?release_datetime"):::projected
v3("?release_datetimes")
c5(["bd:serviceParam"]):::iri
c2([http://www.wikidata.org/entity/Q294647]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P161"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P577".-> v3
end
bind1[/"min(?release_datetimes)"/]
v3 --o bind1
bind1 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end
bind2[/"http://www.w3.org/2001/XMLSchema#date(?release_datetime)"/]
v4 --o bind2
bind2 --as--o v5
bind3[/"concat('#film/',substring(str(?film),'32^^xsd:integer'))"/]
v2 --o bind3
bind3 --as--o v5