Project:SPARQL/examples: Difference between revisions

Line 838: Line 838:
ORDER BY DESC(?organisation_count)
ORDER BY DESC(?organisation_count)
</sparql>
</sparql>
==Education==


===Women educated at a tertiary educational institution located in Oxford or Cambridge===
===Women educated at a tertiary educational institution located in Oxford or Cambridge===
Line 874: Line 878:
}
}
ORDER BY ?womanLabel
ORDER BY ?womanLabel
</sparql>
=== Women who were FSAs who went to Oxford or Cambridge colleges ===
<sparql tryit="1">
#how many women who were FSAs went to Oxford or Cambridge colleges?
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 bnpsv: <https://beyond-notability.wikibase.cloud/prop/statement/value/>
SELECT ?person ?personLabel ?college ?collegeLabel ?universityLabel
WHERE { 
  ?person bnwdt:P3 bnwd:Q3 . #select women
  FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
 
  ?person bnwdt:P75 bnwd:Q8. # only BN subjects having a FSA
 
  # educated at (P94) part of (P4) cambridge (Q1181) oxford (Q364)
  ?person bnwdt:P94 ?college . 
  ?college bnwdt:P4 ?university .
  FILTER ( ?university in ( bnwd:Q1181 , bnwd:Q364 ) )
 
  SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb,en".}
}
order by ?personLabel ?collegeLabel
</sparql>
</sparql>


579

edits