query-8eeaea7aa7148c88bd9c6dfe15ae4964
Titled player count missmatch Out of curiosity I queried for the number of GMs per country.
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 ?countryLabel (COUNT(DISTINCT ?gm) AS ?gms) WHERE {
?gm wdt:P2962 wd:Q105269.
?gm wdt:P1532 ?country.
FILTER EXISTS {?gm wdt:P1440 ?fide}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?countryLabel
ORDER BY DESC(?gms)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?country")
v3("?fide")
v2("?gm"):::projected
v5("?gms")
c6(["bd:serviceParam"]):::iri
c3(["wd:Q105269"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[[" "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P1440"--> e0v2
e0v2("?fide"):::projected
e0v1("?gm"):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
v2 --"wdt:P1440"--> v3
v2 --"wdt:P2962"--> c3
v2 --"wdt:P1532"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind2[/"count(?gm)"/]
v2 --o bind2
bind2 --as--o v5