query-cd3c9bec7ad6cf4fc29f6c7b02cdd1fd
Wikidata items for Massachusetts state legislators that include
references to the Massachusetts Legislative Biography File
compiled by Caleb Tillinghast and Edmund Thomas
in the collection of the Massachusetts State Library
SELECT ?item ?itemLabel ?sourceLabel ?inventory_num ?propertyLabel WHERE { VALUES ?source { wd:Q107290461 } # source of reference ?item ?p ?stmt . ?stmt prov:wasDerivedFrom [ pr:P248 ?source ; # stated in pr:P217 ?inventory_num ] . ?property wikibase:claim ?p . # what property is the reference on SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY ?inventory_num
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Wikidata items for Massachusetts state legislators that include
# references to the Massachusetts Legislative Biography File
# compiled by Caleb Tillinghast and Edmund Thomas
# in the collection of the Massachusetts State Library
SELECT ?item ?itemLabel ?sourceLabel ?inventory_num ?propertyLabel WHERE {
VALUES ?source { wd:Q107290461 } # source of reference
?item ?p ?stmt .
?stmt prov:wasDerivedFrom [
pr:P248 ?source ; # stated in
pr:P217 ?inventory_num
] .
?property wikibase:claim ?p . # what property is the reference on
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?inventory_num
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?inventory_num"):::projected
v3("?item"):::projected
v4("?p")
v6("?property")
v2("?source")
v5("?stmt")
a1((" "))
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?source/]
bind0-->v2
bind00(["wd:Q107290461"])
bind00 --> bind0
v3 -->v4--> v5
a1 --"pr:P248"--> v2
a1 --"pr:P217"--> v1
v5 --"prov:wasDerivedFrom"--> a1
v6 --"wikibase:claim"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end