Skip to content

Instantly share code, notes, and snippets.

@egonw
Created October 5, 2022 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egonw/a3a74be55fc297fde7e77ec979bbbfc2 to your computer and use it in GitHub Desktop.
Save egonw/a3a74be55fc297fde7e77ec979bbbfc2 to your computer and use it in GitHub Desktop.
# tool: scholia
#defaultView:Table
PREFIX target: <http://www.wikidata.org/entity/Q7160367>
SELECT
(MIN(?dates) AS ?date)
?work ?workLabel
(GROUP_CONCAT(DISTINCT ?type_label; separator=", ") AS ?type)
(GROUP_CONCAT(DISTINCT ?winner_label; separator=", ") AS ?winners)
WHERE {
VALUES ?nobel { wd:Q7191 wd:Q80061 wd:Q44585 wd:Q38104 }
?work wdt:P50 target: .
?citingArticle wdt:P2860 ?work ; wdt:P50 ?winner . ?winner wdt:P166 ?nobel .
OPTIONAL {
?winner rdfs:label ?winner_label_ . FILTER (LANG(?winner_label_) = 'en')
}
BIND(COALESCE(?winner_label_, SUBSTR(STR(?winner), 32)) AS ?winner_label)
OPTIONAL { ?work wdt:P31 ?type_ . ?type_ rdfs:label ?type_label . FILTER (LANG(?type_label) = 'en') }
?work wdt:P577 ?datetimes .
BIND(xsd:date(?datetimes) AS ?dates)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,da,de,es,fr,jp,no,ru,sv,zh". }
}
GROUP BY ?work ?workLabel
ORDER BY DESC(?date)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment