query-c3cc86833dd022d304d3db3c87fe2fa4

rq turtle/ttl

Tarantino's favorite films

Use at

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 ((MIN(YEAR(?publication))) AS ?year) ?film (SAMPLE(?title) AS ?title) ?filmLabel (GROUP_CONCAT(DISTINCT(?directorName);separator=", ") AS ?directors) (SAMPLE(?runtime) AS ?runtime) ?imdb (SAMPLE(?mojo) AS ?mojo) WHERE {
    VALUES ?film {wd:Q182692 wd:Q1211829 wd:Q162672 wd:Q39975 wd:Q41483 wd:Q110354 wd:Q1066714 wd:Q189505 wd:Q508163 wd:Q2663393 wd:Q541707 wd:Q47221} .
    OPTIONAL{?film wdt:P57 ?dir . ?dir rdfs:label ?directorName .  FILTER(lang(?directorName) = "en")} .
    ?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 ?film ?filmLabel ?imdb ?ordinal
ORDER BY ?year

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?dir") v2("?directorName"):::projected v10("?directors") v3("?film"):::projected v5("?imdb"):::projected v11("?mojo"):::projected v7("?publication"):::projected v11("?runtime"):::projected v10("?title"):::projected v10("?year") c12(["de"]):::literal c10(["bd:serviceParam"]):::iri bind0[/VALUES ?film/] bind0-->v3 bind00(["wd:Q182692"]) bind00 --> bind0 bind01(["wd:Q1211829"]) bind01 --> bind0 bind02(["wd:Q162672"]) bind02 --> bind0 bind03(["wd:Q39975"]) bind03 --> bind0 bind04(["wd:Q41483"]) bind04 --> bind0 bind05(["wd:Q110354"]) bind05 --> bind0 bind06(["wd:Q1066714"]) bind06 --> bind0 bind07(["wd:Q189505"]) bind07 --> bind0 bind08(["wd:Q508163"]) bind08 --> bind0 bind09(["wd:Q2663393"]) bind09 --> bind0 bind010(["wd:Q541707"]) bind010 --> bind0 bind011(["wd:Q47221"]) bind011 --> bind0 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P57".-> v4 v4 --"rdfs:label"--> v2 end v3 --"p:direct/P345"--> v5 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P1237".-> v11 end v3 --"p:direct/P577"--> v7 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P1476".-> v10 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P2047".-> v11 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end bind6[/"min(year-from-dateTime(?publication))"/] v7 --o bind6 bind6 --as--o v10 bind7[/"sample(?title)"/] v10 --o bind7 bind7 --as--o v10 bind8[/"?directorName"/] v2 --o bind8 bind8 --as--o v10 bind9[/"sample(?runtime)"/] v11 --o bind9 bind9 --as--o v11 bind10[/"sample(?mojo)"/] v11 --o bind10 bind10 --as--o v11