Project:SPARQL/examples: Difference between revisions

From Beyond Notability
Line 3,609: Line 3,609:


<sparql tryit="1">
<sparql tryit="1">
# All items without a P12 (instance of) triple
#title:all items without P12 (instance of)


PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
Line 3,623: Line 3,623:
   ?item ?b ?c .
   ?item ?b ?c .
       ?prop wikibase:claim ?b;     
       ?prop wikibase:claim ?b;     
             wikibase:statementProperty ?ps;
             wikibase:statementProperty ?ps.
            wikibase:propertyType wikibase:WikibaseItem. # limit to P & Q Items. more manageable!
      # ?prop wikibase:propertyType wikibase:WikibaseItem. # limit to P & Q Items. not necessary; only the claim is needed.
    # weirdness: it caused some things that are definitely WikibaseItem to be dropped and idk why.


   FILTER NOT EXISTS {?item bnwdt:P12 ?instance .}  
   FILTER NOT EXISTS {?item bnwdt:P12 ?instance .}  
Line 3,632: Line 3,633:


   SERVICE wikibase:label {
   SERVICE wikibase:label {
       bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb".
       bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb".
   }
   }
}
}
3,427

edits