Project

General

Profile

« Previous | Next » 

Revision 6034

inputs/.NCBI/nodes/create.sql: Make name_txt completely globally unique by removing all duplicates, not just duplicate genera

View differences:

inputs/.NCBI/nodes/create.sql
29 29
    , 33208 -- kingdom Animalia/Metazoa
30 30
);
31 31

  
32
-- Make genus completely globally unique by removing duplicates
32
-- Make name_txt completely globally unique by removing duplicates
33 33
DELETE FROM :table
34
WHERE rank IN ('genus', 'subgenus')
35
AND name_txt IN (
34
WHERE name_txt IN (
36 35
    SELECT name_txt
37 36
    FROM :table
38
    WHERE rank IN ('genus', 'subgenus')
39 37
    GROUP BY name_txt
40 38
    HAVING count(*) > 1
41 39
)

Also available in: Unified diff