Revision 13143
Added by Aaron Marcuse-Kubitza over 10 years ago
validations.sql | ||
---|---|---|
255 | 255 |
CREATE VIEW _specimens_13_count_of_all_verbatim_and_decimal_lat_long AS |
256 | 256 |
SELECT ( SELECT count(DISTINCT ROW("Ecatalog_all"."decimalLatitude", "Ecatalog_all"."decimalLongitude")) AS count |
257 | 257 |
FROM "Ecatalog_all" |
258 |
WHERE ("Ecatalog_all"."decimalLatitude" IS NOT NULL)) AS "allLats",
|
|
258 |
WHERE (("Ecatalog_all"."decimalLatitude" IS NOT NULL) AND ("Ecatalog_all"."decimalLongitude" IS NOT NULL))) AS "allLatLongs",
|
|
259 | 259 |
( SELECT count(DISTINCT ROW("Ecatalog_all"."decimalLatitude", "Ecatalog_all"."decimalLongitude")) AS count |
260 | 260 |
FROM "Ecatalog_all" |
261 |
WHERE is_castable("Ecatalog_all"."decimalLatitude", NULL::double precision)) AS "decimalLats", |
|
262 |
( SELECT count(DISTINCT ROW("Ecatalog_all"."decimalLatitude", "Ecatalog_all"."decimalLongitude")) AS count |
|
263 |
FROM "Ecatalog_all" |
|
264 |
WHERE ("Ecatalog_all"."decimalLongitude" IS NOT NULL)) AS "allLongs", |
|
265 |
( SELECT count(DISTINCT ROW("Ecatalog_all"."decimalLatitude", "Ecatalog_all"."decimalLongitude")) AS count |
|
266 |
FROM "Ecatalog_all" |
|
267 |
WHERE is_castable("Ecatalog_all"."decimalLongitude", NULL::double precision)) AS "decimalLongs"; |
|
261 |
WHERE (is_castable("Ecatalog_all"."decimalLatitude", NULL::double precision) AND is_castable("Ecatalog_all"."decimalLongitude", NULL::double precision))) AS "decimalLatLongs"; |
|
268 | 262 |
|
269 | 263 |
|
270 | 264 |
-- |
Also available in: Unified diff
fix: inputs/NY/validations.sql, schemas/vegbien.sql: _specimens_13_count_of_all_verbatim_and_decimal_lat_long: count lat/longs together instead of separately, because the DISTINCT is by coordinate pair, not individual coordinate value (which wouldn't make much sense)