query-756eb009fed48697323696c7b7b619f0

rq turtle/ttl

Items with P486 and "cancer" in the label, D-numbers SELECT ?item ?label ?mesh WHERE {?item wdt:P486 ?mesh. ?item rdfs:label ?label. FILTER((strstarts(?mesh, "D"))) FILTER((LANG(?label)) = "en") FILTER(CONTAINS(?label, "cancer"))
}

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#Items with P486 and "cancer" in the label, D-numbers
SELECT ?item ?label ?mesh
  WHERE {?item wdt:P486 ?mesh.
         ?item rdfs:label ?label.
         FILTER((strstarts(?mesh, "D")))
         FILTER((LANG(?label)) = "en")
         FILTER(CONTAINS(?label, "cancer"))               
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v1("?label"):::projected v2("?mesh"):::projected f0[["contains(?label,'cancer')"]] f0 --> v1 f1[["?label = 'en'"]] f1 --> v1 f2[["starts-with(?mesh,'D')"]] f2 --> v2 v3 --"wdt:P486"--> v2 v3 --"rdfs:label"--> v1