query-a8f3226208b50bfd6be3d4c141043dcc

rq turtle/ttl

table of Jin Ping Mei items that have no reference SELECT DISTINCT ?item ?itemLabel ?itemDescription WHERE { # ?item is present in work (P1441) Jin Ping Mei (Q753535) ?item wdt:P1441 wd:Q753535 # ?item should not have any statement (?item ?property ?value) that has reference (?ref) FILTER NOT EXISTS {?item ?property ?value. ?value prov:wasDerivedFrom ?ref} # show label in auto language as default, and English when no default label exists SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# table of Jin Ping Mei items that have no reference
SELECT DISTINCT ?item ?itemLabel ?itemDescription
WHERE {
  # ?item is present in work (P1441) Jin Ping Mei (Q753535)
  ?item wdt:P1441 wd:Q753535
  # ?item should not have any statement (?item ?property ?value) that has reference (?ref)
  FILTER NOT EXISTS {?item ?property ?value. ?value prov:wasDerivedFrom ?ref}
  # show label in auto language as default, and English when no default label exists
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?property") v4("?ref") v3("?value") c3(["wd:Q753535"]):::iri c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 -->e0v2--> e0v3 e0v3 --"prov:wasDerivedFrom"--> e0v4 e0v1("?item"):::projected e0v2("?property"):::projected e0v4("?ref"):::projected e0v3("?value"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> v2 f0 --> v3 f0 --> c1 f0 --> v4 v1 -->v2--> v3 v3 --"prov:wasDerivedFrom"--> v4 v1 --"wdt:P1441"--> c3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end