Project:SPARQL/examples: Difference between revisions

no edit summary
No edit summary
Line 339: Line 339:
ORDER BY ?womanLabel
ORDER BY ?womanLabel
# Credit to Maarten Zeinstra for developing this query
# Credit to Maarten Zeinstra for developing this query
</sparql>
===People not in London with the district, county, and region at which they were once resident (in the UK) listed===
<sparql tryit="1">
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 ?resident ?residentLabel ?district ?districtLabel ?county ?countyLabel ?region ?regionLabel
WHERE { 
  ?resident bnwdt:P29 ?residence .
  ?residence bnwdt:P33 ?district .
  ?district bnwdt:P33 ?county .
  ?county bnwdt:P33 ?region .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
ORDER BY ?regionLabel
</sparql>
</sparql>
6,317

edits