Project

General

Profile

« Previous | Next » 

Revision 11638

schemas/vegbien.sql: tnrs_input_name: updated to use taxon_scrub.scrubbed_unique_taxon_name.*, to avoid further dependencies on AcceptedTaxon

View differences:

schemas/vegbien.sql
4844 4844
--
4845 4845

  
4846 4846
CREATE VIEW tnrs_input_name AS
4847
    WITH "AcceptedTaxon" AS (SELECT DISTINCT "MatchedTaxon"."acceptedScientificName" AS taxonomicname FROM ("TNRS"."MatchedTaxon" LEFT JOIN "TNRS"."AcceptedTaxon" ON (("AcceptedTaxon"."acceptedScientificName" = "MatchedTaxon"."acceptedScientificName"))) WHERE (("MatchedTaxon"."acceptedScientificName" IS NOT NULL) AND ("AcceptedTaxon"."acceptedScientificName" IS NULL))) SELECT "AcceptedTaxon".taxonomicname FROM "AcceptedTaxon" UNION ALL (SELECT DISTINCT taxonlabel.taxonomicname FROM (taxonlabel LEFT JOIN "TNRS"."MatchedTaxon" ON (("MatchedTaxon"."concatenatedScientificName" = taxonlabel.taxonomicname))) WHERE ((taxonlabel.taxonomicname IS NOT NULL) AND ("MatchedTaxon"."concatenatedScientificName" IS NULL)) EXCEPT SELECT "AcceptedTaxon".taxonomicname FROM "AcceptedTaxon");
4847
    WITH "taxon_scrub.scrubbed_unique_taxon_name.*" AS (SELECT DISTINCT "MatchedTaxon".scrubbed_unique_taxon_name AS taxonomicname FROM ("TNRS"."MatchedTaxon" NATURAL LEFT JOIN "TNRS"."taxon_scrub.scrubbed_unique_taxon_name.*") WHERE (("MatchedTaxon".scrubbed_unique_taxon_name IS NOT NULL) AND ("taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_taxon_rank IS NULL))) SELECT "taxon_scrub.scrubbed_unique_taxon_name.*".taxonomicname FROM "taxon_scrub.scrubbed_unique_taxon_name.*" UNION ALL (SELECT DISTINCT taxonlabel.taxonomicname FROM (taxonlabel LEFT JOIN "TNRS"."MatchedTaxon" ON (("MatchedTaxon"."concatenatedScientificName" = taxonlabel.taxonomicname))) WHERE ((taxonlabel.taxonomicname IS NOT NULL) AND ("MatchedTaxon"."concatenatedScientificName" IS NULL)) EXCEPT SELECT "taxon_scrub.scrubbed_unique_taxon_name.*".taxonomicname FROM "taxon_scrub.scrubbed_unique_taxon_name.*");
4848 4848

  
4849 4849

  
4850 4850
--

Also available in: Unified diff