query-54e38c59263cca05f50b59925ffc56cc
TODO
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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
#defaultView:LineChart
SELECT ?count (COUNT(?entity) AS ?entities) WHERE {
{
SELECT ?entity (COUNT(DISTINCT(?property)) as ?count) WHERE {
?entity wdt:P31 wd:Q7889.
OPTIONAL {
?property rdf:type wikibase:Property;
wikibase:propertyType wikibase:ExternalId;
(wdt:P31/(wdt:P279*)) wd:Q28147643;
wikibase:directClaim ?wdt .
?entity ?wdt [] .
}
}
GROUP BY ?entity
}}
GROUP BY ?count
ORDER BY ?count
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count"):::projected
v5("?entities")
v2("?entity"):::projected
v3("?property")
v4("?wdt")
a2((" "))
a1((" "))
c4(["wikibase:Property"]):::iri
c2(["wd:Q7889"]):::iri
c8(["wd:Q28147643"]):::iri
c6(["wikibase:ExternalId"]):::iri
v2 --"wdt:P31"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."a".-> c4
v3 --"wikibase:propertyType"--> c6
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c8
v3 --"wikibase:directClaim"--> v4
v2 -->v4--> a2
end
bind1[/"count(?property)"/]
v3 --o bind1
bind1 --as--o v5
bind3[/"count(?entity)"/]
v2 --o bind3
bind3 --as--o v5