Project:SPARQL/examples: Difference between revisions

Line 20: Line 20:
</sparql>
</sparql>


===People whose elections were proposed by men===
===Women about whom we have recorded fewer than 3 pieces of information===


<sparql tryit="1">
<sparql tryit="1">
PREFIX a: <http://beyond-notability.wiki.opencura.com/entity/>
PREFIX bnwd: <http://beyond-notability.wiki.opencura.com/entity/>
PREFIX b: <http://beyond-notability.wiki.opencura.com/prop/direct/>
PREFIX bnwds: <http://beyond-notability.wiki.opencura.com/entity/statement/>
SELECT ?personLabel ?persongenderLabel ?electorLabel ?Date
PREFIX bnwdv: <http://beyond-notability.wiki.opencura.com/value/>
WHERE {
PREFIX bnwdt: <http://beyond-notability.wiki.opencura.com/prop/direct/>
  ?person b:P7 ?elector ;
PREFIX bnp: <http://beyond-notability.wiki.opencura.com/prop/>
          b:P3 ?persongender .
PREFIX bnps: <http://beyond-notability.wiki.opencura.com/prop/statement/>
   ?elector b:P3 a:Q10 .
PREFIX bnpq: <http://beyond-notability.wiki.opencura.com/prop/qualifier/>
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
 
}
SELECT ?person ?personLabel ?statements WHERE {
  ?person bnwdt:P3 bnwd:Q3 ;
        wikibase:statements ?statements .
   FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .}
  FILTER (?statements <3)
   SERVICE wikibase:label {
      bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb".
  }
}  
</sparql>
</sparql>


6,317

edits