reteplayground
Aggregate

Taxonomic richness: which genera have the most species?

GenusSpecies
Emberiza21
Anas18
Calidris18
Sylvia18
Run this query → no server · no download · no account
caviri.github.io/rete
Run this query in the playground → 25 rows · 160 ms · 512.0 KB of 1461.5 MB read over HTTP range · no server, no download — the query runs in your browser.

The query

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dwc: <http://rs.tdwg.org/dwc/terms/> PREFIX v: <https://w3id.org/rete/gbif/vocab#> SELECT ?genus (COUNT(?sp) AS ?n) WHERE { ?sp dwc:taxonRank "species" ; rdfs:subClassOf ?g . ?g rdfs:label ?genus ; dwc:taxonRank "genus" . } GROUP BY ?genus ORDER BY DESC(?n) LIMIT 25

rete playground · documentation · github.com/caviri/rete