query-4e8efe0730e2fd380945ddeb70d36ac9
20:48, 3 June 2018 (UTC)) talk (InfovariusHow to overcome this? (I expect very little results actually) --Oh, I don't know how did you get this number but really the result is huge, I didn't expected. Even there are >50 pairs in Africa (I was looking for Brazzavile): 21:18, 3 June 2018 (UTC)) talk (Tagishsimon410,759 results (comment out the wikibase:label line). Drop labels or make selects more granular - by continent, etc. --
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 DISTINCT ?item1 ?item1Label ?item2 ?item2Label WHERE {
?item1 (wdt:P31/wdt:P279*) wd:Q515.
?item2 (wdt:P31/wdt:P279*) wd:Q515.
?item1 wdt:P47 ?item2.
?item1 wdt:P17 ?state.
?state wdt:P30 wd:Q15.
SERVICE wikibase:label { bd:serviceParam wikibase:language "ru,[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item1"):::projected
v2("?item2"):::projected
v3("?state")
a1((" "))
a2((" "))
c9(["bd:serviceParam"]):::iri
c11(["ru,#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q515"]):::iri
c7(["wd:Q15"]):::iri
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v2 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c3
v1 --"wdt:P47"--> v2
v1 --"wdt:P17"--> v3
v3 --"wdt:P30"--> c7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end