DOI: 10.15468/dl.a9vkf8
title: Occurrence Download

description: A dataset containing 9 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.datasetkey = '50c9509d-22c7-4a22-a47d-8c48425ef4a7'
 AND (occurrence.decimallatitude &gt;= 40.9786 AND occurrence.decimallatitude &lt;= 40.9913 AND (occurrence.decimallongitude &gt;= -74.24869 AND occurrence.decimallongitude &lt;= -74.22883) AND GBIF_WITHIN('POLYGON ((-74.24663 40.9913, -74.24715 40.99091, -74.24548 40.98991, -74.24668 40.98777, -74.24869 40.98729, -74.24745 40.98502, -74.24282 40.98495, -74.24295 40.98301, -74.24423 40.98265, -74.24427 40.982, -74.24445 40.98145, -74.24449 40.98077, -74.24316 40.98094, -74.24295 40.97977, -74.24385 40.97961, -74.24299 40.9786, -74.23891 40.98064, -74.24046 40.98168, -74.23749 40.98349, -74.23436 40.98291, -74.23355 40.98447, -74.23071 40.98213, -74.23003 40.98207, -74.22883 40.98337, -74.24663 40.9913))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE)
 AND occurrence.hascoordinate = TRUE
 AND occurrence.hasgeospatialissues = FALSE
 AND occurrence.occurrencestatus = 'PRESENT'
 AND GBIF_STRINGARRAYCONTAINS(occurrence.classifications['d7dddbf4-2cf0-4f39-9b2a-bb099caae36c'], '6', TRUE)
 AND (occurrence."year" &gt;= 2010 AND occurrence."year" &lt;= 2026)
 AND occurrence.hasgeospatialissues = FALSE
 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.classificationdetails['d7dddbf4-2cf0-4f39-9b2a-bb099caae36c']['specieskey'] &lt;&gt; '' 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 9 records were derived from 1 constituent datasets; see https://api.gbif.org/v1/occurrence/download/0009509-260208012135463/datasets/export for details.
 
Data from some individual datasets included in this download may be licensed under less restrictive terms.