query-c426fca94a1622957cc5310f4740e4a5

rq turtle/ttl

title:count of Italian external IDs for Mathematica Italiana person ID people grouped by number of IDs Select ?ID_count (count(?item) as ?item_count) where { SELECT ?item (count(?id) as ?ID_count) WHERE { ?item wdt:P9114 ?P9114id . OPTIONAL { ?item ?prop ?id. ?propItem wikibase:directClaim ?prop. ?propItem wikibase:propertyType wikibase:ExternalId. ?propItem wdt:P17 wd:Q38.} } group by ?item } group by ?ID_count order by desc(?ID_count)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
#title:count of Italian external IDs for Mathematica Italiana person ID people grouped by number of IDs
Select ?ID_count (count(?item) as ?item_count) where { 
  SELECT ?item (count(?id) as ?ID_count) WHERE {
    ?item wdt:P9114 ?P9114id .
    OPTIONAL { 
      ?item ?prop ?id.
      ?propItem wikibase:directClaim ?prop.
      ?propItem wikibase:propertyType wikibase:ExternalId.
      ?propItem wdt:P17 wd:Q38.}
    } group by ?item
} group by ?ID_count order by desc(?ID_count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?ID_count"):::projected v3("?P9114id") v5("?id") v2("?item"):::projected v7("?item_count") v4("?prop") v6("?propItem") c6(["wd:Q38"]):::iri c4(["wikibase:ExternalId"]):::iri v2 --"wdt:P9114"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -->v4--> v5 v6 -."wikibase:directClaim".-> v4 v6 --"wikibase:propertyType"--> c4 v6 --"wdt:P17"--> c6 end bind1[/"count(?id)"/] v5 --o bind1 bind1 --as--o v7 bind3[/"count(?item)"/] v2 --o bind3 bind3 --as--o v7