query-e8cedc0595a217fc15c8eb1a9a1528ed
List of all NARA record groups by series count (with RG number and title)
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?rg ?series WHERE {
?record_group wdt:P6224 wd:Q59294700;
wdt:P195 wd:Q518155;
wdt:P6759 ?rg_number;
wdt:P1436 ?series.
?record_group rdfs:label ?record_groupLabel.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
BIND(SUBSTR(STR(?record_group), 32 ) AS ?Qid)
BIND(CONCAT("Record Group ", ?rg_number, ": ", ?record_groupLabel) AS ?rg)
}
ORDER BY DESC(xsd:integer(?series))
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?Qid")
v2("?record_group")
v4("?record_groupLabel")
v6("?rg"):::projected
v3("?rg_number")
v1("?series"):::projected
c9(["bd:serviceParam"]):::iri
c2(["wd:Q59294700"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c4(["wd:Q518155"]):::iri
v2 --"wdt:P6224"--> c2
v2 --"wdt:P195"--> c4
v2 --"wdt:P6759"--> v3
v2 --"wdt:P1436"--> v1
v2 --"rdfs:label"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end
bind0[/"substring(str(?record_group),'32^^xsd:integer')"/]
v2 --o bind0
bind0 --as--o v5
bind1[/"concat('Record Group ',?rg_number,': ',?record_groupLabel)"/]
v3 --o bind1
v4 --o bind1
bind1 --as--o v6