DOI: 10.15468/dl.zd3wz8
title: Occurrence Download

description: A dataset containing 12 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 = 'CO'
 AND (occurrence.decimallatitude &gt;= -4.21979 AND occurrence.decimallatitude &lt;= 2.89072 AND (occurrence.decimallongitude &gt;= -76.27164 AND occurrence.decimallongitude &lt;= -67.51031) AND GBIF_WITHIN('POLYGON ((-69.93056 -4.21979, -69.39811 -0.93202, -70.12418 -0.20598, -69.97897 0.61689, -69.3497 0.7621, -69.88216 1.29446, -69.88216 1.97186, -67.51031 2.06861, -67.70393 2.89072, -70.70505 2.06861, -72.20561 1.53642, -74.23862 1.8751, -75.30353 2.11698, -76.12642 1.24607, -76.27164 0.61689, -74.57746 -0.3996, -73.36733 -1.41597, -72.73806 -2.43189, -70.99548 -2.09332, -70.07578 -2.62532, -70.55983 -3.78521, -69.93056 -4.21979))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE)
 AND occurrence.hascoordinate = TRUE
 AND occurrence.hasgeospatialissues = FALSE
 AND occurrence.occurrencestatus = 'PRESENT'
 AND (occurrence.taxonkey = 3190511 OR occurrence.acceptedtaxonkey = 3190511 OR occurrence.kingdomkey = 3190511 OR occurrence.phylumkey = 3190511 OR occurrence.classkey = 3190511 OR occurrence.orderkey = 3190511 OR occurrence.familykey = 3190511 OR occurrence.genuskey = 3190511 OR occurrence.specieskey = 3190511)
 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.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 12 records were derived from 8 constituent datasets; see https://api.gbif.org/v1/occurrence/download/0002198-250515123054153/datasets/export for details.
 
Data from some individual datasets included in this download may be licensed under less restrictive terms.