Project

General

Profile

« Previous | Next » 

Revision 7118

schemas/vegbien.sql: unscrubbed_taxondetermination_view: Inner-join to tnrs instead of LEFT JOINing, because only taxondeterminations whose taxonlabels have already been scrubbed by TNRS should have accepted taxondeterminations added. Removed now-unneeded filter by tnrs.Name_submitted IS NOT NULL, which is replaced by the inner join.

View differences:

schemas/vegbien.sql
4516 4516
--
4517 4517

  
4518 4518
CREATE VIEW unscrubbed_taxondetermination_view AS
4519
    SELECT taxondetermination.taxonoccurrence_id, tnrs."Time_submitted", tnrs."Name_number", tnrs."Name_submitted", tnrs."Overall_score", tnrs."Name_matched", tnrs."Name_matched_rank", tnrs."Name_score", tnrs."Name_matched_author", tnrs."Name_matched_url", tnrs."Author_matched", tnrs."Author_score", tnrs."Family_matched", tnrs."Family_score", tnrs."Name_matched_accepted_family", tnrs."Genus_matched", tnrs."Genus_score", tnrs."Specific_epithet_matched", tnrs."Specific_epithet_score", tnrs."Infraspecific_rank", tnrs."Infraspecific_epithet_matched", tnrs."Infraspecific_epithet_score", tnrs."Infraspecific_rank_2", tnrs."Infraspecific_epithet_2_matched", tnrs."Infraspecific_epithet_2_score", tnrs."Annotations", tnrs."Unmatched_terms", tnrs."Taxonomic_status", tnrs."Accepted_name", tnrs."Accepted_name_author", tnrs."Accepted_name_rank", tnrs."Accepted_name_url", tnrs."Accepted_name_species", tnrs."Accepted_name_family", tnrs."Selected", tnrs."Source", tnrs."Warnings", tnrs."Accepted_name_lsid" FROM (((taxondetermination LEFT JOIN taxonverbatim USING (taxonverbatim_id)) LEFT JOIN taxonlabel USING (taxonlabel_id)) LEFT JOIN "TNRS".tnrs ON ((tnrs."Name_submitted" = taxonlabel.taxonomicname))) WHERE ((taxondetermination.iscurrent AND (taxondetermination.source_id <> (SELECT source.source_id FROM source WHERE (source.shortname = 'TNRS'::text)))) AND (tnrs."Name_submitted" IS NOT NULL)) ORDER BY taxondetermination.taxondetermination_id;
4519
    SELECT taxondetermination.taxonoccurrence_id, tnrs."Time_submitted", tnrs."Name_number", tnrs."Name_submitted", tnrs."Overall_score", tnrs."Name_matched", tnrs."Name_matched_rank", tnrs."Name_score", tnrs."Name_matched_author", tnrs."Name_matched_url", tnrs."Author_matched", tnrs."Author_score", tnrs."Family_matched", tnrs."Family_score", tnrs."Name_matched_accepted_family", tnrs."Genus_matched", tnrs."Genus_score", tnrs."Specific_epithet_matched", tnrs."Specific_epithet_score", tnrs."Infraspecific_rank", tnrs."Infraspecific_epithet_matched", tnrs."Infraspecific_epithet_score", tnrs."Infraspecific_rank_2", tnrs."Infraspecific_epithet_2_matched", tnrs."Infraspecific_epithet_2_score", tnrs."Annotations", tnrs."Unmatched_terms", tnrs."Taxonomic_status", tnrs."Accepted_name", tnrs."Accepted_name_author", tnrs."Accepted_name_rank", tnrs."Accepted_name_url", tnrs."Accepted_name_species", tnrs."Accepted_name_family", tnrs."Selected", tnrs."Source", tnrs."Warnings", tnrs."Accepted_name_lsid" FROM (((taxondetermination LEFT JOIN taxonverbatim USING (taxonverbatim_id)) LEFT JOIN taxonlabel USING (taxonlabel_id)) JOIN "TNRS".tnrs ON ((tnrs."Name_submitted" = taxonlabel.taxonomicname))) WHERE (taxondetermination.iscurrent AND (taxondetermination.source_id <> (SELECT source.source_id FROM source WHERE (source.shortname = 'TNRS'::text)))) ORDER BY taxondetermination.taxondetermination_id;
4520 4520

  
4521 4521

  
4522 4522
--

Also available in: Unified diff