query-a140e027de1fdc29af4fbd3054a7509a

rq turtle/ttl

).User:Ash Crow (Ash Crow. Idea by on MastodonOriginally posted

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?film ?filmLabel ?awardLabel ?awardWinnerLabel WHERE {
  ?film wdt:P31 wd:Q11424;
        p:P166 ?awardStatement.
  ?awardStatement a wikibase:BestRank;
                  ps:P166 ?award.
  ?award wdt:P31 wd:Q96474699.
  MINUS { ?film wdt:P2515 ?costumeDesigner. }
  OPTIONAL {
    ?awardStatement pq:P1346 ?awardWinner.
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY STRLEN(STR(?film)) ?film

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?award") v2("?awardStatement") v5("?awardWinner") v4("?costumeDesigner") v1("?film"):::projected c7(["wd:Q96474699"]):::iri c5(["wikibase:BestRank"]):::iri c11(["bd:serviceParam"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q11424"]):::iri v1 --"p:direct/P31"--> c2 v1 --"p:P166"--> v2 v2 --"a"--> c5 v2 --"p:statement/P166"--> v3 v3 --"p:direct/P31"--> c7 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"p:direct/P2515"--> v4 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P1346".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end