DOI: 10.15468/dl.5geggq
title: Occurrence Download

description: A dataset containing 123 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.decimallatitude &gt;= 33.95956 AND occurrence.decimallatitude &lt;= 49.20673 AND (occurrence.decimallongitude &gt;= -5.21281 AND occurrence.decimallongitude &lt;= 32.93884) AND GBIF_WITHIN('POLYGON ((-5.21281 33.95956, 18.72335 33.95956, 32.93884 33.95956, 32.93884 49.20673, -5.21281 49.20673, -5.21281 33.95956))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE OR occurrence.decimallatitude &gt;= 40.66513 AND occurrence.decimallatitude &lt;= 45.54581 AND (occurrence.decimallongitude &gt;= 12.41805 AND occurrence.decimallongitude &lt;= 19.3829) AND GBIF_WITHIN('POLYGON ((12.41805 45.54581, 12.52358 44.25309, 13.23589 44.27947, 13.84268 42.6174, 17.98465 40.66513, 19.3829 41.5885, 14.60775 45.54581, 12.41805 45.54581))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE)
 AND occurrence.hascoordinate = TRUE
 AND occurrence.hasgeospatialissues = FALSE
 AND occurrence.occurrencestatus = 'PRESENT'
 AND (occurrence.taxonkey = 5214139 OR occurrence.acceptedtaxonkey = 5214139 OR occurrence.kingdomkey = 5214139 OR occurrence.phylumkey = 5214139 OR occurrence.classkey = 5214139 OR occurrence.orderkey = 5214139 OR occurrence.familykey = 5214139 OR occurrence.genuskey = 5214139 OR occurrence.specieskey = 5214139)
 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 123 records were derived from 51 constituent datasets; see https://api.gbif.org/v1/occurrence/download/0018111-250525065834625/datasets/export for details.
 
Data from some individual datasets included in this download may be licensed under less restrictive terms.