Project:SPARQL/examples: Difference between revisions

Line 3,934: Line 3,934:
group by ?work_label  ?positionLabel ?position  
group by ?work_label  ?positionLabel ?position  
order by lcase(str(?positionLabel))
order by lcase(str(?positionLabel))
</sparql>
==== Women with position held free text ====
<sparql tryit="1">
# held position free text job titles
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/>
PREFIX bnpqv: <https://beyond-notability.wikibase.cloud/prop/qualifier/value/>
SELECT ?person ?personLabel ?positionLabel
WHERE {
  ?person bnwdt:P3 bnwd:Q3 . # women
 
  # held position (free text)
  ?person bnwdt:P48  ?position . 
  FILTER( !isBLANK(?position)  ) . # filter out <unknown value>
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". }
}
order by ?personLabel ?positionLabel
</sparql>
</sparql>


579

edits