query-676030622d3fce9d10c52f1b581e39d9

rq turtle/ttl

Format regex\d in general also matches digits that are not ASCII, but in the formatters it seems what is meant is ASCII. Would be good to replace all \d with [0-9]. Grouping and count currently incorrect, since some use \d others [0-9]: TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?regex (COUNT(?regex) AS ?count) (GROUP_CONCAT(?propertyLabel; separator=', ') AS ?propertyLabels) WHERE {
  ?property wikibase:propertyType wikibase:ExternalId; wdt:P1793 ?regex .
  OPTIONAL { ?property rdfs:label ?propertyLabel . FILTER(LANG(?propertyLabel) = 'en') }
} GROUP BY ?regex ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?count") v3("?property") v2("?propertyLabel"):::projected v5("?propertyLabels") v4("?regex"):::projected c3(["wikibase:ExternalId"]):::iri v3 --"wikibase:propertyType"--> c3 v3 --"wdt:P1793"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."rdfs:label".-> v2 end bind2[/"count(?regex)"/] v4 --o bind2 bind2 --as--o v5 bind3[/"?propertyLabel"/] v2 --o bind3 bind3 --as--o v5