User:MartinPoulter/queries/screennation

List Screen Nation awards with numbers of winners known to Wikidata edit

#title:Screen Nation awards and their number of winners known to Wikidata
SELECT ?award ?awardLabel ?categoryLabel ?topcatLabel (COUNT(?winner) AS ?winners) WHERE {
  ?topcat wdt:P279 wd:Q7439004.
  ?category wdt:P279 ?topcat.
  ?award wdt:P31 ?category.
  OPTIONAL {?winner wdt:P166 ?award}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?award ?awardLabel ?categoryLabel ?topcatLabel
ORDER BY ?categoryLabel ?awardLabel
Screen Nation awards and their number of winners known to Wikidata

Table of winners with years and works edit

#title:Screen Nation award winners with years and work
SELECT ?winner ?winnerLabel ?awardLabel ?workLabel (YEAR(?time) AS ?year) WHERE {
  ?award wdt:P31/wdt:P279/wdt:P279 wd:Q7439004. # Screen Nation awards
  ?winner p:P166 ?s. ?s ps:P166 ?award.
  OPTIONAL {?s pq:P585 ?time}
  OPTIONAL {?s pq:P1686 ?work}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?year ?awardLabel
Screen Nation award winners with years and work

Image gallery of winners edit

#defaultView:ImageGrid
#title:Screen Nation award winners
SELECT DISTINCT ?winner ?winnerLabel (SAMPLE(?img) AS ?image) WHERE {
  ?award wdt:P31/wdt:P279/wdt:P279 wd:Q7439004. # Screen Nation awards
  ?winner wdt:P166 ?award; wdt:P18 ?img
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?winner ?winnerLabel
ORDER BY ?winnerLabel
Screen Nation award winners

Winners and their English Wikipedia articles (if they have one) edit

#title:Screen Nation award winners with English Wikipedia articles
SELECT DISTINCT ?winner ?winnerLabel ?enwp WHERE {
  ?award wdt:P31/wdt:P279/wdt:P279 wd:Q7439004. # Screen Nation awards
  ?winner wdt:P166 ?award.
  OPTIONAL {?enwp schema:about ?winner; schema:isPartOf <https://en.wikipedia.org/>}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?winnerLabel
Screen Nation award winners with English Wikipedia articles

IMDB and BFI links for winners edit

#title:Screen Nation award winners with their IMDB and BFI links
SELECT DISTINCT ?winner ?winnerLabel ?link WHERE {
  ?award wdt:P31/wdt:P279/wdt:P279 wd:Q7439004. # Screen Nation awards
  ?winner wdt:P166 ?award.
 { ?winner wdt:P345 ?imdbid. BIND(URI(CONCAT("https://www.imdb.com/name/", ?imdbid)) AS ?link) }
UNION { ?winner wdt:P4438 ?bfi_id. BIND(URI(CONCAT("https://www2.bfi.org.uk/films-tv-people/", ?bfi_id)) AS ?link) }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?winnerLabel
Screen Nation award winners with their IMDB and BFI links