query-df9bb29288fddf2a99f5c3b610407ee8
PropertiesDisease Ontology ID (P699)MeSH descriptor ID (P486)instance of (P31)subclass of (P279)
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?language (COUNT (?label) AS ?count)
WHERE {
{
SELECT DISTINCT ?item WHERE {
{ ?item wdt:P699 ?DO_ID .}
UNION
{ ?item wdt:P486 ?MeSH_Descriptor_ID .}
UNION
{ ?item wdt:P31*/wdt:P279* wd:Q11190 }
UNION {
?item wdt:P31*/wdt:P279* wd:Q12136 .
}
UNION {
?item wdt:P31*/wdt:P279* wd:Q796194 .
}
UNION {
?item wdt:P31*/wdt:P279* wd:Q12140 .
}
}
LIMIT 100000
} ?item rdfs:label ?label.
BIND(LANG(?label) AS ?language)
}
GROUP BY ?language
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?DO_ID")
v4("?MeSH_Descriptor_ID")
v7("?count")
v2("?item")
v5("?label"):::projected
v6("?language"):::projected
a1((" "))
a2((" "))
a3((" "))
a4((" "))
c8(["wd:Q12140"]):::iri
c7(["wd:Q796194"]):::iri
c5(["wd:Q11190"]):::iri
c6(["wd:Q12136"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
subgraph union4[" Union "]
subgraph union4l[" "]
style union4l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> a4
a4 --"wdt:P279"--> c8
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> a3
a3 --"wdt:P279"--> c7
end
union4r <== or ==> union4l
end
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c6
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P486"--> v4
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P699"--> v3
end
union0r <== or ==> union0l
end
v2 --"rdfs:label"--> v5
bind0[/"?label"/]
v5 --o bind0
bind0 --as--o v6
bind2[/"count(?label)"/]
v5 --o bind2
bind2 --as--o v7