query-d82ced7a275abc80adfdc454f91d31c6
TODO
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:ImageGrid
SELECT DISTINCT ?item ?itemLabel ?person ?personLabel (SAMPLE(?image_) AS ?image) WHERE {
?item wdt:P5008 wd:Q117322976; # item on focus list of the LSESuffrageInterviewsProject
wdt:P31 wd:Q178651 . # item is an interview
?item p:P710 ?statement . # item has a participant statement
?statement ps:P710 ?person . # participant is ?person
?statement pq:P3831 wd:Q55534929. # qualifier object has role is interviewee
?item wdt:P921 ?person . # main subject is same as participant
OPTIONAL { ?person wdt:P18 ?image_.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?item ?itemLabel ?person ?personLabel
ORDER BY xsd:integer(STRAFTER(str(?person), 'Q'))
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?image")
v4("?image_"):::projected
v2("?item"):::projected
v1("?person"):::projected
v3("?statement")
c9(["wd:Q55534929"]):::iri
c13(["bd:serviceParam"]):::iri
c3(["wd:Q117322976"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c5(["wd:Q178651"]):::iri
v2 --"p:direct/P5008"--> c3
v2 --"p:direct/P31"--> c5
v2 --"p:P710"--> v3
v3 --"p:statement/P710"--> v1
v3 --"p:qualifier/P3831"--> c9
v2 --"p:direct/P921"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P18".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end
bind1[/"sample(?image_)"/]
v4 --o bind1
bind1 --as--o v5