Project:SPARQL/examples: Difference between revisions

Line 646: Line 646:
}
}
ORDER BY ?personLabel ?s
ORDER BY ?personLabel ?s
</sparql>
=== All activities for women that have instance of public and professional activities===
<sparql tryit="1">
#title:women and PPA
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/>
SELECT ?person ?personLabel ?ppa_label ?ppa ?ppa_valueLabel ?ppa_value ?s
WHERE { 
  ?person bnwdt:P3 bnwd:Q3 .
  ?person ?p ?s . 
      ?ppa wikibase:claim ?p;     
        wikibase:statementProperty ?ps.     
         
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb".
                ?ppa rdfs:label ?ppa_label.
            } # /label service
 
      ?ppa bnwdt:P12 bnwd:Q151 . # instance of PPA     
     
      # get a bit of detail about the ppa
      ?s ?ps ?ppa_value.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
order by ?personLabel ?ppa_label
</sparql>
</sparql>


579

edits