query-035d419c78b9639acef9dd5d2d6a72a3

rq turtle/ttl

TODO

Use at

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#>
SELECT DISTINCT ?item ?itemLabel ?person ?personLabel ?familynameLabel ?subjectLabel 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
   filter not exists {?item wdt:P921 ?person .}        # main subject is not same as participant
   ?item wdt:P921 ?subject .         # main subject is ...
   ?subject wdt:P31 wd:Q5 .          # ...a person
   OPTIONAL { ?person wdt:P734 ?familyname }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY (?familynameLabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?familyname") v1("?familynameLabel"):::projected v2("?item"):::projected v3("?person"):::projected v4("?statement") v5("?subject") c9(["wd:Q55534929"]):::iri c13(["bd:serviceParam"]):::iri c3(["wd:Q117322976"]):::iri c10(["wd:Q5"]):::iri c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal c5(["wd:Q178651"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:direct/P921"--> e0v2 e0v1("?item"):::projected e0v2("?person"):::projected end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> v3 v2 --"p:direct/P921"--> v3 v2 --"p:direct/P5008"--> c3 v2 --"p:direct/P31"--> c5 v2 --"p:P710"--> v4 v4 --"p:statement/P710"--> v3 v4 --"p:qualifier/P3831"--> c9 v2 --"p:direct/P921"--> v5 v5 --"p:direct/P31"--> c10 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P734".-> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end