query-2670b6c230d3db39c7531692a5cdb729
Get all items with some specific symptomsI want to get lll items that has symptoms: (Q21120251)black skin (Q86)headache (Q737460)visual impairment I tried the following, they work if I put LIMIT but not otherwise:
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?linkTo {
?item wdt:P780/wdt:P31*/wdt:P279* wd:Q737460, wd:Q86, wd:Q21120251.
SERVICE wikibase:label {bd:serviceParam wikibase:language "en" }
} LIMIT 1000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
a1((" "))
a2((" "))
c8(["bd:serviceParam"]):::iri
c6(["wd:Q21120251"]):::iri
c5(["wd:Q86"]):::iri
c10(["en"]):::literal
c4(["wd:Q737460"]):::iri
v1 --"wdt:P780"--> a1
a1 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c4
a2 --"wdt:P279"--> c5
a2 --"wdt:P279"--> c6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end