Skip to content

Instantly share code, notes, and snippets.

@egonw
Created December 29, 2023 18:14
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/0efbd714085f3f387b249ae0abf2d265 to your computer and use it in GitHub Desktop.
Save egonw/0efbd714085f3f387b249ae0abf2d265 to your computer and use it in GitHub Desktop.
Wikidata statements with a retracted article as reference
SELECT DISTINCT ?entity ?entityLabel ?propertyLabel ?valueLabel ?retracted ?retractedLabel WITH {
SELECT DISTINCT ?entity ?p ?statement ?retracted WHERE {
?retracted wdt:P31 wd:Q45182324 .
?entity ?p ?statement .
?statement prov:wasDerivedFrom / pr:P248 ?retracted .
}
} AS %STATEMENTS WHERE {
INCLUDE %STATEMENTS
?p ^wikibase:claim ?property .
?statement ?ps ?value .
?ps ^wikibase:statementProperty ?property .
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