query-31f5f509ec3c4e1eec6b7044887eab82

rq turtle/ttl

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

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#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

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?award") v6("?bfi_id") v4("?imdbid") v7("?link"):::projected v3("?winner"):::projected v1("?winnerLabel"):::projected a1((" ")) a2((" ")) c8(["bd:serviceParam"]):::iri c3(["wd:Q7439004"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> a2 a2 --"wdt:P279"--> c3 v3 --"wdt:P166"--> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P4438"--> v6 bind0[/"concat('https://www2.bfi.org.uk/films-tv-people/',?bfi_id)"/] v6 --o bind0 bind0 --as--o v7 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P345"--> v4 bind1[/"concat('https://www.imdb.com/name/',?imdbid)"/] v4 --o bind1 bind1 --as--o v7 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end