Ticket #3071: Trac_3071_Verification.sql

File Trac_3071_Verification.sql, 495 bytes (added by Benjamin Haag, 21 months ago)
Line 
1USE gringlobal
2
3SELECT * FROM vw_GRINGlobal_Taxonomy_Species
4WHERE ID IN
5(
6SELECT taxonomy_species_id FROM taxonomy_species ts
7--SELECT taxonomy_genus_id, name, name_authority, protologue,* FROM taxonomy_species ts
8WHERE
9(SELECT count(*) FROM taxonomy_species
10WHERE name = ts.name
11 AND taxonomy_genus_id = ts.taxonomy_genus_id
12 AND COALESCE(name_authority, '') = COALESCE(ts.name_authority, '')
13 AND COALESCE(protologue, '') = COALESCE(ts.protologue, '')
14) > 1)
15ORDER BY Name
16