query-97e6a87db44add269f51e9f54b014d01
Taxons with an eBird identifier (i.e. birds), their Q number and number of Wikipedia articles
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?wd ?wdLabel ?ebird_id (COUNT(?sitelink) AS ?sites) WHERE {
?wd wdt:P3444 ?ebird_id.
OPTIONAL {?sitelink schema:about ?wd FILTER(CONTAINS(str(?link), ".wikipedia.org/"))}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?wd ?wdLabel ?ebird_id
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?ebird_id"):::projected
v1("?link")
v4("?sitelink"):::projected
v5("?sites")
v2("?wd"):::projected
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P3444"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."schema:about".-> v2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end
bind1[/"count(?sitelink)"/]
v4 --o bind1
bind1 --as--o v5