Revision 7854
Added by Aaron Marcuse-Kubitza over 11 years ago
vegbien.sql | ||
---|---|---|
4628 | 4628 |
-- |
4629 | 4629 |
|
4630 | 4630 |
CREATE VIEW tnrs_input_name AS |
4631 |
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 (taxonlabel.matched_label_id IS NULL)) AND ("MatchedTaxon"."concatenatedScientificName" IS NULL)) EXCEPT SELECT "AcceptedTaxon".taxonomicname FROM "AcceptedTaxon");
|
|
4631 |
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");
|
|
4632 | 4632 |
|
4633 | 4633 |
|
4634 | 4634 |
-- |
Also available in: Unified diff
schemas/vegbien.sql: tnrs_input_name: taxonlabel.taxonomicname subquery: Don't exclude taxonlabels with a matched_label_id, because matched_label_id is no longer used to indicate that a name has a scrubbed name (this was used when all of TNRS was imported at the beginning of the import)