query-2b97fcd5e95549713b986acf6482e531

rq turtle/ttl

title:Property removal for QuickStatements SELECT (CONCAT("-",?itemId,",","P7859",",^",?id,"^") as ?command) WHERE { ?item p:P7859 [ ps:P7859 ?id ; prov:wasDerivedFrom [ pr:P214 ?viaf ] ] . MINUS { ?item wdt:P214 ?viaf } . BIND(REPLACE(STR(?item), "http://www.wikidata.org/entity/","") AS ?itemId) } LIMIT 2000

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
#title:Property removal for QuickStatements
SELECT (CONCAT("-",?itemId,",","P7859",",^",?id,"^") as ?command)
WHERE {
  ?item p:P7859 [ ps:P7859 ?id ; prov:wasDerivedFrom [ pr:P214 ?viaf ] ] .
  MINUS { ?item wdt:P214 ?viaf } .
  BIND(REPLACE(STR(?item), "http://www.wikidata.org/entity/","") AS ?itemId)
}
LIMIT 2000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?command") v1("?id"):::projected v3("?item") v4("?itemId"):::projected v2("?viaf") a1((" ")) a2((" ")) a1 --"p:statement/P7859"--> v1 a2 --"p:reference/P214"--> v2 a1 --"prov:wasDerivedFrom"--> a2 v3 --"p:P7859"--> a1 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v3 --"p:direct/P214"--> v2 end bind1[/"replace(str(?item),'http://www.wikidata.org/entity/','')"/] v3 --o bind1 bind1 --as--o v4 bind2[/"concat('-',?itemId,',','P7859',',^',?id,'^')"/] v4 --o bind2 v1 --o bind2 bind2 --as--o v5