Revision 13129
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/inputs/NY/validations.sql | ||
---|---|---|
253 | 253 |
-- |
254 | 254 |
|
255 | 255 |
CREATE VIEW _specimens_13_count_of_all_verbatim_and_decimal_lat_long AS |
256 |
SELECT ( SELECT count(*) AS count
|
|
256 |
SELECT ( SELECT count(DISTINCT "Ecatalog_all"."decimalLatitude") AS count
|
|
257 | 257 |
FROM "Ecatalog_all" |
258 | 258 |
WHERE ("Ecatalog_all"."decimalLatitude" IS NOT NULL)) AS "allLats", |
259 |
( SELECT count(*) AS count
|
|
259 |
( SELECT count(DISTINCT "Ecatalog_all"."decimalLatitude") AS count
|
|
260 | 260 |
FROM "Ecatalog_all" |
261 | 261 |
WHERE ("Ecatalog_all"."decimalLatitude" ~ '^(-|\\+){0,1}([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+|[0-9]+)$'::text)) AS "decimalLats", |
262 |
( SELECT count(*) AS count
|
|
262 |
( SELECT count(DISTINCT "Ecatalog_all"."decimalLongitude") AS count
|
|
263 | 263 |
FROM "Ecatalog_all" |
264 | 264 |
WHERE ("Ecatalog_all"."decimalLongitude" IS NOT NULL)) AS "allLongs", |
265 |
( SELECT count(*) AS count
|
|
265 |
( SELECT count(DISTINCT "Ecatalog_all"."decimalLongitude") AS count
|
|
266 | 266 |
FROM "Ecatalog_all" |
267 | 267 |
WHERE ("Ecatalog_all"."decimalLongitude" ~ '^(-|\\+){0,1}([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+|[0-9]+)$'::text)) AS "decimalLongs"; |
268 | 268 |
|
Also available in: Unified diff
fix: inputs/NY/validations.sql: _specimens_13_count_of_all_verbatim_and_decimal_lat_long: need to DISTINCT the values that are being counted, because they are merged by the coordinates_unique unique constraint in the import