query-010b6ae454f2100c6c756f39d27b3d5e
Propertiesinstance of (P31)medical condition (P1050)subclass of (P279)
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?person ?personLabel (GROUP_CONCAT(DISTINCT ?conditionLabel;SEPARATOR=', ') AS ?conditions)
WHERE
{
?person wdt:P31 wd:Q5 .
?person wdt:P1050 ?condition .
?condition wdt:P279 wd:Q12198 .
?condition rdfs:label ?conditionLabel . FILTER(LANG(?conditionLabel)='en')
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}
GROUP BY ?person ?personLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?condition")
v1("?conditionLabel"):::projected
v4("?conditions")
v2("?person"):::projected
c6(["wd:Q12198"]):::iri
c9(["bd:serviceParam"]):::iri
c3(["wd:Q5"]):::iri
c1(["en"]):::literal
f0[["?conditionLabel = 'en'"]]
f0 --> v1
v2 --"wdt:P31"--> c3
v2 --"wdt:P1050"--> v3
v3 --"wdt:P279"--> c6
v3 --"rdfs:label"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c1
end
bind2[/"?conditionLabel"/]
v1 --o bind2
bind2 --as--o v4