DOI: 10.15468/dl.y5jm26
title: Occurrence Download

description: A dataset containing 8929 records in GBIF matching the query:
SELECT
 kingdom,
 kingdomkey,
 phylum,
 phylumkey,
 class,
 classkey,
 "order",
 orderkey,
 family,
 familykey,
 genus,
 genuskey,
 species,
 specieskey,
 PRINTF('%04d-%02d-%02d', "year", "month", "day") yearmonthday,
 countrycode countrycode,
 IF(ISNULL(kingdomkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY kingdomkey, countrycode, PRINTF('%04d-%02d-%02d', "year", "month", "day"))) kingdomcount,
 IF(ISNULL(phylumkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY phylumkey, countrycode, PRINTF('%04d-%02d-%02d', "year", "month", "day"))) phylumcount,
 IF(ISNULL(classkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY classkey, countrycode, PRINTF('%04d-%02d-%02d', "year", "month", "day"))) classcount,
 IF(ISNULL(orderkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY orderkey, countrycode, PRINTF('%04d-%02d-%02d', "year", "month", "day"))) ordercount,
 IF(ISNULL(familykey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY familykey, countrycode, PRINTF('%04d-%02d-%02d', "year", "month", "day"))) familycount,
 IF(ISNULL(genuskey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY genuskey, countrycode, PRINTF('%04d-%02d-%02d', "year", "month", "day"))) genuscount,
 COUNT(*) occurrences,
 MIN(GBIF_TEMPORALUNCERTAINTY(eventdate, eventtime)) mintemporaluncertainty,
 MIN(COALESCE(coordinateuncertaintyinmeters, 1000)) mincoordinateuncertaintyinmeters
FROM
 occurrence
WHERE
 occurrence.decimallatitude &gt;= 45.5439
 AND occurrence.decimallatitude &lt;= 49.0027
 AND (occurrence.decimallongitude &gt;= -124.8679 AND occurrence.decimallongitude &lt;= -116.9165)
 AND GBIF_WITHIN('POLYGON ((-123.3208 49.0023, -123.3215 49.0023, -123.0084 48.8313, -123.0084 48.7675, -123.2721 48.6901, -123.2336 48.5902, -123.222 48.5548, -123.1609 48.4533, -123.1169 48.4233, -123.2501 48.2841, -123.3998 48.2539, -123.5413 48.2247, -123.9141 48.2795, -124.0116 48.2964, -124.2389 48.3599, -124.4174 48.4096, -124.7539 48.4984, -124.8486 48.3727, -124.8679 48.2457, -124.8679 48.0423, -124.7566 47.8012, -124.5616 47.4689, -124.438 47.1832, -124.3529 46.8386, -124.2691 46.4312, -124.2444 46.2596, -124.0329 46.2653, -124.0212 46.2924, -123.9711 46.2677, -123.9292 46.2383, -123.8729 46.235, -123.7404 46.2691, -123.6875 46.2497, -123.6209 46.2573, -123.5557 46.2582, -123.4946 46.2691, -123.4287 46.2293, -123.4314 46.1822, -123.3703 46.147, -123.281 46.1446, -123.1664 46.1893, -123.121 46.1865, -123.0579 46.1556, -122.9597 46.1028, -122.9034 46.0832, -122.8848 46.0604, -122.8587 46.016, -122.8148 45.9612, -122.8114 45.912, -122.7839 45.8642, -122.7962 45.8106, -122.7619 45.7613, -122.775 45.6817, -122.7647 45.6582, -122.6891 45.6236, -122.5676 45.6006, -122.4392 45.5636, -122.3795 45.5756, -122.3321 45.5482, -122.2641 45.5439, -122.2009 45.566, -122.1426 45.5838, -122.1089 45.5833, -122.0451 45.6088, -121.9338 45.6452, -121.8095 45.7067, -121.7361 45.6947, -121.6145 45.7091, -121.5328 45.7263, -121.401 45.6932, -121.3392 45.7057, -121.2177 45.6721, -121.1847 45.6083, -121.1469 45.6078, -121.0645 45.6529, -120.9787 45.6419, -120.9471 45.6572, -120.9142 45.6409, -120.8558 45.6721, -120.6924 45.7143, -120.634 45.746, -120.5942 45.7469, -120.4829 45.6951, -120.3628 45.7057, -120.211 45.7258, -120.1705 45.7623, -120.071 45.7852, -119.9652 45.8245, -119.9096 45.8278, -119.8052 45.8479, -119.67 45.8565, -119.6013 45.9196, -119.5724 45.9249, -119.4894 45.9067, -119.4386 45.9172, -119.3644 45.922, -119.3047 45.9354, -119.2559 45.9402, -119.1708 45.9278, -119.1302 45.932, -118.9867 45.9998, -118.033 46.0008, -116.9165 45.996, -116.9433 46.0537, -116.9762 46.0785, -116.9584 46.1009, -116.9357 46.1432, -116.9254 46.1722, -116.9659 46.2022, -116.9577 46.2388, -116.9879 46.2848, -117.0277 46.3384, -117.0621 46.3498, -117.0394 46.4274, -117.0394 46.506, -117.0415 47.9614, -117.0319 48.9996, -118.0378 49.0005, -119.6082 49.0009, -121.5912 48.9991, -121.7491 48.9973, -122.065 49.0018, -123.0338 49.0027, -123.3208 49.0023))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE
 AND occurrence.hascoordinate = TRUE
 AND occurrence.hasgeospatialissues = FALSE
 AND occurrence.occurrencestatus = 'PRESENT'
 AND (CAST(occurrence.taxonkey AS INTEGER) = 7017 OR CAST(occurrence.acceptedtaxonkey AS INTEGER) = 7017 OR CAST(occurrence.kingdomkey AS INTEGER) = 7017 OR CAST(occurrence.phylumkey AS INTEGER) = 7017 OR CAST(occurrence.classkey AS INTEGER) = 7017 OR CAST(occurrence.orderkey AS INTEGER) = 7017 OR CAST(occurrence.familykey AS INTEGER) = 7017 OR CAST(occurrence.genuskey AS INTEGER) = 7017 OR CAST(occurrence.specieskey AS INTEGER) = 7017)
 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 AND occurrence."month" IS NOT NULL AND occurrence."day" 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-%02d', "year", "month", "day"),
 occurrence.countrycode

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