Skip to content

Instantly share code, notes, and snippets.

@egonw
Created August 26, 2023 12:34
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/7e1bd41bed8be0f2045f722f660be4ae to your computer and use it in GitHub Desktop.
Save egonw/7e1bd41bed8be0f2045f722f660be4ae to your computer and use it in GitHub Desktop.
List all references for an item
PREFIX target: <http://www.wikidata.org/entity/Q76>
SELECT DISTINCT ?source ?sourceLabel WHERE {
VALUES ?refType { pr:P248 pr:P854 }
target: ?propp ?statement .
?statement prov:wasDerivedFrom ?reference .
?reference ?refType ?source .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment