query-35e38d92be1014cac36ba4e88c567786
Diseases of endocrinology with aliases SELECT ?item ?itemLabel ?alternative WHERE { ?item wdt:P31 wd:Q12136 . ?item wdt:P1995 wd:Q162606 . OPTIONAL { ?item skos:altLabel ?alternative . } SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } }
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Diseases of endocrinology with aliases
SELECT ?item ?itemLabel ?alternative
WHERE {
?item wdt:P31 wd:Q12136 .
?item wdt:P1995 wd:Q162606 .
OPTIONAL { ?item skos:altLabel ?alternative . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?alternative"):::projected
v1("?item"):::projected
c7(["bd:serviceParam"]):::iri
c9(["en"]):::literal
c4(["wd:Q162606"]):::iri
c2(["wd:Q12136"]):::iri
v1 --"wdt:P31"--> c2
v1 --"wdt:P1995"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."skos:altLabel".-> v2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end