DOI: 10.15468/dl.fc327s
title: Occurrence Download

description: A dataset containing 1165 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
 (GBIF_WITHIN('POLYGON((136.2763 -47.37994,140.2763 -47.37994,140.2763 -43.37994,136.2763 -43.37994,136.2763 -47.37994))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE OR occurrence.decimallatitude &gt;= -18.67329 AND occurrence.decimallatitude &lt;= -9.22417 AND (occurrence.decimallongitude &gt;= 130.77601000000004 AND occurrence.decimallongitude &lt;= 142.69645000000003) AND GBIF_WITHIN('POLYGON ((130.77601000000004 -9.22417, 131.64824 -14.67558, 141.31542000000002 -18.67329, 142.69645000000003 -10.71422, 141.53348000000005 -10.82325, 130.77601000000004 -9.22417))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE OR occurrence.decimallatitude &gt;= -18.83104 AND occurrence.decimallatitude &lt;= -8.73275 AND (occurrence.decimallongitude &gt;= 130.42099 AND occurrence.decimallongitude &lt;= 142.90289) AND GBIF_WITHIN('POLYGON ((130.6773 -10.65502, 131.57435 -14.85837, 141.44197 -18.83104, 142.90289 -10.70628, 141.64701 -10.86006, 135.16258 -8.75838, 130.42099 -8.73275, 130.6773 -10.65502))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE)
 AND occurrence.hascoordinate = TRUE
 AND occurrence.hasgeospatialissues = FALSE
 AND occurrence.occurrencestatus = 'PRESENT'
 AND (CAST(occurrence.taxonkey AS INTEGER) = 9455 OR CAST(occurrence.acceptedtaxonkey AS INTEGER) = 9455 OR CAST(occurrence.kingdomkey AS INTEGER) = 9455 OR CAST(occurrence.phylumkey AS INTEGER) = 9455 OR CAST(occurrence.classkey AS INTEGER) = 9455 OR CAST(occurrence.orderkey AS INTEGER) = 9455 OR CAST(occurrence.familykey AS INTEGER) = 9455 OR CAST(occurrence.genuskey AS INTEGER) = 9455 OR CAST(occurrence.specieskey AS INTEGER) = 9455)
 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 1165 records were derived from 29 constituent datasets; see https://api.gbif.org/v1/occurrence/download/0009787-250914085247600/datasets/export for details.
 
Data from some individual datasets included in this download may be licensed under less restrictive terms.