File tree Expand file tree Collapse file tree
sparql/beta/data-management Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # prefixes
2+ PREFIX wd: <https://catalog.digital-scriptorium.org/entity/>
3+ PREFIX wds: <https://catalog.digital-scriptorium.org/entity/statement/>
4+ PREFIX wdv: <https://catalog.digital-scriptorium.org/value/>
5+ PREFIX wdt: <https://catalog.digital-scriptorium.org/prop/direct/>
6+ PREFIX p: <https://catalog.digital-scriptorium.org/prop/>
7+ PREFIX ps: <https://catalog.digital-scriptorium.org/prop/statement/>
8+ PREFIX pq: <https://catalog.digital-scriptorium.org/prop/qualifier/>
9+ PREFIX wikibase: <http://wikiba.se/ontology#>
10+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
11+
12+ SELECT (COUNT(?string) AS ?stringCount)
13+ # declared variable that will be counted and passed to another variable to display as a number
14+
15+ WHERE {
16+ ?stringStatement ps:P10 ?string .
17+ # use "as recorded" property P-value for the data you want to count
18+
19+ SERVICE wikibase:label {
20+ bd:serviceParam wikibase:language "en" .
21+ # allows English language labels to be returned for Wikibase items
22+ }
23+ }
24+ GROUP BY (?stringCount)
25+ # this sorts the results by number, and is necessary for COUNT clauses
You can’t perform that action at this time.
0 commit comments