Re: [CODE4LIB] wikidata sparql query

2022-03-10 Thread ross-spencer
Hi Eric, Karly's description is really nice on this. Only thing I would add to Karly and Stefano's response, is that the records seem to be described differently for different authors. I could be reading it wrong, but you also might like the derived from link too. That would look as follows:

Re: [CODE4LIB] wikidata sparql query

2022-03-09 Thread Eric Lease Morgan
On Mar 9, 2022, at 10:16 AM, Karly Wildenhaus wrote: >> How can I write a WikiData SPARQL query to return the URLs of a special >> collection? > > SELECT ?personLabel ?archivesAtLabel ?describedAt WHERE { > ?person wdt:P106 wd:Q49757; > wdt:P135 wd:Q213457; > p:P485 ?archivesStatement.

Re: [CODE4LIB] wikidata sparql query

2022-03-09 Thread Stefano Bargioni
Or even using "optional"? Bye. sb SELECT ?personLabel ?archivesAtLabel ?describedAt WHERE { ?person wdt:P106 wd:Q49757; wdt:P135 wd:Q213457; p:P485 ?archivesStatement. OPTIONAL { ?archivesStatement ps:P485 ?archivesAt; pq:P973 ?describedAt. } SERVICE wikibase:label { bd:servic

Re: [CODE4LIB] wikidata sparql query

2022-03-09 Thread Karly Wildenhaus
Hi Eric, This should work, although others with more SPARQL experience may have suggestions on how to simplify it: SELECT ?personLabel ?archivesAtLabel ?describedAt WHERE { > ?person wdt:P106 wd:Q49757; > wdt:P135 wd:Q213457; > p:P485 ?archivesStatement. > ?archivesStatement ps:P485 ?