query-afbaa3477416d5c5f156e16b18c8744b

rq turtle/ttl

TODO

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?p (COUNT(*) AS ?count) WHERE {
   {
  SELECT ?p WHERE {
    ?property wikibase:propertyType wikibase:ExternalId;
              wikibase:claim ?p.
    BIND(xsd:integer(SUBSTR(STR(?property), STRLEN(STR(wd:))+2)) AS ?pNumber).
    #FILTER(0000 <= ?pNumber && ?pNumber < 4000).
  }
}
  [] ?p [].
}
GROUP BY ?p

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?count") v2("?p"):::projected v3("?pNumber") v1("?property") a1((" ")) a2((" ")) c2(["wikibase:ExternalId"]):::iri v1 --"wikibase:propertyType"--> c2 v1 --"wikibase:claim"--> v2 bind0[/"http://www.w3.org/2001/XMLSchema#integer(substring(str(?property),string-length(str('wd:')) + '+2^^xsd:integer'))"/] v1 --o bind0 bind0 --as--o v3 a1 -->v2--> a2 bind2[/"count(*)"/] bind2 --as--o v4