fredag 15 juli 2016

Getting award for Best director

Query URL

# Directors that have received prize for best director
SELECT DISTINCT ?item ?itemLabel ?pWikiTreeID  ?awardLabel ?time
WHERE {
    ?item wdt:P106/wdt:P279* wd:Q3455803 . # Items with the Occupation(P106) of Director(Q3455803) or a subclass(P279)
    ?item p:P166 ?awardStat .              # ... with an awarded(P166) statement
    ?awardStat ps:P166 wd:Q103360 .      # ... that has the value Academy Award for Best Director(Q103360)
    SERVICE wikibase:label {            # ... include the labels
        bd:serviceParam wikibase:language "en" .
    }

    ?awardStat pq:P805 ?award . # Get the award (which is "subject of" XXth Academy Awards)
  ?award rdfs:label ?awardLabel filter (lang(?awardLabel) = "en") . # ... and its label
  ?award wdt:P585 ?time . # the "point of time" of the Academy Award
    OPTIONAL{ ?item wdt:P2949 ?pWikiTreeID .}
    BIND (URI(CONCAT("http://www.wikitree.com/wiki/",?WikiTreeID)) AS ?WikiTreeIDf)
}
ORDER BY DESC(?time)

Inga kommentarer:

Skicka en kommentar