603,740
edits
Line 112: | Line 112: | ||
PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/> | PREFIX wbt: <http://biodiversity.wiki.opencura.com/prop/direct/> | ||
PREFIX wb: <http://biodiversity.wiki.opencura.com/entity/> | PREFIX wb: <http://biodiversity.wiki.opencura.com/entity/> | ||
SELECT | SELECT DISTINCT ?taxon ?taxonLabel ?wikidata WITH { | ||
? | SELECT * WHERE { | ||
VALUES ?country {wd:Q664} # new zealand | |||
SERVICE wikibase:around { | |||
?observation wbt:P8 ?location . | ?observation wbt:P8 ?location . | ||
bd:serviceParam wikibase:center ?loc . | bd:serviceParam wikibase:center ?loc . | ||
bd:serviceParam wikibase:radius "100" . | bd:serviceParam wikibase:radius "100" . | ||
} | |||
SERVICE <https://query.wikidata.org/sparql> { | |||
?country wdt:P625 ?loc . | |||
} | |||
} | } | ||
} as %result | |||
WHERE { | |||
} | INCLUDE %result | ||
?observation wbt:P9 ?taxon . | |||
?taxon wbt:P11 ?wikidata . | |||
SERVICE <https://query.wikidata.org/sparql> { | |||
?wikidata wdt:P31 [] . | |||
MINUS {?article schema:about ?wikidata ;schema:isPartOf <https://en.wikipedia.org/> ;schema:inLanguage "en" .} | |||
} | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | |||
} | |||
</sparql> | </sparql> |