query-4b73a10773acd6e795918fe4cd8b4f9b
PropertiesROR ID (P6782)part of (P361)instance of (P31)
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 (count(*) as ?cnt) (sum(?org_cnt) as ?tot) WHERE {
SELECT ?org (count(*) as ?org_cnt)
WHERE {
?org wdt:P6782 ?ror_id.
?sub wdt:P361 ?org.
# ?dept wdt:P31 wd:Q2467461.
# SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} group by ?org #order by desc(?org_cnt)
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?cnt")
v1("?org")
v4("?org_cnt"):::projected
v2("?ror_id")
v3("?sub")
v6("?tot")
v1 --"wdt:P6782"--> v2
v3 --"wdt:P361"--> v1
bind1[/"count(*)"/]
bind1 --as--o v4
bind4[/"count(*)"/]
bind4 --as--o v5
bind5[/"sum(?org_cnt)"/]
v4 --o bind5
bind5 --as--o v6