query-9120e36e29e5b3c148160cbc1b8eb69b
Film series: X-Men
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 wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
SELECT ?film ?ordinal ?filmLabel (SAMPLE(?duration) AS ?duration) ?imdb ((MIN(?pub)) AS ?publication) WHERE {
?film p:P179 ?series .
?series v:P179 wd:Q2006869.
?series pq:P1545 ?ordinal .
?film wdt:P345 ?imdb .
OPTIONAL {?film wdt:P2047 ?duration}
OPTIONAL {?film wdt:P577 ?pub}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
GROUP BY ?film ?filmLabel ?imdb ?ordinal
ORDER BY ASC(xsd:integer(?ordinal))
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?duration"):::projected
v2("?film"):::projected
v4("?imdb"):::projected
v1("?ordinal"):::projected
v6("?pub"):::projected
v7("?publication")
v3("?series")
c9(["bd:serviceParam"]):::iri
c11(["en"]):::literal
c3(["wd:Q2006869"]):::iri
v2 --"p:P179"--> v3
v3 --"p:statement/P179"--> c3
v3 --"p:qualifier/P1545"--> v1
v2 --"p:direct/P345"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P2047".-> v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P577".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end
bind2[/"sample(?duration)"/]
v7 --o bind2
bind2 --as--o v7
bind3[/"min(?pub)"/]
v6 --o bind3
bind3 --as--o v7