586
edits
Line 335: | Line 335: | ||
} | } | ||
ORDER BY ?q1_q8_interaction ?personLabel | ORDER BY ?q1_q8_interaction ?personLabel | ||
</sparql> | |||
=== RAI members who didn't interact with RAI [in Q29 or Q35] apart from record of election === | |||
<sparql tryit="1"> | |||
#title: RAIs with no record of interacting with RAI in Q29/Q35 | |||
# only active engagements like spoke at, corresponded with, etc, and excluding P67 "was member of" | |||
# WIP: to update with other RAI records as I work through queries for them. Plus caveat that there may be other sources of interaction not recorded in the database. | |||
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/> | |||
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/> | |||
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/> | |||
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/> | |||
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/> | |||
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | |||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | |||
PREFIX wdt: <http://www.wikidata.org/prop/direct/> | |||
PREFIX wd: <http://www.wikidata.org/entity/> | |||
SELECT distinct ?person ?personLabel | |||
(if(bound(?rai), "yes", "no") as ?interaction) | |||
WHERE { | |||
?person bnwdt:P3 bnwd:Q3 . # women | |||
?person bnwdt:P7 ?rai_elected . | |||
# optional query RAIs who do have record of interaction. | |||
optional { | |||
?person ?p ?s . | |||
?prop wikibase:claim ?p; | |||
wikibase:statementProperty ?ps. | |||
# union query to get both q8 and q1 but *drop* member of p67. a couple of rogue P75 # to get both q35 and q29 | |||
{ ?s ?ps bnwd:Q35 . filter not exists { ?s (bnps:P67|bnps:P75) ?member . } } | |||
union | |||
{ ?s ?ps bnwd:Q29 . } | |||
?s ?ps ?rai. | |||
} #/optional union. | |||
# to filter out the interacters completely uncomment the next line and comment out if(bound) in select | |||
# filter(!bound(?rai)). | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | |||
} | |||
ORDER BY ?interaction ?personLabel | |||
</sparql> | </sparql> | ||
edits