DOI: 10.15468/dl.xwta9s
title: Occurrence Download

description: A dataset containing 4 records in GBIF matching the query:
SELECT
 kingdom,
 kingdomkey,
 phylum,
 phylumkey,
 class,
 classkey,
 "order",
 orderkey,
 family,
 familykey,
 genus,
 genuskey,
 species,
 specieskey,
 "year",
 countrycode countrycode,
 IF(ISNULL(kingdomkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY kingdomkey, countrycode, "year")) kingdomcount,
 IF(ISNULL(phylumkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY phylumkey, countrycode, "year")) phylumcount,
 IF(ISNULL(classkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY classkey, countrycode, "year")) classcount,
 IF(ISNULL(orderkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY orderkey, countrycode, "year")) ordercount,
 IF(ISNULL(familykey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY familykey, countrycode, "year")) familycount,
 IF(ISNULL(genuskey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY genuskey, countrycode, "year")) genuscount,
 COUNT(*) occurrences,
 MIN(GBIF_TEMPORALUNCERTAINTY(eventdate, eventtime)) mintemporaluncertainty,
 MIN(COALESCE(coordinateuncertaintyinmeters, 1000)) mincoordinateuncertaintyinmeters
FROM
 occurrence
WHERE
 occurrence.basisofrecord IN ('OBSERVATION', 'HUMAN_OBSERVATION')
 AND occurrence.countrycode = 'MX'
 AND occurrence.datasetkey IN ('afeb5256-0c46-4470-b070-8514cc2b6969', '99ab3167-a2d5-411a-8176-34dc02edee4a', '50c9509d-22c7-4a22-a47d-8c48425ef4a7', '33948acc-bfac-4107-92c8-6464de387822', '8016518a-f762-11e1-a439-00145eb45e9a', '6d81e520-7adb-4470-937f-daac38fddf45', '73a397dc-3b80-4aa5-960a-a188ef987621', '356b321d-7d47-4380-89e2-87bae6d8c250', '7bd65a7a-f762-11e1-a439-00145eb45e9a', '98c51784-da02-4f0e-81a4-f3635cb3cba7', '9d300300-333d-4ac3-abcb-04d4b369e556', 'e9b9f9d0-bd86-49a2-9695-d72f92ed7548')
 AND (occurrence.decimallatitude &gt;= 10.30103 AND occurrence.decimallatitude &lt;= 33.38383 AND (occurrence.decimallongitude &gt;= -117.6236 AND occurrence.decimallongitude &lt;= -82.99934) AND GBIF_WITHIN('POLYGON ((-109.22184 19.61878, -90.77726 10.30103, -82.99934 22.34423, -97.04976 29.11853, -117.6236 33.38383, -116.65047 29.49403, -109.22184 19.61878))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE)
 AND occurrence.hascoordinate = TRUE
 AND occurrence.hasgeospatialissues = FALSE
 AND occurrence.publishingorgkey IN ('ff90b050-c256-11db-b71b-b8a03c50a862', '28eb1a3f-1c15-4a95-931a-4af90ecb574d', '90fd6680-349f-11d8-aa2d-b8a03c50a862')
 AND (CAST(occurrence.taxonkey AS INTEGER) = 3899051 OR CAST(occurrence.acceptedtaxonkey AS INTEGER) = 3899051 OR CAST(occurrence.kingdomkey AS INTEGER) = 3899051 OR CAST(occurrence.phylumkey AS INTEGER) = 3899051 OR CAST(occurrence.classkey AS INTEGER) = 3899051 OR CAST(occurrence.orderkey AS INTEGER) = 3899051 OR CAST(occurrence.familykey AS INTEGER) = 3899051 OR CAST(occurrence.genuskey AS INTEGER) = 3899051 OR CAST(occurrence.specieskey AS INTEGER) = 3899051)
 AND NOT GBIF_STRINGARRAYCONTAINS(occurrence.issue, 'TAXON_MATCH_FUZZY', TRUE)
 AND (occurrence.distancefromcentroidinmeters &gt;= 2000.0 OR occurrence.distancefromcentroidinmeters IS NULL)
 AND occurrence.occurrencestatus = 'PRESENT'
 AND (occurrence.specieskey IS NOT NULL AND occurrence."year" IS NOT NULL AND occurrence.hascoordinate = TRUE)
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",
 occurrence.countrycode

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