query-0a437386bea3716ad8ee0d02acceb1be
MeSH tree comparisonPREFIX rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# PREFIX xsd: http://www.w3.org/2001/XMLSchema# PREFIX owl: http://www.w3.org/2002/07/owl# PREFIX meshv: http://id.nlm.nih.gov/mesh/vocab# PREFIX mesh: http://id.nlm.nih.gov/mesh/ PREFIX mesh2024: http://id.nlm.nih.gov/mesh/2024/ PREFIX mesh2023: http://id.nlm.nih.gov/mesh/2023/ PREFIX mesh2022: http://id.nlm.nih.gov/mesh/2022/ SELECT ?d ?name ?tn FROM http://id.nlm.nih.gov/mesh WHERE { ?d meshv:treeNumber ?tn. ?d rdfs:label ?name . FILTER (regex (?tn, "D03.132")) } order by asc(?tn)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?mesh ?itemLabel ?string
WHERE
{{?item wdt:P672 ?string;
wdt:P486 ?mesh.
FILTER (STRSTARTS(?string, "D03.132"))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}}
order by asc(?string)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v3("?mesh"):::projected
v1("?string"):::projected
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["starts-with(?string,'D03.132')"]]
f0 --> v1
v2 --"wdt:P672"--> v1
v2 --"wdt:P486"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end