DOI: 10.15468/dl.shrxr3
title: Occurrence Download

description: A dataset containing 109 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 = 'MX'
 AND (occurrence.decimallatitude &gt;= 20.70139 AND occurrence.decimallatitude &lt;= 20.71182 AND (occurrence.decimallongitude &gt;= -103.40449 AND occurrence.decimallongitude &lt;= -103.38786) AND GBIF_WITHIN('POLYGON ((-103.40415 20.71076, -103.40449 20.71055, -103.39978 20.70877, -103.39834 20.70992, -103.39751 20.70858, -103.39989 20.7046, -103.39897 20.70439, -103.39836 20.7059, -103.39364 20.70594, -103.39482 20.70377, -103.39508 20.70139, -103.39256 20.70141, -103.3905 20.70164, -103.38992 20.70407, -103.38791 20.70382, -103.38786 20.70597, -103.38865 20.70699, -103.39057 20.70692, -103.38872 20.70958, -103.39082 20.70935, -103.39216 20.70972, -103.3948 20.71166, -103.396 20.71182, -103.40415 20.71076))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE)
 AND occurrence.occurrencestatus = 'PRESENT'
 AND (occurrence.taxonkey IN ('7191147', '1450', '7191407') OR occurrence.acceptedtaxonkey IN ('7191147', '1450', '7191407') OR occurrence.kingdomkey IN ('7191147', '1450', '7191407') OR occurrence.phylumkey IN ('7191147', '1450', '7191407') OR occurrence.classkey IN ('7191147', '1450', '7191407') OR occurrence.orderkey IN ('7191147', '1450', '7191407') OR occurrence.familykey IN ('7191147', '1450', '7191407') OR occurrence.genuskey IN ('7191147', '1450', '7191407') OR occurrence.specieskey IN ('7191147', '1450', '7191407'))
 AND (occurrence."year" &gt;= 2005 AND occurrence."year" &lt;= 2025)
 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.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 109 records were derived from 3 constituent datasets; see https://api.gbif.org/v1/occurrence/download/0006634-251120083545085/datasets/export for details.
 
Data from some individual datasets included in this download may be licensed under less restrictive terms.