Revision 13130
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(DISTINCT "Ecatalog_all"."decimalLatitude") AS count
|
|
256 |
SELECT ( SELECT count(DISTINCT ROW("Ecatalog_all"."decimalLatitude", "Ecatalog_all"."decimalLongitude")) AS count
|
|
257 | 257 |
FROM "Ecatalog_all" |
258 | 258 |
WHERE ("Ecatalog_all"."decimalLatitude" IS NOT NULL)) AS "allLats", |
259 |
( SELECT count(DISTINCT "Ecatalog_all"."decimalLatitude") AS count
|
|
259 |
( SELECT count(DISTINCT ROW("Ecatalog_all"."decimalLatitude", "Ecatalog_all"."decimalLongitude")) 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(DISTINCT "Ecatalog_all"."decimalLongitude") AS count
|
|
262 |
( SELECT count(DISTINCT ROW("Ecatalog_all"."decimalLatitude", "Ecatalog_all"."decimalLongitude")) AS count
|
|
263 | 263 |
FROM "Ecatalog_all" |
264 | 264 |
WHERE ("Ecatalog_all"."decimalLongitude" IS NOT NULL)) AS "allLongs", |
265 |
( SELECT count(DISTINCT "Ecatalog_all"."decimalLongitude") AS count
|
|
265 |
( SELECT count(DISTINCT ROW("Ecatalog_all"."decimalLatitude", "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
bugfix: inputs/NY/validations.sql: _specimens_13_count_of_all_verbatim_and_decimal_lat_long: need to include both lat and long in the value to DISTINCT on