query-b26661ebdc4f5c89dcc78cb717719ddc

rq turtle/ttl

TV series episodes list by series ordinal (not season) SELECT ?showLabel ?seriesLabel ?seriesOrdinal WHERE { BIND(wd:Q15711398 AS ?show) ?series wdt:P179 ?show. ?series p:P179 :b0. :b0 pq:P1545 ?seriesOrdinal. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY xsd:integer(?seriesOrdinal)

Use at

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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#TV series episodes list by series ordinal (not season)
SELECT ?showLabel ?seriesLabel ?seriesOrdinal WHERE {
  BIND(wd:Q15711398 AS ?show)
  ?series wdt:P179 ?show.
  ?series p:P179 _:b0.
  _:b0 pq:P1545 ?seriesOrdinal.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY xsd:integer(?seriesOrdinal)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?series") v1("?seriesOrdinal"):::projected v2("?show") a1((" ")) c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal bind0[/"'wd:Q15711398'"/] bind0 --as--o v2 v3 --"p:direct/P179"--> v2 v3 --"p:P179"--> a1 a1 --"p:qualifier/P1545"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end