query-8cd44256b4982620c6f341c2baadef63

rq turtle/ttl

Sample query to find P1995 from MeSH Codes SELECT DISTINCT ?item WHERE {?item wdt:P672 ?meshcode. FILTER(STRSTARTS(?meshcode, 'C22')) MINUS {?item wdt:P1995 ?spec} 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 bd: <http://www.bigdata.com/rdf#>
#Sample query to find P1995 from MeSH Codes
SELECT DISTINCT ?item 
   WHERE {?item wdt:P672 ?meshcode.
          FILTER(STRSTARTS(?meshcode, 'C22')) 
         MINUS {?item wdt:P1995 ?spec}
       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; v2("?item"):::projected v1("?meshcode") v3("?spec") c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["starts-with(?meshcode,'C22')"]] f0 --> v1 v2 --"wdt:P672"--> v1 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v2 --"wdt:P1995"--> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end