User:MartinPoulter/queries/booker

From Wikidata
Jump to navigation Jump to search

Booker Prize winners and nominees: author-centric[edit]

#title:Booker Prize winners and nominees: authors
SELECT ?item ?itemLabel ?workLabel ?rel ?awardLabel (YEAR(?time) as ?year) WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
  {?item p:P166 ?s. ?s ps:P166 ?award BIND("won" AS ?rel). ?item wdt:P31 wd:Q5}
UNION {?item p:P1411 ?s .?s ps:P1411 ?award BIND("nominated" AS ?rel). ?item wdt:P31 wd:Q5}
  OPTIONAL {?s pq:P585 ?time}
  OPTIONAL {?s pq:P1686 ?work}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?year ?awardLabel ?rel
Booker Prize winners and nominees: authors

Before project: 165 results

Authors with multiple wins[edit]

Use this as a check on the completeness of w:List_of_winners_and_shortlisted_authors_of_the_Booker_Prize#Writers_with_multiple_awards

#title:Booker Prize: authors with multiple wins
SELECT ?item ?itemLabel (COUNT(?time) AS ?count) (GROUP_CONCAT(YEAR(?time); separator=", ") AS ?when) WHERE {
  VALUES ?award{wd:Q160082}
  ?item wdt:P31 wd:Q5.
  ?item p:P166 ?s. ?s ps:P166 ?award.
  ?s pq:P585 ?time
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?item ?itemLabel HAVING (?count > 1)
ORDER BY DESC(?count)
Booker Prize: authors with multiple wins

Authors with multiple nominations[edit]

Use this as a check on the completeness of w:List_of_winners_and_shortlisted_authors_of_the_Booker_Prize#Writers_with_multiple_nominations

#title:Booker Prize: authors nominated in multiple years
SELECT ?item ?itemLabel (COUNT(?time) AS ?count) (GROUP_CONCAT(YEAR(?time); separator=", ") AS ?when) WHERE {
  VALUES ?award{wd:Q160082}
  ?item wdt:P31 wd:Q5
  {?item p:P166 ?s. ?s ps:P166 ?award}
UNION {?item p:P1411 ?s .?s ps:P1411 ?award}
  OPTIONAL {?s pq:P585 ?time}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?item ?itemLabel HAVING (?count > 1)
ORDER BY DESC(?count)
Booker Prize: authors nominated in multiple years

Web sites and Twitter links for winners and nominees[edit]

#title:Booker Prize winners and nominees: authors web sites and social
SELECT ?item ?itemLabel ?rel ?awardLabel (YEAR(?time) as ?year) ?web (URI(CONCAT("https://twitter.com/", ?twusername)) AS ?twitter) WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
  {?item p:P166 ?s. ?s ps:P166 ?award BIND("won" AS ?rel). ?item wdt:P31 wd:Q5}
UNION{?item p:P1411 ?s. ?s ps:P1411 ?award. ?s pq:P1552 wd:Q115010579 BIND("shortlist" AS ?rel) MINUS{?book wdt:P31 wd:Q5} }
UNION{?item p:P1411 ?s. ?s ps:P1411 ?award. ?s pq:P1552 wd:Q115010563 BIND("longlist" AS ?rel) MINUS{?book wdt:P31 wd:Q5} }
  OPTIONAL {?s pq:P585 ?time}
OPTIONAL {?item wdt:P856 ?web}
OPTIONAL {?item wdt:P2002 ?twusername}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?year ?awardLabel DESC(?rel)
Booker Prize winners and nominees: authors web sites and social

Prize winners and nominees: book-centric[edit]

Before upload: 65 results for these two queries

Booker Prize winners and nominees[edit]

Includes English Wikipedia links for authors where available

#title:Booker Prize winners and nominees
SELECT ?book ?bookLabel ?authorLabel ?rel (YEAR(?time) as ?year) ?authorwp ?bookwp WHERE {
  VALUES ?award{wd:Q160082}
  {?book p:P166 ?s. ?s ps:P166 ?award BIND("won" AS ?rel). MINUS{?book wdt:P31 wd:Q5} }
  UNION{?book p:P1411 ?s. ?s ps:P1411 ?award. ?s pq:P1552 wd:Q115010579 BIND("shortlist" AS ?rel) MINUS{?book wdt:P31 wd:Q5} }
UNION{?book p:P1411 ?s. ?s ps:P1411 ?award. ?s pq:P1552 wd:Q115010563 BIND("longlist" AS ?rel) MINUS{?book wdt:P31 wd:Q5} }
OPTIONAL {?s pq:P585 ?time}
OPTIONAL {?book wdt:P629?/wdt:P50 ?author
     OPTIONAL {?authorwp schema:about ?author; schema:isPartOf <https://en.wikipedia.org/> }
         }
OPTIONAL {?bookwp schema:about ?book; schema:isPartOf <https://en.wikipedia.org/> }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?year ?awardLabel DESC(?rel)
Booker Prize winners and nominees

International Booker Prize winners and nominees[edit]

Includes English Wikipedia links for authors where available

#title:International Booker Prize winners and nominees
SELECT ?book ?bookLabel ?authorLabel ?rel (YEAR(?time) as ?year) ?authorwp ?bookwp ?orig_langLabel WHERE {
  VALUES ?award{wd:Q2052291}
  {?book p:P166 ?s. ?s ps:P166 ?award BIND("won" AS ?rel). MINUS{?book wdt:P31 wd:Q5} }
  UNION{?book p:P1411 ?s. ?s ps:P1411 ?award. ?s pq:P1552 wd:Q115010579 BIND("shortlist" AS ?rel) MINUS{?book wdt:P31 wd:Q5} }
UNION{?book p:P1411 ?s. ?s ps:P1411 ?award. ?s pq:P1552 wd:Q115010563 BIND("longlist" AS ?rel) MINUS{?book wdt:P31 wd:Q5} }
OPTIONAL {?s pq:P585 ?time}
OPTIONAL {?book wdt:P629?/wdt:P50 ?author
     OPTIONAL {?authorwp schema:about ?author; schema:isPartOf <https://en.wikipedia.org/> }
         }
OPTIONAL {?bookwp schema:about ?book; schema:isPartOf <https://en.wikipedia.org/> }
OPTIONAL {?book wdt:P407 ?orig_lang }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?year ?awardLabel DESC(?rel)
International Booker Prize winners and nominees

Booker Prize judges (full list)[edit]

#title:Booker Prize judges by year
SELECT ?judge ?judgeLabel ?roleLabel (YEAR(?time) as ?year) WHERE {
?judge p:P39 ?s. ?s ps:P39 wd:Q114836879
  OPTIONAL {?s pq:P585 ?time}
  OPTIONAL {?s pq:P2868 ?role}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?year ?roleLabel
Booker Prize judges by year

Images[edit]

Image gallery of winners and nominees[edit]

#title:Booker Prize winners and nominees, alphabetically
#defaultView:ImageGrid
SELECT DISTINCT ?item ?itemLabel ?image
WHERE {
VALUES ?award{wd:Q160082 wd:Q2052291}
?item wdt:P166|wdt:P1411 ?award. ?item wdt:P31 wd:Q5.
?item wdt:P18 ?image. 
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?itemLabel
Booker Prize winners and nominees, alphabetically

Winners and nominees lacking images[edit]

#title:Booker Prize winners and nominees lacking images
SELECT DISTINCT ?item ?itemLabel (URI(CONCAT("https://commons.wikimedia.org/wiki/Category:", ?commons)) AS ?link)
WHERE {
VALUES ?award{wd:Q160082 wd:Q2052291}
?item wdt:P166|wdt:P1411 ?award. ?item wdt:P31 wd:Q5.
MINUS {?item wdt:P18 []}
OPTIONAL {?item wdt:P373 ?commons}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?itemLabel
Booker Prize winners and nominees lacking images

Some authors have Commons categories but without images (signatures or audio files).

Timeline of winners[edit]

#title:Booker Prize winners
#defaultView:ImageGrid
SELECT DISTINCT ?item ?itemLabel (SAMPLE(?img) AS ?image) ?time ?refurl
WHERE {
?item p:P166 ?s. ?s ps:P166 wd:Q160082. ?s pq:P585 ?time.
?item wdt:P31 wd:Q5.
OPTIONAL{?item wdt:P18 ?img} 
OPTIONAL{?s prov:wasDerivedFrom/pr:P854 ?refurl FILTER(CONTAINS(STR(?refurl),"bookerprizes.com"))}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?item ?itemLabel ?time ?refurl
ORDER BY ?time
Booker Prize winners

HistropediaJS timeline of the above

Image gallery of judges[edit]

#title:Booker Prize judges
#defaultView:ImageGrid
SELECT DISTINCT ?item ?itemLabel ?image
WHERE {
?item wdt:P39 wd:Q114836879.
?item wdt:P18 ?image. 
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?itemLabel
Booker Prize judges

Judges lacking images[edit]

#title:Booker Prize judges lacking images
SELECT DISTINCT ?item ?itemLabel (URI(CONCAT("https://commons.wikimedia.org/wiki/Category:", ?commons)) AS ?link)
WHERE {
?item wdt:P39 wd:Q114836879
MINUS {?item wdt:P18 []}
OPTIONAL {?item wdt:P373 ?commons}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?itemLabel
Booker Prize judges lacking images

Wikipedia coverage[edit]

English Wikipedia articles about winners and nominees (people)[edit]

#title:English Wikipedia articles about Booker winners and nominees (people)
SELECT DISTINCT ?item ?itemLabel ?awardLabel (MAX(?rel) AS ?outcome) ?enwp WHERE {
  hint:Query hint:optimizer "None" .
  VALUES ?award{wd:Q160082 wd:Q2052291}
 { ?item wdt:P166 ?award. BIND("won" AS ?rel) }
UNION{ ?item wdt:P1411 ?award. BIND("nominated" AS ?rel) }
  ?item wdt:P31 wd:Q5.
  ?enwp schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/>
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?item ?itemLabel ?awardLabel ?enwp
ORDER BY ?itemLabel
English Wikipedia articles about Booker winners and nominees (people)

Winners and nominees (people) present on most Wikimedia projects[edit]

#title:Winners and nominees (people) present on most Wikimedia projects
SELECT DISTINCT ?item ?itemLabel ?links WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
 ?item wdt:P166|wdt:P1411 ?award.
  ?item wdt:P31 wd:Q5.
?item wikibase:sitelinks ?links FILTER(?links > 1)
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY DESC(?links)
Winners and nominees (people) present on most Wikimedia projects

Winners and nominees lacking an English Wikipedia article (people)[edit]

#title:Booker winners and nominees lacking an English Wikipedia article (people)
SELECT DISTINCT ?item ?itemLabel ?awardLabel ?rel WHERE {
  hint:Query hint:optimizer "None" .
  VALUES ?award{wd:Q160082 wd:Q2052291}
 { ?item wdt:P166 ?award. BIND("won" AS ?rel) }
UNION{ ?item wdt:P1411 ?award. BIND("nominated" AS ?rel) }
  ?item wdt:P31 wd:Q5.
 MINUS{ ?enwp schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/>}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?itemLabel
Booker winners and nominees lacking an English Wikipedia article (people)

Winners and nominees (people) lacking an English Wikipedia article but with articles in other languages[edit]

#title:Booker winners and nominees (people) not in English Wikipedia but in other Wikipedias
SELECT DISTINCT ?item ?itemLabel ?awardLabel ?rel ?langname ?wp WHERE {
  hint:Query hint:optimizer "None" .
  VALUES ?award{wd:Q160082 wd:Q2052291}
 { ?item wdt:P166 ?award. BIND("won" AS ?rel) }
UNION{ ?item wdt:P1411 ?award. BIND("nominated" AS ?rel) }
  ?item wdt:P31 wd:Q5
  MINUS{?enwp schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/>}
    ?wp schema:about ?item; schema:inLanguage ?langcode .
OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langlabel FILTER(lang(?langlabel) = "en") } # Convert short code to full language name
  BIND(COALESCE(?langlabel, ?langcode) AS ?langname)
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?itemLabel
Booker winners and nominees (people) not in English Wikipedia but in other Wikipedias

English Wikipedia articles about winners and nominees (books)[edit]

#title:English Wikipedia articles about Booker winners and nominees (books)
SELECT DISTINCT ?item ?itemLabel ?awardLabel ?rel ?enwp WHERE {
  hint:Query hint:optimizer "None" .
  VALUES ?award{wd:Q160082 wd:Q2052291}
 { ?item wdt:P166 ?award. BIND("won" AS ?rel) }
UNION{?item p:P1411 ?s. ?s ps:P1411 ?award. ?s pq:P1552 wd:Q115010579 BIND("shortlist" AS ?rel) }
UNION{?item p:P1411 ?s. ?s ps:P1411 ?award. ?s pq:P1552 wd:Q115010563 BIND("longlist" AS ?rel) }
  MINUS{?item wdt:P31 wd:Q5}
OPTIONAL { ?item wdt:P629 ?work . ?work_enwp schema:about ?work ; schema:isPartOf <https://en.wikipedia.org/> }
OPTIONAL { ?item_enwp schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/>}
BIND(COALESCE(?item_enwp, ?work_enwp) AS ?enwp)
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?itemLabel
English Wikipedia articles about Booker winners and nominees (books)

Winners and nominees (books) present on most Wikimedia projects[edit]

#title:Booker winners and nominees (books) present on most Wikimedia project
SELECT DISTINCT ?item ?itemLabel ?links WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
 ?item wdt:P166|wdt:P1411 ?award.
  MINUS{?item wdt:P31 wd:Q5}.
?item wikibase:sitelinks ?links FILTER(?links > 1)
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY DESC(?links)
Booker winners and nominees (books) present on most Wikimedia project

Winners and nominees lacking an English Wikipedia article (books)[edit]

#title:Booker Prize winners and nominees (books) lacking an English Wikipedia article
SELECT DISTINCT ?item ?itemLabel ?awardLabel ?rel (YEAR(?time) as ?year) WHERE {
  hint:Query hint:optimizer "None" .
  VALUES ?award{wd:Q160082 wd:Q2052291}
 { ?item p:P166 ?s. ?s ps:P166 ?award. ?s pq:P585 ?time. BIND("won" AS ?rel) }
#UNION{ ?item wdt:P1411 wd:Q2052291. BIND("nominated" AS ?rel) }
UNION{?item p:P1411 ?s. ?s ps:P1411 ?award. ?s pq:P1552 wd:Q115010579. ?s pq:P585 ?time. BIND("shortlist" AS ?rel) }
UNION{?item p:P1411 ?s. ?s ps:P1411 ?award. ?s pq:P1552 wd:Q115010563. ?s pq:P585 ?time. BIND("longlist" AS ?rel) }
  MINUS{?item wdt:P31 wd:Q5}
  OPTIONAL { ?item wdt:P629 ?work . ?work_enwp schema:about ?work ; schema:isPartOf <https://en.wikipedia.org/> }
OPTIONAL { ?item_enwp schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/> }
  FILTER (!BOUND(?item_enwp) && !BOUND(?work_enwp) )
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?itemLabel
Booker Prize winners and nominees (books) lacking an English Wikipedia article

Winners and nominees (books) lacking an English Wikipedia article but with articles in other languages[edit]

#title:Booker winners and nominees (book) not in English Wikipedia but in other Wikipedias
SELECT DISTINCT ?item ?itemLabel ?awardLabel ?rel ?langname ?wp WHERE {
  hint:Query hint:optimizer "None" .
  VALUES ?award{wd:Q160082 wd:Q2052291}
 { ?item wdt:P166 ?award. BIND("won" AS ?rel) }
UNION{ ?item wdt:P1411 ?award. BIND("nominated" AS ?rel) }
  MINUS{?item wdt:P31 wd:Q5}
  MINUS{?enwp schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/>}
    ?wp schema:about ?item; schema:inLanguage ?langcode .
OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langlabel FILTER(lang(?langlabel) = "en") } # Convert short code to full language name
  BIND(COALESCE(?langlabel, ?langcode) AS ?langname)
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?itemLabel
Booker winners and nominees (book) not in English Wikipedia but in other Wikipedias

Other awards[edit]

Other awards that winners (people) have won: bubble chart[edit]

#title:Other awards won by Booker winners (people)
#defaultView:BubbleChart
SELECT (COUNT(?item) AS ?count) ?otheraward ?otherawardLabel WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
  ?item wdt:P166 ?award.
#UNION{ ?item wdt:P1411 ?award. BIND("nominated" AS ?rel) }
  ?item wdt:P31 wd:Q5.
  ?item p:P166 ?s.?s ps:P166 ?otheraward FILTER(?otheraward NOT IN(wd:Q160082, wd:Q2052291))
  OPTIONAL{?s pq:P585 ?time}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?otheraward ?otherawardLabel
ORDER BY DESC(?count)
Other awards won by Booker winners (people)

Other awards that winners (people) have won; list[edit]

#title:Other awards won by Booker winners (people)
SELECT DISTINCT ?item ?itemLabel ?awardLabel ?otherawardLabel (YEAR(?time) AS ?year) WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
  ?item wdt:P166 ?award.
#UNION{ ?item wdt:P1411 ?award. BIND("nominated" AS ?rel) }
  ?item wdt:P31 wd:Q5.
  ?item p:P166 ?s.?s ps:P166 ?otheraward FILTER(?otheraward NOT IN(wd:Q160082, wd:Q2052291))
  OPTIONAL{?s pq:P585 ?time}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?itemLabel ?year
Other awards won by Booker winners (people)

Non-Booker awards that nominees (people) have won: bubble chart[edit]

#title:Other awards won by Booker nominees (people)
#defaultView:BubbleChart
SELECT (COUNT(?item) AS ?count) ?otheraward ?otherawardLabel WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
  ?item wdt:P1411|wdt:P166 ?award.
  ?item wdt:P31 wd:Q5.
  ?item p:P166 ?s.?s ps:P166 ?otheraward FILTER(?otheraward NOT IN(wd:Q160082, wd:Q2052291))
  OPTIONAL{?s pq:P585 ?time}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?otheraward ?otherawardLabel
ORDER BY DESC(?count)
Other awards won by Booker nominees (people)

Non-Booker awards that nominees (people) have won; list[edit]

#title:Other awards won by Booker nominees (people)
SELECT DISTINCT ?item ?itemLabel ?awardLabel ?otherawardLabel (YEAR(?time) AS ?year) WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
  ?item wdt:P1411|wdt:P166 ?award. 
  ?item wdt:P31 wd:Q5.
  ?item p:P166 ?s.?s ps:P166 ?otheraward FILTER(?otheraward NOT IN(wd:Q160082, wd:Q2052291))
  OPTIONAL{?s pq:P585 ?time}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?itemLabel ?year
Other awards won by Booker nominees (people)

Gender balance of literary awards[edit]

Percentage women for some literary awards[edit]

Note: this query excludes some people who are neither men nor women, that I'm not sure how to query for

#defaultView:BarChart
#title:Gender balance (%age women) for literary awards
SELECT  ?award ?awardLabel (ROUND(?women * 1000/(?men + ?women) )/ 10 AS ?percent) WHERE {
{  SELECT (COUNT(?recipient_male) AS ?men) (COUNT(?recipient_female) AS ?women) ?award WHERE {
    ?award wdt:P31 wd:Q378427 .
    { 
      ?recipient_male wdt:P166 ?award .
      ?recipient_male wdt:P21 wd:Q6581097 .
    }
    UNION 
    {
      ?recipient_female wdt:P166 ?award .
      ?recipient_female wdt:P21 wd:Q6581072 .
    }  
  }
  GROUP BY ?award HAVING(?men + ?women > 50)
           }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?percent
Gender balance (%age women) for literary awards

Identifiers[edit]

Count of identifier types[edit]

#title:Identifier coverage for Booker authors (winners and nominees)
SELECT ?idLabel ?idDescription (round(COUNT(DISTINCT ?item)*1000/?total)/10 AS ?percent)
WITH {
  SELECT DISTINCT ?item WHERE {
    VALUES ?award{wd:Q160082 wd:Q2052291}
?item wdt:P166|wdt:P1411 ?award.
    ?item wdt:P31 wd:Q5.
  }
} AS %subquery
WITH { SELECT (COUNT(?item) AS ?total) WHERE {
  INCLUDE %subquery }
  } AS %total
  WHERE {
  INCLUDE %subquery .
  INCLUDE %total .
  ?id wikibase:propertyType wikibase:ExternalId; wikibase:claim ?p; wikibase:statementProperty ?ps; wdt:P31/wdt:P279* wd:Q19595382.
  ?item ?p [ ?ps ?value ] .
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?total ?idLabel ?idDescription
ORDER BY DESC(?percent)
Identifier coverage for Booker authors (winners and nominees)

All identifiers for people[edit]

#title:Identifiers for Booker-nominated and -winning authors
SELECT DISTINCT ?item ?itemLabel ?idLabel ?value WITH {
  SELECT DISTINCT ?item WHERE {
    VALUES ?award{wd:Q160082 wd:Q2052291}
?item wdt:P166|wdt:P1411 ?award.
    ?item wdt:P31 wd:Q5.
  }
} AS %subquery WHERE {
  INCLUDE %subquery .
  ?id wikibase:propertyType wikibase:ExternalId; wikibase:claim ?p; wikibase:statementProperty ?ps; wdt:P31/wdt:P279* wd:Q19595382.
  ?item ?p [ ?ps ?value ] .
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?itemLabel ?idLabel
Identifiers for Booker-nominated and -winning authors

Error checking[edit]

Booker Prize winners or nominees that don't specify a work[edit]

#title:Booker Prize statements with no "for work" qualifier
SELECT ?item ?itemLabel ?awardLabel WHERE {
  VALUES ?award{wd:Q160082}
?item p:P166|p:P1411 ?s. ?s ps:P166|ps:P1411 ?award .
 ?item wdt:P31 wd:Q5 .
MINUS{ ?s pq:P1686 []} 
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} 
ORDER BY ?itemLabel
Booker Prize statements with no "for work" qualifier

Should give no results ✓ Done

Authors winning or nominated "for work" where the book is not shown as winning or nominated[edit]

#title:Winners or nominated "for work" when the work is not shown as winning or nominated
SELECT ?item ?itemLabel ?workLabel ?awardLabel WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
?item p:P166|p:P1411 ?s. ?s ps:P166|ps:P1411 ?award .
 ?item wdt:P31 wd:Q5 .
 ?s pq:P1686 ?work .
MINUS {?work wdt:P166|wdt:P1411 ?award}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} 
ORDER BY ?itemLabel
Winners or nominated "for work" when the work is not shown as winning or nominated

Should give no results ✓ Done

Books winning or nominated when the author is not shown as winning or nominated[edit]

#title:Books winning or nominated when the author is not shown as winning or nominated
SELECT ?item ?itemLabel ?awardLabel ?authorLabel WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
?item p:P166|p:P1411 ?s. ?s ps:P166|ps:P1411 ?award .
MINUS{ ?item wdt:P31 wd:Q5 }
?item wdt:P50 ?author .
MINUS {?author wdt:P166|wdt:P1411 ?award}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} 
ORDER BY ?itemLabel
Books winning or nominated when the author is not shown as winning or nominated

Should give no results ✓ Done

Statements with multiple point-in-time qualifiers[edit]

#title:Booker Prize statements with multiple point-in-time qualifiers
SELECT ?item ?itemLabel ?awardLabel ?time1 (MIN(?time2) AS ?othertime) WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
?item p:P166|p:P1411 ?s. ?s ps:P166|ps:P1411 ?award .
  ?s pq:P585 ?time1. ?s pq:P585 ?time2 FILTER(?time1 > ?time2)
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?item ?itemLabel ?awardLabel ?time1
ORDER BY ?itemLabel
Booker Prize statements with multiple point-in-time qualifiers

Should give no results ✓ Done

Statements with no point-in-time qualifiers[edit]

#title:Booker Prize statements with no point-in-time qualifiers
SELECT ?item ?itemLabel ?awardLabel WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
?item p:P166|p:P1411 ?s. ?s ps:P166|ps:P1411 ?award .
MINUS{ ?s pq:P585 []} 
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} 
ORDER BY ?itemLabel
Booker Prize statements with no point-in-time qualifiers

Should give no results ✓ Done

Statements without references[edit]

#title:Booker Prize statements with no references
SELECT ?item ?itemLabel ?awardLabel WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
?item p:P166|p:P1411 ?s. ?s ps:P166|ps:P1411 ?award .
MINUS{?s prov:wasDerivedFrom/pr:P854 ?refurl FILTER(CONTAINS(STR(?refurl),"bookerprizes.com"))} 
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} 
ORDER BY ?itemLabel
Booker Prize statements with no references

Should give no results

Nomination statements that don't specify longlist or shortlist[edit]

#title:Booker Prize nominations that don't specify longlist or shortlist
SELECT ?item ?itemLabel ?awardLabel ?time1 WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
?item p:P1411 ?s. ?s ps:P1411 ?award .
  ?s pq:P585 ?time1. FILTER (?award = wd:Q160082|| YEAR(?time1) > 2014)
  MINUS {?s pq:P1552 []}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?itemLabel
Booker Prize nominations that don't specify longlist or shortlist

Should give no results ✓ Done

Winners that are also shown as nominated[edit]

#title:Booker Prize winners that are also shown as nominated
SELECT ?item ?itemLabel ?awardLabel WHERE {
  VALUES ?award{wd:Q160082 wd:Q2052291}
{
  ?item wdt:P1411 ?award . ?item wdt:P166 ?award. MINUS {?item wdt:P31 wd:Q5}
}
  UNION {?item p:P1411 ?s1. ?s1 ps:P1411 ?award.  
         ?item p:P166 ?s2. ?s2 ps:P166 ?award.
         { ?s2 pq:P1686 ?work. ?s1 pq:P1686 ?work} UNION { ?s2 pq:P585 ?date. ?s1 pq:P585 ?date  }
        }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?itemLabel
Booker Prize winners that are also shown as nominated

Should give no results ✓ Done

Other queries[edit]