Project:SPARQL/admin: Difference between revisions

From Beyond Notability
Line 513: Line 513:
}
}
ORDER BY ?ioLabel ?personLabel
ORDER BY ?ioLabel ?personLabel
</sparql>
=== Excavations that lack a P2 location ===
<sparql tryit="1">
## several of these have some kind of location information in their description or other notes
#title:BN excavations without locations
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 distinct ?item ?itemLabel 
WHERE { 
  ?item bnwdt:P12 bnwd:Q38 .
  optional {
    ?item bnwdt:P2 ?location . # no excavations have a P33
  }
 
  filter not exists { ?item bnwdt:P2 ?location .  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". }
}
order by ?itemLabel
</sparql>
</sparql>


671

edits