Revision 12912
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/validation/aggregating/specimens/NY/qualitative_validations_source_db_NYBG.VegCore.sql | ||
---|---|---|
46 | 46 |
Check: should return 3335 rows |
47 | 47 |
'; |
48 | 48 |
|
49 |
CREATE OR REPLACE VIEW _specimens_06_count_of_unique_verb_subsp_taxa_without_author AS |
|
49 |
CREATE OR REPLACE VIEW _specimens_06_count_of_unique_verbatim_subsp_taxa_without_author AS
|
|
50 | 50 |
SELECT COUNT(DISTINCT CONCAT_WS(' ', genus, "specificEpithet", subspecies)) AS "specificEpithet" FROM "Ecatalog_all" |
51 | 51 |
WHERE genus IS NOT NULL AND "specificEpithet" IS NOT NULL; |
52 |
COMMENT ON VIEW _specimens_06_count_of_unique_verb_subsp_taxa_without_author |
|
52 |
COMMENT ON VIEW _specimens_06_count_of_unique_verbatim_subsp_taxa_without_author
|
|
53 | 53 |
IS ' |
54 | 54 |
Check: should return 1 row |
55 | 55 |
'; |
... | ... | |
109 | 109 |
'; |
110 | 110 |
|
111 | 111 |
CREATE OR REPLACE VIEW _specimens_12_distinct_collector_name_collect_num_date_w_count AS |
112 |
SELECT IFNULL(recordedBy,'') AS "collectorName", IFNULL("collectorNumber",'') AS "collectionNumber",
|
|
112 |
SELECT IFNULL("recordedBy",'') AS "collectorName", IFNULL("collectorNumber",'') AS "collectionNumber",
|
|
113 | 113 |
IFNULL("CollectedDate",'') AS "dataCollected", COUNT(*) AS "specimenRecords" |
114 | 114 |
FROM "Ecatalog_all" |
115 |
GROUP BY recordedBy, "collectorNumber", "CollectedDate"
|
|
116 |
ORDER BY recordedBy, "collectorNumber", "CollectedDate";
|
|
115 |
GROUP BY "recordedBy", "collectorNumber", "CollectedDate"
|
|
116 |
ORDER BY "recordedBy", "collectorNumber", "CollectedDate";
|
|
117 | 117 |
COMMENT ON VIEW _specimens_12_distinct_collector_name_collect_num_date_w_count |
118 | 118 |
IS ' |
119 | 119 |
Check: should return 309396 rows |
... | ... | |
178 | 178 |
WHERE "specimenDescription" IS NOT NULL; |
179 | 179 |
COMMENT ON VIEW _specimens_16_list_distinct_specimen_descriptions |
180 | 180 |
IS ' |
181 |
Note: specimens descriptions in nybg extract is in column PlantFungDescription
|
|
181 |
Note: specimens descriptions in nybg extract is in column "PlantFungDescription"
|
|
182 | 182 |
|
183 | 183 |
Check: should return 158460 records |
184 | 184 |
'; |
Also available in: Unified diff
bugfix: validation/aggregating/specimens/NY/qualitative_validations_source_db_NYBG.VegCore.sql: need to enclose additional mixed-case identifiers in "", using the steps at wiki.vegpath.org/Aggregating_validations_refactoring#translate-to-Postgres