Project:SPARQL/examples: Difference between revisions

From Beyond Notability
Line 1,277: Line 1,277:
   ?item ?b ?c ;
   ?item ?b ?c ;
   FILTER NOT EXISTS {?item bnwdt:P12 ?anything .}
   FILTER NOT EXISTS {?item bnwdt:P12 ?anything .}
##   FILTER(STRSTARTS(STR(?item), "https://beyond-notability.wikibase.cloud/entity/Q")) .  # limits results to entities beginning "Q"
 
## FILTER(STRSTARTS(STR(?item), "https://beyond-notability.wikibase.cloud/entity/Q")) .  # limit results to "Q" entities
## FILTER(REGEX(STR(?item), "^https://beyond-notability.wikibase.cloud/entity/[PQ]")) . # or to Ps and Qs
 
   SERVICE wikibase:label {
   SERVICE wikibase:label {
       bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb".
       bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb".
3,427

edits