Quality control queries

From Black Bibliography Project
Jump to navigation Jump to search


Missing instance statements

Get a list of Item pages that lack an "instance of" declaration:

prefix wikibase: <http://wikiba.se/ontology-beta#>

SELECT ?label ?link
WHERE
{
 ?x rdf:type wikibase:Item ;
    rdfs:label ?label .
 FILTER((LANG(?label)) = "en")
 FILTER NOT EXISTS { ?x wdt:P8 ?type }
 BIND(IRI(CONCAT('http://172.17.10.220/wiki/Item:', REPLACE( str(?x) , 'http://wikibase.svc/entity/', '' ))) AS ?link )
}
order by ?label

Try it out!