Project:SPARQL/examples: Difference between revisions

Line 4: Line 4:


<sparql tryit="1">
<sparql tryit="1">
PREFIX a: <http://beyond-notability.wiki.opencura.com/entity/>
PREFIX bnwd: <http://beyond-notability.wiki.opencura.com/entity/>
PREFIX b: <http://beyond-notability.wiki.opencura.com/prop/direct/>
PREFIX bnwds: <http://beyond-notability.wiki.opencura.com/entity/statement/>
PREFIX bnwdv: <http://beyond-notability.wiki.opencura.com/value/>
PREFIX bnwdt: <http://beyond-notability.wiki.opencura.com/prop/direct/>
PREFIX bnp: <http://beyond-notability.wiki.opencura.com/prop/>
PREFIX bnps: <http://beyond-notability.wiki.opencura.com/prop/statement/>
PREFIX bnpq: <http://beyond-notability.wiki.opencura.com/prop/qualifier/>


SELECT ?id ?name
SELECT ?id ?name
Line 11: Line 16:
   ?id rdfs:label ?name .
   ?id rdfs:label ?name .
   ?id b:P3 ?idGender . #this line assumes that items for people have a gender value
   ?id b:P3 ?idGender . #this line assumes that items for people have a gender value
   FILTER NOT EXISTS {?id b:P4 a:Q12 .}
   FILTER NOT EXISTS {?id bnwdt:P4 bnwd:Q12 .}
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }  
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }  
}
}
6,317

edits