query-2ec7fe254916d971b3ada6da6297abb6
Countries by number of treaties signed
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#>
#defaultView:BubbleChart
SELECT ?signatory ?signatoryLabel (COUNT(?treaty) AS ?signed_count) WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?treaty wdt:P31/wdt:P279* wd:Q131569.
?treaty wdt:P1891 ?signatory.
}
GROUP BY ?signatory ?signatoryLabel
ORDER BY DESC(?signed_count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?signatory"):::projected
v4("?signed_count")
v2("?treaty"):::projected
a1((" "))
c7(["wd:Q131569"]):::iri
c2(["bd:serviceParam"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c7
v2 --"wdt:P1891"--> v3
bind1[/"count(?treaty)"/]
v2 --o bind1
bind1 --as--o v4