DOI: 10.15468/dl.gupjrs
title: Occurrence Download

description: A dataset containing 26465364 records in GBIF matching the query:
SELECT
 kingdom,
 kingdomkey,
 phylum,
 phylumkey,
 class,
 classkey,
 "order",
 orderkey,
 family,
 familykey,
 genus,
 genuskey,
 species,
 specieskey,
 PRINTF('%04d-%02d', "year", "month") yearmonth,
 GBIF_EQDGCODE(2, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000)) eqdcellcode,
 IF(ISNULL(kingdomkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY kingdomkey, GBIF_EQDGCODE(2, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000)), PRINTF('%04d-%02d', "year", "month"))) kingdomcount,
 IF(ISNULL(phylumkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY phylumkey, GBIF_EQDGCODE(2, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000)), PRINTF('%04d-%02d', "year", "month"))) phylumcount,
 IF(ISNULL(classkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY classkey, GBIF_EQDGCODE(2, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000)), PRINTF('%04d-%02d', "year", "month"))) classcount,
 IF(ISNULL(orderkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY orderkey, GBIF_EQDGCODE(2, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000)), PRINTF('%04d-%02d', "year", "month"))) ordercount,
 IF(ISNULL(familykey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY familykey, GBIF_EQDGCODE(2, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000)), PRINTF('%04d-%02d', "year", "month"))) familycount,
 IF(ISNULL(genuskey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY genuskey, GBIF_EQDGCODE(2, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000)), PRINTF('%04d-%02d', "year", "month"))) genuscount,
 COUNT(*) occurrences,
 MIN(GBIF_TEMPORALUNCERTAINTY(eventdate, eventtime)) mintemporaluncertainty,
 MIN(COALESCE(coordinateuncertaintyinmeters, 1000)) mincoordinateuncertaintyinmeters
FROM
 occurrence
WHERE
 occurrence.basisofrecord IN ('OBSERVATION', 'MACHINE_OBSERVATION', 'HUMAN_OBSERVATION', 'MATERIAL_SAMPLE', 'MATERIAL_CITATION', 'PRESERVED_SPECIMEN', 'FOSSIL_SPECIMEN', 'LIVING_SPECIMEN', 'OCCURRENCE')
 AND occurrence.continent = 'ASIA'
 AND occurrence.datasetkey IN ('4fa7b334-ce0d-4e88-aaae-2e0c138d049e', '50c9509d-22c7-4a22-a47d-8c48425ef4a7', '4515e736-fa02-44ee-9808-bf89445104fe', '6c8d87be-829d-4364-b2bc-578258761cc2', '78fc169f-cef0-4054-88ec-9b694bcbf6e4', '040c5662-da76-4782-a48e-cdea1892d14c', '15f819bd-6612-4447-854b-14d12ee1022d', 'cd6e21c8-9e8a-493a-8a76-fbf7862069e5', '6d504df4-2037-45b0-a61b-1e74dcafa4eb', '07044577-bd82-4089-9f3a-f4a9d2170b2e')
 AND occurrence.hascoordinate = TRUE
 AND occurrence.hasgeospatialissues = FALSE
 AND occurrence.occurrencestatus = 'PRESENT'
 AND occurrence.publishingorgkey IN ('e2e717bf-551a-4917-bdc9-4fa0f342c530', '28eb1a3f-1c15-4a95-931a-4af90ecb574d', 'a2fa5b68-3ebf-4845-abc5-f456d251386f')
 AND NOT GBIF_STRINGARRAYCONTAINS(occurrence.issue, 'TAXON_MATCH_FUZZY', TRUE)
 AND (occurrence.distancefromcentroidinmeters &gt;= 2000.0 OR occurrence.distancefromcentroidinmeters IS NULL)
 AND (occurrence.specieskey IS NOT NULL AND occurrence."year" IS NOT NULL AND occurrence."month" 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,
 PRINTF('%04d-%02d', "year", "month"),
 GBIF_EQDGCODE(2, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000))

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