DOI: 10.15468/dl.ebeqjw
title: Occurrence Download

description: A dataset containing 9347 records in GBIF matching the query:
SELECT
 kingdom,
 kingdomkey,
 phylum,
 phylumkey,
 class,
 classkey,
 "order",
 orderkey,
 family,
 familykey,
 genus,
 genuskey,
 species,
 specieskey,
 "year",
 IF(ISNULL(kingdomkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY kingdomkey, "year")) kingdomcount,
 IF(ISNULL(phylumkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY phylumkey, "year")) phylumcount,
 IF(ISNULL(classkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY classkey, "year")) classcount,
 IF(ISNULL(orderkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY orderkey, "year")) ordercount,
 IF(ISNULL(familykey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY familykey, "year")) familycount,
 IF(ISNULL(genuskey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY genuskey, "year")) genuscount,
 COUNT(*) occurrences,
 MIN(GBIF_TEMPORALUNCERTAINTY(eventdate, eventtime)) mintemporaluncertainty,
 MIN(COALESCE(coordinateuncertaintyinmeters, 1000)) mincoordinateuncertaintyinmeters
FROM
 occurrence
WHERE
 occurrence.countrycode = 'EC'
 AND (occurrence.decimallatitude &gt;= -1.14433 AND occurrence.decimallatitude &lt;= 0.10504 AND (occurrence.decimallongitude &gt;= -78.3083 AND occurrence.decimallongitude &lt;= -76.84981) AND GBIF_WITHIN('POLYGON ((-76.98619 -0.33597, -76.87579 -0.22557, -76.84981 0.04719, -76.93011 0.10504, -77.2291 -0.22577, -77.47217 -0.17175, -77.6162 -0.30679, -77.89528 -0.29779, -78.14734 -0.18976, -78.30039 -0.26216, -78.29154 -0.49833, -78.3083 -0.62241, -78.14893 -0.64777, -78.06563 -0.76005, -78.0113 -0.84336, -78.02578 -1.02808, -77.64212 -1.14433, -77.55704 -1.10851, -77.4343 -0.88798, -77.10309 -0.60224, -76.98619 -0.33597))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE)
 AND occurrence.hascoordinate = TRUE
 AND occurrence.hasgeospatialissues = FALSE
 AND (CAST(occurrence.taxonkey AS INTEGER) = 216 OR CAST(occurrence.acceptedtaxonkey AS INTEGER) = 216 OR CAST(occurrence.kingdomkey AS INTEGER) = 216 OR CAST(occurrence.phylumkey AS INTEGER) = 216 OR CAST(occurrence.classkey AS INTEGER) = 216 OR CAST(occurrence.orderkey AS INTEGER) = 216 OR CAST(occurrence.familykey AS INTEGER) = 216 OR CAST(occurrence.genuskey AS INTEGER) = 216 OR CAST(occurrence.specieskey AS INTEGER) = 216)
 AND NOT GBIF_STRINGARRAYCONTAINS(occurrence.issue, 'TAXON_MATCH_FUZZY', TRUE)
 AND (occurrence.distancefromcentroidinmeters &gt;= 2000.0 OR occurrence.distancefromcentroidinmeters IS NULL)
 AND NOT occurrence.basisofrecord IN ('FOSSIL_SPECIMEN', 'LIVING_SPECIMEN')
 AND occurrence.occurrencestatus = 'PRESENT'
 AND (occurrence.specieskey IS NOT NULL AND occurrence."year" IS NOT NULL)
GROUP BY
 occurrence.kingdom,
 occurrence.kingdomkey,
 occurrence.phylum,
 occurrence.phylumkey,
 occurrence.class,
 occurrence.classkey,
 occurrence."order",
 occurrence.orderkey,
 occurrence.family,
 occurrence.familykey,
 occurrence.genus,
 occurrence.genuskey,
 occurrence.species,
 occurrence.specieskey,
 occurrence."year"

 The dataset's 9347 records were derived from 110 constituent datasets; see https://api.gbif.org/v1/occurrence/download/0015926-251025141854904/datasets/export for details.
 
Data from some individual datasets included in this download may be licensed under less restrictive terms.