DOI: 10.15468/dl.kjc3y6
title: Occurrence Download

description: A dataset containing 5498 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.496 AND occurrence.decimallatitude &lt;= 40.91534 AND (occurrence.decimallongitude &gt;= -74.257 AND occurrence.decimallongitude &lt;= -73.70072) AND GBIF_WITHIN('POLYGON ((-74.257 40.496, -74.21377 40.50178, -74.17734 40.5138, -74.14158 40.52592, -74.12794 40.52683, -74.10331 40.54677, -74.0533 40.58678, -74.03057 40.59253, -74.01602 40.5695, -73.9554 40.54131, -73.85236 40.5589, -73.78508 40.57587, -73.74953 40.5911, -73.74251 40.59377, -73.73867 40.60262, -73.73936 40.60479, -73.7442 40.60973, -73.75212 40.61302, -73.75661 40.61307, -73.76129 40.61292, -73.7633 40.61412, -73.76337 40.61581, -73.76124 40.61686, -73.76187 40.62334, -73.76074 40.62989, -73.75102 40.63356, -73.74528 40.63611, -73.74064 40.63221, -73.73733 40.63289, -73.73735 40.63961, -73.73945 40.64119, -73.74148 40.64243, -73.74096 40.64716, -73.7399 40.64794, -73.73786 40.64878, -73.73498 40.64977, -73.73115 40.65021, -73.7263 40.65177, -73.72494 40.65211, -73.72475 40.65402, -73.72501 40.6546, -73.72664 40.65521, -73.72689 40.65589, -73.72718 40.65796, -73.72797 40.65963, -73.72908 40.66148, -73.73016 40.66433, -73.73005 40.66696, -73.72946 40.66852, -73.72838 40.67127, -73.72795 40.67326, -73.7267 40.6767, -73.72588 40.68033, -73.72363 40.68531, -73.72253 40.69481, -73.72977 40.70849, -73.73201 40.72027, -73.72985 40.72278, -73.72496 40.72431, -73.7121 40.72722, -73.70492 40.72851, -73.70072 40.73907, -73.70192 40.75222, -73.70253 40.753, -73.72426 40.76479, -73.78611 40.80584, -73.76152 40.85507, -73.75558 40.88057, -73.76018 40.88113, -73.80825 40.88776, -73.83412 40.89395, -73.83361 40.90949, -73.84321 40.91226, -73.84692 40.91339, -73.84971 40.9142, -73.86323 40.90087, -73.87229 40.9026, -73.88384 40.90543, -73.89574 40.9093, -73.91183 40.91534, -73.92712 40.89022, -73.9486 40.85696, -73.98052 40.80259, -74.00795 40.76533, -74.01752 40.73992, -74.02321 40.70732, -74.02962 40.69283, -74.0225 40.67652, -74.02694 40.65646, -74.04393 40.6374, -74.04506 40.61418, -74.06609 40.64178, -74.07858 40.6506, -74.10389 40.64856, -74.11875 40.64456, -74.13467 40.64374, -74.15268 40.64122, -74.17472 40.64685, -74.18542 40.64579, -74.19375 40.6391, -74.20131 40.63255, -74.20296 40.62701, -74.20304 40.61587, -74.19731 40.61401, -74.19984 40.60717, -74.19714 40.60219, -74.20217 40.59959, -74.20965 40.57522, -74.21491 40.55926, -74.22849 40.55867, -74.24399 40.55276, -74.25034 40.54159, -74.24762 40.5192, -74.2562 40.51333, -74.257 40.496))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE)
 AND occurrence.hascoordinate = TRUE
 AND occurrence.hasgeospatialissues = FALSE
 AND (CAST(occurrence.taxonkey AS INTEGER) = 6 OR CAST(occurrence.acceptedtaxonkey AS INTEGER) = 6 OR CAST(occurrence.kingdomkey AS INTEGER) = 6 OR CAST(occurrence.phylumkey AS INTEGER) = 6 OR CAST(occurrence.classkey AS INTEGER) = 6 OR CAST(occurrence.orderkey AS INTEGER) = 6 OR CAST(occurrence.familykey AS INTEGER) = 6 OR CAST(occurrence.genuskey AS INTEGER) = 6 OR CAST(occurrence.specieskey AS INTEGER) = 6)
 AND (occurrence."year" &gt;= 2000 AND occurrence."year" &lt;= 2020)
 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 5498 records were derived from 1 constituent datasets; see https://api.gbif.org/v1/occurrence/download/0037072-251025141854904/datasets/export for details.
 
Data from some individual datasets included in this download may be licensed under less restrictive terms.