DOI: 10.15468/dl.bgxksh
title: Occurrence Download

description: A dataset containing 38 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.basisofrecord = 'HUMAN_OBSERVATION'
 AND occurrence.countrycode = 'GB'
 AND occurrence.datasetkey = '4fa7b334-ce0d-4e88-aaae-2e0c138d049e'
 AND (occurrence.decimallatitude &gt;= 49.30548 AND occurrence.decimallatitude &lt;= 59.78476 AND (occurrence.decimallongitude &gt;= -7.79402 AND occurrence.decimallongitude &lt;= 2.75515) AND GBIF_WITHIN('POLYGON ((-7.79402 59.78476, -7.2558 58.00571, -7.36344 56.01347, -6.50229 54.47965, -4.34939 54.29159, -7.04051 51.36629, -5.96406 49.30548, -1.33535 50.00236, 2.53986 51.16422, 2.75515 53.01578, 1.24812 56.01347, 0.81754 58.1764, -3.70353 58.96223, -7.79402 59.78476))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE)
 AND occurrence.hascoordinate = TRUE
 AND occurrence.hasgeospatialissues = FALSE
 AND occurrence.occurrencestatus = 'PRESENT'
 AND occurrence.publishingorgkey = 'e2e717bf-551a-4917-bdc9-4fa0f342c530'
 AND (occurrence.taxonkey IN ('2480537', '5229168') OR occurrence.acceptedtaxonkey IN ('2480537', '5229168') OR occurrence.kingdomkey IN ('2480537', '5229168') OR occurrence.phylumkey IN ('2480537', '5229168') OR occurrence.classkey IN ('2480537', '5229168') OR occurrence.orderkey IN ('2480537', '5229168') OR occurrence.familykey IN ('2480537', '5229168') OR occurrence.genuskey IN ('2480537', '5229168') OR occurrence.specieskey IN ('2480537', '5229168'))
 AND (occurrence."year" &gt;= 2005 AND occurrence."year" &lt;= 2024)
 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)
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 38 records were derived from 1 constituent datasets; see https://api.gbif.org/v1/occurrence/download/0031311-250717081556266/datasets/export for details.
 
Data from some individual datasets included in this download may be licensed under less restrictive terms.