query-bc2e071b5686aaf56cca9b171ea72d4c

rq turtle/ttl

Simple query to test if an entity bound as ?entity matches a given rule SELECT (IF(COUNT(*) > 0, true, false) as ?result) { # Replace Q77051335 with the entity you want to apply the rule for VALUES (?entity) {(wd:Q77051335)} # Paste the rule here: ?entity wdt:P31 wd:Q13442814 }

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
# Simple query to test if an entity bound as ?entity matches a given rule
SELECT (IF(COUNT(*) > 0, true, false) as ?result) {
  # Replace Q77051335 with the entity you want to apply the rule for
  VALUES (?entity) {(wd:Q77051335)} 
  # Paste the rule here:
  ?entity wdt:P31 wd:Q13442814 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?entity") v2("?result") c2(["wd:Q13442814"]):::iri bind0[/VALUES ?entity/] bind0-->v1 bind00(["wd:Q77051335"]) bind00 --> bind0 v1 --"wdt:P31"--> c2 bind2[/"if( > '0^^xsd:integer','true^^xsd:boolean','false^^xsd:boolean')"/] null --o bind2 bind2 --as--o v2