Project:SPARQL/examples: Difference between revisions

Line 335: Line 335:
group by ?person ?personLabel
group by ?person ?personLabel
ORDER BY DESC (?PPA_total)
ORDER BY DESC (?PPA_total)
</sparql>
===Women in our data arranged as a network graph by the organisations they were members of===
<sparql tryit="1">
## Women in our data arranged as a network graph by the organisations they were members of
#defaultView:Graph
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
SELECT  ?org ?orgLabel ?rgb ?linkTo ?linkToLabel
WHERE { 
  ?linkTo bnwdt:P3 bnwd:Q3 .                                #select women
  FILTER NOT EXISTS {?linkTo bnwdt:P4 bnwd:Q12 .}          #filter out project team
  ?linkTo bnwdt:P67 ?org
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb,en". }
  BIND( "7C4DCD" AS ?rgb ) .
}
ORDER BY ?personLabel
</sparql>
</sparql>