DOI: 10.15468/dl.ejpgn3
title: Occurrence Download

description: A dataset containing 12898 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.continent = 'EUROPE'
 AND occurrence.countrycode = 'ES'
 AND (occurrence.decimallatitude &gt;= 37.62167 AND occurrence.decimallatitude &lt;= 38.52818 AND (occurrence.decimallongitude &gt;= -2.99251 AND occurrence.decimallongitude &lt;= -2.31262) AND GBIF_WITHIN('POLYGON ((-2.67729 38.44577, -2.79884 38.34687, -2.85035 38.26858, -2.86683 38.16351, -2.95954 38.03166, -2.99251 37.95337, -2.99251 37.7391, -2.97809 37.62167, -2.7803 37.67729, -2.72674 37.70202, -2.50423 37.83593, -2.43418 37.98427, -2.31675 38.26652, -2.31262 38.46225, -2.44448 38.52818, -2.59694 38.522, -2.67729 38.44577))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE)
 AND occurrence.hascoordinate = TRUE
 AND occurrence.license IN ('CC0_1_0', 'CC_BY_4_0', 'CC_BY_NC_4_0', 'UNSPECIFIED', 'UNSUPPORTED')
 AND (CAST(occurrence.taxonkey AS INTEGER) = 1 OR CAST(occurrence.acceptedtaxonkey AS INTEGER) = 1 OR CAST(occurrence.kingdomkey AS INTEGER) = 1 OR CAST(occurrence.phylumkey AS INTEGER) = 1 OR CAST(occurrence.classkey AS INTEGER) = 1 OR CAST(occurrence.orderkey AS INTEGER) = 1 OR CAST(occurrence.familykey AS INTEGER) = 1 OR CAST(occurrence.genuskey AS INTEGER) = 1 OR CAST(occurrence.specieskey AS INTEGER) = 1)
 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.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 12898 records were derived from 87 constituent datasets; see https://api.gbif.org/v1/occurrence/download/0040234-250827131500795/datasets/export for details.
 
Data from some individual datasets included in this download may be licensed under less restrictive terms.