logoalt Hacker News

FelipeCorteztoday at 2:10 PM4 repliesview on HN

This is actually a good fit for a Wikidata SPARQL query you can run here https://query.wikidata.org/:

  SELECT ?work ?workLabel ?author ?authorLabel ?publicationDate ?ageAtPublication
  WHERE {
    ?author wdt:P569 ?birth .
    ?author wdt:P570 ?death .
    ?author wdt:P800 ?work .
  
    ?work wdt:P50 ?author ;
          wdt:P31 wd:Q47461344 ;
          wdt:P577 ?publicationDate .
  
    FILTER(?publicationDate <= ?death)
  
    BIND(YEAR(?publicationDate) - YEAR(?birth) AS ?ageAtPublication)
    FILTER(?ageAtPublication > 60)
  
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
  }
  ORDER BY DESC(?ageAtPublication)
  LIMIT 300

Replies

andaitoday at 8:45 PM

How can I learn more about this? I looked into it recently but didn't get very far.

This seems like the kind of thing that should be more widely known, and have some good tutorials written for it :)

carefulfungitoday at 6:06 PM

Wow - this is super cool. Thanks for sharing!

OfirMaromtoday at 6:36 PM

This is actually very awesome. Had no idea about this.

tantalortoday at 2:28 PM

Can you filter by "major works only"?

show 2 replies