query-f05311abf3cea26a80660a6b3da0682c

rq turtle/ttl

Numeric two-digit prefix of MeSH Codes for given initial letter, no P1995 SELECT DISTINCT ?item ?numeric WHERE {?item wdt:P672 ?meshcode. FILTER(STRSTARTS(?meshcode, 'C')) BIND(SUBSTR(?meshcode,2,2) as ?numeric) MINUS {?item wdt:P1995 ?spec} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ASC(?numeric)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Numeric two-digit prefix of MeSH Codes for given initial letter, no P1995
SELECT DISTINCT ?item ?numeric
   WHERE {?item wdt:P672 ?meshcode.
          FILTER(STRSTARTS(?meshcode, 'C')) 
          BIND(SUBSTR(?meshcode,2,2) as ?numeric)
         MINUS {?item wdt:P1995 ?spec}
       SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }   
          }
ORDER BY ASC(?numeric)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v2("?meshcode") v4("?numeric"):::projected v4("?spec") c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["starts-with(?meshcode,'C')"]] f0 --> v2 v3 --"wdt:P672"--> v2 bind1[/"substring(?meshcode,'2^^xsd:integer','2^^xsd:integer')"/] v2 --o bind1 bind1 --as--o v4 subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P1995"--> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end