query-f7fc9b2110b591c17ea751ce245097ae
PropertiesDisease Ontology ID (P699)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?doid ?itemLabel (group_concat(distinct ?itemaltLabel; separator="|") as ?altLabel) ?itemDesc WHERE {
?item wdt:P699 ?doid .
values ?doid {"DOID:0050602" "DOID:0060308" "DOID:0060728" "DOID:10595" "DOID:11589" "DOID:2476" "DOID:5212"}
OPTIONAL{
?item skos:altLabel ?itemaltLabel .
FILTER(LANG(?itemaltLabel) = "en")
?item schema:description ?itemDesc .
FILTER(LANG(?itemDesc) = "en")
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
group by ?item ?doid ?itemLabel ?itemDesc
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?altLabel")
v5("?doid"):::projected
v3("?item"):::projected
v2("?itemDesc"):::projected
v1("?itemaltLabel"):::projected
c6(["bd:serviceParam"]):::iri
c1(["en"]):::literal
v3 --"wdt:P699"--> v5
bind0[/VALUES ?doid/]
bind0-->v5
bind00(["DOID:0050602"])
bind00 --> bind0
bind01(["DOID:0060308"])
bind01 --> bind0
bind02(["DOID:0060728"])
bind02 --> bind0
bind03(["DOID:10595"])
bind03 --> bind0
bind04(["DOID:11589"])
bind04 --> bind0
bind05(["DOID:2476"])
bind05 --> bind0
bind06(["DOID:5212"])
bind06 --> bind0
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."skos:altLabel".-> v1
v3 --"schema:description"--> v2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c1
end
bind2[/"?itemaltLabel"/]
v1 --o bind2
bind2 --as--o v5