query-a45b5c58dd53f021c4a71d0d15c202da

rq turtle/ttl

title:Single items containing references with only P813 SELECT ?item ?id ?property ?statement ?retrieved WHERE { hint:Query hint:optimizer "None". VALUES ?item { wd:Q107331778 } ?item ?property ?statement . ?property ^ wikibase:claim [] . ?statement prov:wasDerivedFrom ?b . ?b pr:P813 ?retrieved . FILTER NOT EXISTS { ?b ?other [] . FILTER( ?other != pr:P813 && ?other != prv:P813 ) } }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prv: <http://www.wikidata.org/prop/reference/value/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
#title:Single items containing references with only P813
SELECT ?item ?id ?property ?statement ?retrieved
WHERE
{

  VALUES ?item { wd:Q107331778 }
  ?item ?property ?statement . 
  ?property ^ wikibase:claim [] .
  ?statement prov:wasDerivedFrom ?b .
  ?b pr:P813 ?retrieved . 
  FILTER NOT EXISTS { ?b ?other [] . FILTER( ?other != pr:P813 && ?other != prv:P813 ) }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?b") v3("?item"):::projected v1("?other") v4("?property"):::projected v6("?retrieved"):::projected v5("?statement"):::projected a2((" ")) a1((" ")) f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?other != 'pr:P813'?other != 'pr:value/P813'"]] e0f0 --> e0v1 e0v2 -->e0v1--> e0a1 e0v2("?b"):::projected e0v1("?other"):::projected e0a1((" ")):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> v2 f0 --> a1 f1[["?other != 'pr:P813'?other != 'pr:value/P813'"]] f1 --> v1 v2 -->v1--> a1 bind2[/VALUES ?item/] bind2-->v3 bind20(["wd:Q107331778"]) bind20 --> bind2 v3 -->v4--> v5 a2 --"wikibase:claim"--> v4 v5 --"prov:wasDerivedFrom"--> v2 v2 --"pr:P813"--> v6