Revision 13121
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/validation/aggregating/specimens/qualitative_validations_specimens.sql | ||
---|---|---|
41 | 41 |
|
42 | 42 |
-- _specimens_06_count_of_unique_verb_subsp_taxa_with_author |
43 | 43 |
SELECT count(DISTINCT taxonlabel.taxonomicname) AS taxon_names_with_author |
44 |
FROM taxonlabel |
|
45 |
WHERE ((taxonlabel.source_id = ( SELECT source_by_shortname((:datasource)::text) AS source_by_shortname)) AND (taxonlabel.taxonomicname IS NOT NULL)); |
|
44 |
FROM (taxonverbatim |
|
45 |
JOIN taxonlabel USING (taxonlabel_id)) |
|
46 |
WHERE ((taxonverbatim.source_id = ( SELECT source_by_shortname((:datasource)::text) AS source_by_shortname)) AND (taxonverbatim.subspecies IS NOT NULL)); |
|
46 | 47 |
|
47 | 48 |
-- _specimens_07_list_of_verbatim_subspecific_taxa_with_author |
48 | 49 |
SELECT DISTINCT taxonlabel.taxonomicname AS taxon_name_with_author |
49 |
FROM taxonlabel |
|
50 |
WHERE ((taxonlabel.source_id = ( SELECT source_by_shortname((:datasource)::text) AS source_by_shortname)) AND (taxonlabel.taxonomicname IS NOT NULL)); |
|
50 |
FROM (taxonverbatim |
|
51 |
JOIN taxonlabel USING (taxonlabel_id)) |
|
52 |
WHERE ((taxonverbatim.source_id = ( SELECT source_by_shortname((:datasource)::text) AS source_by_shortname)) AND (taxonverbatim.subspecies IS NOT NULL)); |
|
51 | 53 |
|
52 | 54 |
-- _specimens_08_count_of_unique_verbatim_author_taxa_with_genus |
53 | 55 |
SELECT count(DISTINCT taxonlabel.taxonomicname) AS taxon_names_with_author |
Also available in: Unified diff
validation/aggregating/specimens/qualitative_validations_specimens.sql: updated to DB