How can I write a WikiData SPARQL query to return the URLs of a special 
collection?

I have the following query:

  SELECT ?personLabel ?archivesatLabel WHERE {
    ?person wdt:P106 wd:Q49757;
      wdt:P135 wd:Q213457;
      wdt:P485 ?archivesat.
    SERVICE wikibase:label { bd:serviceParam wikibase:language 
"[AUTO_LANGUAGE],en". }
  }
  ORDER BY (?person)

The query finds people who are beatnik poets and have archival collections. The 
query outputs a little table such as this:

  personLabel      archivesatLabel
  Ira Cohen        Beinecke Rare 
  Tuli Kupferberg  Fales Library
  Michael McClure  University of Victoria
  Jack Kerouac     Harry Ransom Center
  Jack Kerouac     University of Victoria
  Jack Kerouac     Stuart A. Rose Manuscript
  John Wieners     University of Delaware

This is nice, but some of the artchivesat properties also point to URL's where 
the archives are described in greater detail. See, for example, the "record" 
for Ed Dorn:

  https://www.wikidata.org/wiki/Q5334756

I want these URL's returned in my query, and the result would look something 
like this:

  personLabel      archivesatLabel            describedat
  Ira Cohen        Beinecke Rare              http://foobfhdhar.edu/
  Tuli Kupferberg  Fales Library              http://fafdsasdfobar.edu/
  Michael McClure  University of Victoria     http://foasdfar.edu/
  Jack Kerouac     Harry Ransom Center        http://fossbar.edu/
  Jack Kerouac     University of Victoria     http://foobasr.edu/
  Jack Kerouac     Stuart A. Rose Manuscript  http://foobar.edu/
  John Wieners     University of Delaware     http://fasdoobar.edu/

But the following does NOT work:

  SELECT ?personLabel ?archivesatLabel ?describedat WHERE {
    ?person wdt:P106 wd:Q49757;
      wdt:P135 wd:Q213457;
      wdt:P485 ?archivesat;
      wdt:P973 ?describedat.
    SERVICE wikibase:label { bd:serviceParam wikibase:language 
"[AUTO_LANGUAGE],en". }
  }
  ORDER BY (?person)


What am I doing wrong? Do I need an additional prefix? How can I get the URLs 
associated with describedat to be included in the output?

--
Eric Morgan
University of Notre Dame

Reply via email to