query-70d6dd0edff4a0a81f03ed305eb38759

rq turtle/ttl

Film series

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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
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 ?sLabel ?ordinal ((MIN(YEAR(?publication))) AS ?year) ?film (SAMPLE(?title) AS ?title) ?filmLabel (GROUP_CONCAT(DISTINCT(?directorName);separator=", ") AS ?directors) (SAMPLE(?runtime) AS ?runtime) (SAMPLE(?imdb) AS ?imdb) (SAMPLE(?mojo) AS ?mojo) WHERE {
    VALUES ?s {wd:Q26196748 wd:Q6603742} .
    ?film p:P179 ?series . ?series v:P179 ?s . ?series pq:P1545 ?ordinal .
    OPTIONAL{?film wdt:P57 ?dir . ?dir rdfs:label ?directorName .  FILTER(lang(?directorName) = "en")} .
    OPTIONAL{?film wdt:P345 ?imdb}
    OPTIONAL{?film wdt:P1237 ?mojo} .
    ?film wdt:P577 ?publication .
    OPTIONAL{?film wdt:P1476 ?title} .
    OPTIONAL{?film wdt:P2047 ?runtime}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "de" }
}
GROUP BY ?s ?sLabel ?film ?filmLabel ?ordinal
ORDER BY ?sLabel ASC(xsd:integer(?ordinal))

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?dir") v3("?directorName"):::projected v14("?directors") v5("?film"):::projected v15("?imdb"):::projected v15("?mojo"):::projected v2("?ordinal"):::projected v10("?publication"):::projected v15("?runtime"):::projected v4("?s") v1("?sLabel"):::projected v6("?series") v14("?title"):::projected v13("?year") c15(["de"]):::literal c13(["bd:serviceParam"]):::iri bind0[/VALUES ?s/] bind0-->v4 bind00(["wd:Q26196748"]) bind00 --> bind0 bind01(["wd:Q6603742"]) bind01 --> bind0 v5 --"p:P179"--> v6 v6 --"p:statement/P179"--> v4 v6 --"p:qualifier/P1545"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P57".-> v7 v7 --"rdfs:label"--> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P345".-> v15 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P1237".-> v15 end v5 --"p:direct/P577"--> v10 subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P1476".-> v14 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P2047".-> v15 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end bind7[/"min(year-from-dateTime(?publication))"/] v10 --o bind7 bind7 --as--o v13 bind8[/"sample(?title)"/] v14 --o bind8 bind8 --as--o v14 bind9[/"?directorName"/] v3 --o bind9 bind9 --as--o v14 bind10[/"sample(?runtime)"/] v15 --o bind10 bind10 --as--o v15 bind11[/"sample(?imdb)"/] v15 --o bind11 bind11 --as--o v15 bind12[/"sample(?mojo)"/] v15 --o bind12 bind12 --as--o v15