query-6a387f134876eb96929e712129b60ba1

rq turtle/ttl

MeSH descriptor ID (P486) without health specialty (P1995) value. (P1995)health specialty -marked diseases not yet given a (P486)MeSH descriptor ID This bubble chart shows the main prefixes to be D00, D01, C53, D02, C56 in the

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Diseases without "medical speciality", prefix of MeSH ID
#defaultView:BubbleChart

SELECT ?code ?codeLabel ?count
WHERE 
{
  {
    SELECT ?code (COUNT(?item) AS ?count)    
WHERE {
        ?item wdt:P31 wd:Q12136 .
        ?item wdt:P486 ?meshid  .
        OPTIONAL { ?item wdt:P1995 ?dummy0 }
         FILTER(!bound(?dummy0))
        BIND(SUBSTR(?meshid,1,3) AS ?code)
        }
  GROUP BY ?code 
  }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY DESC(?count)
LIMIT 100

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?code"):::projected v6("?count"):::projected v2("?dummy0") v3("?item") v4("?meshid") c6(["bd:serviceParam"]):::iri c8(["en"]):::literal c2(["wd:Q12136"]):::iri f0[["not bound(?dummy0)"]] f0 --> v2 v3 --"wdt:P31"--> c2 v3 --"wdt:P486"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P1995".-> v2 end bind1[/"substring(?meshid,'1^^xsd:integer','3^^xsd:integer')"/] v4 --o bind1 bind1 --as--o v5 bind3[/"count(?item)"/] v3 --o bind3 bind3 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end