query-1b142d87517cce8a12b0556e0e71dcfc

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?P244 WHERE
{
   { SELECT ?item ?P244
WHERE 
{
  ?item wdt:P244 ?P244 . 
  filter not exists {?item wdt:P7859 [].}
} }  filter(regex(?P244,"(gf|n|nb|nr|no|ns|sj)([4-9][0-9]|00|20[0-2][0-9])[0-9]{6}"))
 # SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?P244"):::projected v2("?item"):::projected a1((" ")) f0[["regex(?P244,'(gf|n|nb|nr|no|ns|sj)(#91;4-9#93;#91;0-9#93;|00|20#91;0-2#93;#91;0-9#93;)#91;0-9#93;{6}')"]] f0 --> v1 f1[["not "]] subgraph f1e0["Exists Clause"] e0v1 --"wdt:P7859"--> e0a1 e0v1("?item"):::projected e0a1((" ")):::projected end f1--EXISTS--> f1e0 f1 --> v2 f1 --> c2 f1 --> a1 v2 --"wdt:P7859"--> a1 v2 --"wdt:P244"--> v1