Project:SPARQL/examples: Difference between revisions

Line 513: Line 513:
</sparql>
</sparql>


==Tools for batch processing==
==Tools for batch processing and quality assurance work==


===All people (by assigned gender), filtering out those already listed as instance of human===
===All people (by assigned gender), filtering out those already listed as instance of human===
Line 576: Line 576:
GROUP BY ?place ?placeLabel ?WDitem ?WDcoordinate_location
GROUP BY ?place ?placeLabel ?WDitem ?WDcoordinate_location
ORDER BY ?placeLabel
ORDER BY ?placeLabel
</sparql>
===All items without a P12 (instance of) triple===
<sparql tryit="1">
# All items without a P12 (instance of) triple
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 ?item ?itemLabel WHERE {
  ?item ?b ?c ;
  FILTER NOT EXISTS {?item bnwdt:P12 ?anything .}
  SERVICE wikibase:label {
      bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb".
  }
}
</sparql>
</sparql>