Project

General

Profile

« Previous | Next » 

Revision 14434

inputs/.TNRS/schema.sql: taxon_scrub: use taxon_best_match directly, to avoid the need for a separate ValidMatchedTaxon view

View differences:

trunk/inputs/.TNRS/schema.sql
1687 1687
--
1688 1688

  
1689 1689
CREATE VIEW taxon_scrub AS
1690
 SELECT "ValidMatchedTaxon".batch,
1691
    "ValidMatchedTaxon".match_num,
1692
    "ValidMatchedTaxon"."*Name_number",
1693
    "ValidMatchedTaxon"."*Name_submitted",
1694
    "ValidMatchedTaxon"."*Overall_score",
1695
    "ValidMatchedTaxon"."*Name_matched",
1696
    "ValidMatchedTaxon"."*Name_matched_rank",
1697
    "ValidMatchedTaxon"."*Name_score",
1698
    "ValidMatchedTaxon"."*Name_matched_author",
1699
    "ValidMatchedTaxon"."*Name_matched_url",
1700
    "ValidMatchedTaxon"."*Author_matched",
1701
    "ValidMatchedTaxon"."*Author_score",
1702
    "ValidMatchedTaxon"."*Family_matched",
1703
    "ValidMatchedTaxon"."*Family_score",
1704
    "ValidMatchedTaxon"."*Name_matched_accepted_family",
1705
    "ValidMatchedTaxon"."*Genus_matched",
1706
    "ValidMatchedTaxon"."*Genus_score",
1707
    "ValidMatchedTaxon"."*Specific_epithet_matched",
1708
    "ValidMatchedTaxon"."*Specific_epithet_score",
1709
    "ValidMatchedTaxon"."*Infraspecific_rank",
1710
    "ValidMatchedTaxon"."*Infraspecific_epithet_matched",
1711
    "ValidMatchedTaxon"."*Infraspecific_epithet_score",
1712
    "ValidMatchedTaxon"."*Infraspecific_rank_2",
1713
    "ValidMatchedTaxon"."*Infraspecific_epithet_2_matched",
1714
    "ValidMatchedTaxon"."*Infraspecific_epithet_2_score",
1715
    "ValidMatchedTaxon"."*Annotations",
1716
    "ValidMatchedTaxon"."*Unmatched_terms",
1717
    "ValidMatchedTaxon"."*Taxonomic_status",
1718
    "ValidMatchedTaxon"."*Accepted_name",
1719
    "ValidMatchedTaxon"."*Accepted_name_author",
1720
    "ValidMatchedTaxon"."*Accepted_name_rank",
1721
    "ValidMatchedTaxon"."*Accepted_name_url",
1722
    "ValidMatchedTaxon"."*Accepted_name_species",
1723
    "ValidMatchedTaxon"."*Accepted_name_family",
1724
    "ValidMatchedTaxon"."*Selected",
1725
    "ValidMatchedTaxon"."*Source",
1726
    "ValidMatchedTaxon"."*Warnings",
1727
    "ValidMatchedTaxon"."*Accepted_name_lsid",
1728
    "ValidMatchedTaxon".is_valid_match,
1729
    "ValidMatchedTaxon".scrubbed_unique_taxon_name,
1730
    "ValidMatchedTaxon"."[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org",
1731
    "ValidMatchedTaxon"."[matched_]species[_binomial]~(-Accepted_-)__@TNRS__@vegpath.org",
1732
    "ValidMatchedTaxon"."matched~Name[_no_author]___@TNRS__@vegpath.org",
1733
    "ValidMatchedTaxon"."[matched_]scientificName[_with_author]__@DwC__@vegpath.org",
1734
    "ValidMatchedTaxon".matched_has_accepted,
1735
    "ValidMatchedTaxon"."Accepted_family__@TNRS__@vegpath.org",
1736
    "ValidMatchedTaxon"."Accepted_species[_binomial]__@TNRS__@vegpath.org",
1737
    "ValidMatchedTaxon"."__accepted_{genus,specific_epithet,infra_{rank,epithet}}",
1738
    "ValidMatchedTaxon"."[accepted_]genus__@DwC__@vegpath.org",
1739
    "ValidMatchedTaxon"."[accepted_]specificEpithet__@DwC__@vegpath.org",
1740
    "ValidMatchedTaxon"."[accepted_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org",
1741
    "ValidMatchedTaxon"."__accepted_infraspecific_{rank,epithet}",
1742
    "ValidMatchedTaxon"."[accepted_]Infraspecific_rank[_abbr]__@TNRS__@vegpath.org",
1743
    "ValidMatchedTaxon"."[accepted_]infraspecificEpithet__@DwC__@vegpath.org",
1744
    "ValidMatchedTaxon"."[accepted_]scientificName[_with_author]__@DwC__@vegpath.org",
1745
    "ValidMatchedTaxon"."[scrubbed_]taxonomicStatus__@DwC__@vegpath.org",
1746
    "ValidMatchedTaxon"."[scrubbed_]taxonRank__@DwC__@vegpath.org",
1747
    "ValidMatchedTaxon"."[scrubbed_]family~(-Accepted_-)__@TNRS__@vegpath.org",
1748
    "ValidMatchedTaxon"."[scrubbed_]genus__@DwC__@vegpath.org",
1749
    "ValidMatchedTaxon"."[scrubbed_]specificEpithet__@DwC__@vegpath.org",
1750
    "ValidMatchedTaxon"."[scrubbed_]species[_binom]~(-Accepted_-)__@TNRS__@vegpath.org",
1751
    "ValidMatchedTaxon"."[scrubbed_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org",
1752
    "ValidMatchedTaxon"."[scrubbed_]Infraspecific_rank[_abbr]__@TNRS__@vegpath.org",
1753
    "ValidMatchedTaxon"."[scrubbed_]infraspecificEpithet__@DwC__@vegpath.org",
1754
    "ValidMatchedTaxon"."[scrubbed_]name[_no_author]~(-Accepted_-)__@TNRS__@vegpath.org",
1755
    "ValidMatchedTaxon"."[scrubbed_]author~(-Accepted_-)__@TNRS__@vegpath.org",
1756
    "ValidMatchedTaxon"."[scrubbed_]scientificName[_with_author]__@DwC__@vegpath.org"
1757
   FROM "ValidMatchedTaxon";
1690
 SELECT taxon_best_match.batch,
1691
    taxon_best_match.match_num,
1692
    taxon_best_match."*Name_number",
1693
    taxon_best_match."*Name_submitted",
1694
    taxon_best_match."*Overall_score",
1695
    taxon_best_match."*Name_matched",
1696
    taxon_best_match."*Name_matched_rank",
1697
    taxon_best_match."*Name_score",
1698
    taxon_best_match."*Name_matched_author",
1699
    taxon_best_match."*Name_matched_url",
1700
    taxon_best_match."*Author_matched",
1701
    taxon_best_match."*Author_score",
1702
    taxon_best_match."*Family_matched",
1703
    taxon_best_match."*Family_score",
1704
    taxon_best_match."*Name_matched_accepted_family",
1705
    taxon_best_match."*Genus_matched",
1706
    taxon_best_match."*Genus_score",
1707
    taxon_best_match."*Specific_epithet_matched",
1708
    taxon_best_match."*Specific_epithet_score",
1709
    taxon_best_match."*Infraspecific_rank",
1710
    taxon_best_match."*Infraspecific_epithet_matched",
1711
    taxon_best_match."*Infraspecific_epithet_score",
1712
    taxon_best_match."*Infraspecific_rank_2",
1713
    taxon_best_match."*Infraspecific_epithet_2_matched",
1714
    taxon_best_match."*Infraspecific_epithet_2_score",
1715
    taxon_best_match."*Annotations",
1716
    taxon_best_match."*Unmatched_terms",
1717
    taxon_best_match."*Taxonomic_status",
1718
    taxon_best_match."*Accepted_name",
1719
    taxon_best_match."*Accepted_name_author",
1720
    taxon_best_match."*Accepted_name_rank",
1721
    taxon_best_match."*Accepted_name_url",
1722
    taxon_best_match."*Accepted_name_species",
1723
    taxon_best_match."*Accepted_name_family",
1724
    taxon_best_match."*Selected",
1725
    taxon_best_match."*Source",
1726
    taxon_best_match."*Warnings",
1727
    taxon_best_match."*Accepted_name_lsid",
1728
    taxon_best_match.is_valid_match,
1729
    taxon_best_match.scrubbed_unique_taxon_name,
1730
    taxon_best_match."[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org",
1731
    taxon_best_match."[matched_]species[_binomial]~(-Accepted_-)__@TNRS__@vegpath.org",
1732
    taxon_best_match."matched~Name[_no_author]___@TNRS__@vegpath.org",
1733
    taxon_best_match."[matched_]scientificName[_with_author]__@DwC__@vegpath.org",
1734
    taxon_best_match.matched_has_accepted,
1735
    taxon_best_match."Accepted_family__@TNRS__@vegpath.org",
1736
    taxon_best_match."Accepted_species[_binomial]__@TNRS__@vegpath.org",
1737
    taxon_best_match."__accepted_{genus,specific_epithet,infra_{rank,epithet}}",
1738
    taxon_best_match."[accepted_]genus__@DwC__@vegpath.org",
1739
    taxon_best_match."[accepted_]specificEpithet__@DwC__@vegpath.org",
1740
    taxon_best_match."[accepted_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org",
1741
    taxon_best_match."__accepted_infraspecific_{rank,epithet}",
1742
    taxon_best_match."[accepted_]Infraspecific_rank[_abbr]__@TNRS__@vegpath.org",
1743
    taxon_best_match."[accepted_]infraspecificEpithet__@DwC__@vegpath.org",
1744
    taxon_best_match."[accepted_]scientificName[_with_author]__@DwC__@vegpath.org",
1745
    taxon_best_match."[scrubbed_]taxonomicStatus__@DwC__@vegpath.org",
1746
    taxon_best_match."[scrubbed_]taxonRank__@DwC__@vegpath.org",
1747
    taxon_best_match."[scrubbed_]family~(-Accepted_-)__@TNRS__@vegpath.org",
1748
    taxon_best_match."[scrubbed_]genus__@DwC__@vegpath.org",
1749
    taxon_best_match."[scrubbed_]specificEpithet__@DwC__@vegpath.org",
1750
    taxon_best_match."[scrubbed_]species[_binom]~(-Accepted_-)__@TNRS__@vegpath.org",
1751
    taxon_best_match."[scrubbed_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org",
1752
    taxon_best_match."[scrubbed_]Infraspecific_rank[_abbr]__@TNRS__@vegpath.org",
1753
    taxon_best_match."[scrubbed_]infraspecificEpithet__@DwC__@vegpath.org",
1754
    taxon_best_match."[scrubbed_]name[_no_author]~(-Accepted_-)__@TNRS__@vegpath.org",
1755
    taxon_best_match."[scrubbed_]author~(-Accepted_-)__@TNRS__@vegpath.org",
1756
    taxon_best_match."[scrubbed_]scientificName[_with_author]__@DwC__@vegpath.org"
1757
   FROM taxon_best_match
1758
  WHERE taxon_best_match.is_valid_match;
1758 1759

  
1759 1760

  
1760 1761
--
trunk/schemas/vegbien.sql
21609 21609
--
21610 21610

  
21611 21611
CREATE VIEW taxon_scrub AS
21612
 SELECT "ValidMatchedTaxon".batch,
21613
    "ValidMatchedTaxon".match_num,
21614
    "ValidMatchedTaxon"."*Name_number",
21615
    "ValidMatchedTaxon"."*Name_submitted",
21616
    "ValidMatchedTaxon"."*Overall_score",
21617
    "ValidMatchedTaxon"."*Name_matched",
21618
    "ValidMatchedTaxon"."*Name_matched_rank",
21619
    "ValidMatchedTaxon"."*Name_score",
21620
    "ValidMatchedTaxon"."*Name_matched_author",
21621
    "ValidMatchedTaxon"."*Name_matched_url",
21622
    "ValidMatchedTaxon"."*Author_matched",
21623
    "ValidMatchedTaxon"."*Author_score",
21624
    "ValidMatchedTaxon"."*Family_matched",
21625
    "ValidMatchedTaxon"."*Family_score",
21626
    "ValidMatchedTaxon"."*Name_matched_accepted_family",
21627
    "ValidMatchedTaxon"."*Genus_matched",
21628
    "ValidMatchedTaxon"."*Genus_score",
21629
    "ValidMatchedTaxon"."*Specific_epithet_matched",
21630
    "ValidMatchedTaxon"."*Specific_epithet_score",
21631
    "ValidMatchedTaxon"."*Infraspecific_rank",
21632
    "ValidMatchedTaxon"."*Infraspecific_epithet_matched",
21633
    "ValidMatchedTaxon"."*Infraspecific_epithet_score",
21634
    "ValidMatchedTaxon"."*Infraspecific_rank_2",
21635
    "ValidMatchedTaxon"."*Infraspecific_epithet_2_matched",
21636
    "ValidMatchedTaxon"."*Infraspecific_epithet_2_score",
21637
    "ValidMatchedTaxon"."*Annotations",
21638
    "ValidMatchedTaxon"."*Unmatched_terms",
21639
    "ValidMatchedTaxon"."*Taxonomic_status",
21640
    "ValidMatchedTaxon"."*Accepted_name",
21641
    "ValidMatchedTaxon"."*Accepted_name_author",
21642
    "ValidMatchedTaxon"."*Accepted_name_rank",
21643
    "ValidMatchedTaxon"."*Accepted_name_url",
21644
    "ValidMatchedTaxon"."*Accepted_name_species",
21645
    "ValidMatchedTaxon"."*Accepted_name_family",
21646
    "ValidMatchedTaxon"."*Selected",
21647
    "ValidMatchedTaxon"."*Source",
21648
    "ValidMatchedTaxon"."*Warnings",
21649
    "ValidMatchedTaxon"."*Accepted_name_lsid",
21650
    "ValidMatchedTaxon".is_valid_match,
21651
    "ValidMatchedTaxon".scrubbed_unique_taxon_name,
21652
    "ValidMatchedTaxon"."[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org",
21653
    "ValidMatchedTaxon"."[matched_]species[_binomial]~(-Accepted_-)__@TNRS__@vegpath.org",
21654
    "ValidMatchedTaxon"."matched~Name[_no_author]___@TNRS__@vegpath.org",
21655
    "ValidMatchedTaxon"."[matched_]scientificName[_with_author]__@DwC__@vegpath.org",
21656
    "ValidMatchedTaxon".matched_has_accepted,
21657
    "ValidMatchedTaxon"."Accepted_family__@TNRS__@vegpath.org",
21658
    "ValidMatchedTaxon"."Accepted_species[_binomial]__@TNRS__@vegpath.org",
21659
    "ValidMatchedTaxon"."__accepted_{genus,specific_epithet,infra_{rank,epithet}}",
21660
    "ValidMatchedTaxon"."[accepted_]genus__@DwC__@vegpath.org",
21661
    "ValidMatchedTaxon"."[accepted_]specificEpithet__@DwC__@vegpath.org",
21662
    "ValidMatchedTaxon"."[accepted_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org",
21663
    "ValidMatchedTaxon"."__accepted_infraspecific_{rank,epithet}",
21664
    "ValidMatchedTaxon"."[accepted_]Infraspecific_rank[_abbr]__@TNRS__@vegpath.org",
21665
    "ValidMatchedTaxon"."[accepted_]infraspecificEpithet__@DwC__@vegpath.org",
21666
    "ValidMatchedTaxon"."[accepted_]scientificName[_with_author]__@DwC__@vegpath.org",
21667
    "ValidMatchedTaxon"."[scrubbed_]taxonomicStatus__@DwC__@vegpath.org",
21668
    "ValidMatchedTaxon"."[scrubbed_]taxonRank__@DwC__@vegpath.org",
21669
    "ValidMatchedTaxon"."[scrubbed_]family~(-Accepted_-)__@TNRS__@vegpath.org",
21670
    "ValidMatchedTaxon"."[scrubbed_]genus__@DwC__@vegpath.org",
21671
    "ValidMatchedTaxon"."[scrubbed_]specificEpithet__@DwC__@vegpath.org",
21672
    "ValidMatchedTaxon"."[scrubbed_]species[_binom]~(-Accepted_-)__@TNRS__@vegpath.org",
21673
    "ValidMatchedTaxon"."[scrubbed_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org",
21674
    "ValidMatchedTaxon"."[scrubbed_]Infraspecific_rank[_abbr]__@TNRS__@vegpath.org",
21675
    "ValidMatchedTaxon"."[scrubbed_]infraspecificEpithet__@DwC__@vegpath.org",
21676
    "ValidMatchedTaxon"."[scrubbed_]name[_no_author]~(-Accepted_-)__@TNRS__@vegpath.org",
21677
    "ValidMatchedTaxon"."[scrubbed_]author~(-Accepted_-)__@TNRS__@vegpath.org",
21678
    "ValidMatchedTaxon"."[scrubbed_]scientificName[_with_author]__@DwC__@vegpath.org"
21679
   FROM "ValidMatchedTaxon";
21612
 SELECT taxon_best_match.batch,
21613
    taxon_best_match.match_num,
21614
    taxon_best_match."*Name_number",
21615
    taxon_best_match."*Name_submitted",
21616
    taxon_best_match."*Overall_score",
21617
    taxon_best_match."*Name_matched",
21618
    taxon_best_match."*Name_matched_rank",
21619
    taxon_best_match."*Name_score",
21620
    taxon_best_match."*Name_matched_author",
21621
    taxon_best_match."*Name_matched_url",
21622
    taxon_best_match."*Author_matched",
21623
    taxon_best_match."*Author_score",
21624
    taxon_best_match."*Family_matched",
21625
    taxon_best_match."*Family_score",
21626
    taxon_best_match."*Name_matched_accepted_family",
21627
    taxon_best_match."*Genus_matched",
21628
    taxon_best_match."*Genus_score",
21629
    taxon_best_match."*Specific_epithet_matched",
21630
    taxon_best_match."*Specific_epithet_score",
21631
    taxon_best_match."*Infraspecific_rank",
21632
    taxon_best_match."*Infraspecific_epithet_matched",
21633
    taxon_best_match."*Infraspecific_epithet_score",
21634
    taxon_best_match."*Infraspecific_rank_2",
21635
    taxon_best_match."*Infraspecific_epithet_2_matched",
21636
    taxon_best_match."*Infraspecific_epithet_2_score",
21637
    taxon_best_match."*Annotations",
21638
    taxon_best_match."*Unmatched_terms",
21639
    taxon_best_match."*Taxonomic_status",
21640
    taxon_best_match."*Accepted_name",
21641
    taxon_best_match."*Accepted_name_author",
21642
    taxon_best_match."*Accepted_name_rank",
21643
    taxon_best_match."*Accepted_name_url",
21644
    taxon_best_match."*Accepted_name_species",
21645
    taxon_best_match."*Accepted_name_family",
21646
    taxon_best_match."*Selected",
21647
    taxon_best_match."*Source",
21648
    taxon_best_match."*Warnings",
21649
    taxon_best_match."*Accepted_name_lsid",
21650
    taxon_best_match.is_valid_match,
21651
    taxon_best_match.scrubbed_unique_taxon_name,
21652
    taxon_best_match."[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org",
21653
    taxon_best_match."[matched_]species[_binomial]~(-Accepted_-)__@TNRS__@vegpath.org",
21654
    taxon_best_match."matched~Name[_no_author]___@TNRS__@vegpath.org",
21655
    taxon_best_match."[matched_]scientificName[_with_author]__@DwC__@vegpath.org",
21656
    taxon_best_match.matched_has_accepted,
21657
    taxon_best_match."Accepted_family__@TNRS__@vegpath.org",
21658
    taxon_best_match."Accepted_species[_binomial]__@TNRS__@vegpath.org",
21659
    taxon_best_match."__accepted_{genus,specific_epithet,infra_{rank,epithet}}",
21660
    taxon_best_match."[accepted_]genus__@DwC__@vegpath.org",
21661
    taxon_best_match."[accepted_]specificEpithet__@DwC__@vegpath.org",
21662
    taxon_best_match."[accepted_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org",
21663
    taxon_best_match."__accepted_infraspecific_{rank,epithet}",
21664
    taxon_best_match."[accepted_]Infraspecific_rank[_abbr]__@TNRS__@vegpath.org",
21665
    taxon_best_match."[accepted_]infraspecificEpithet__@DwC__@vegpath.org",
21666
    taxon_best_match."[accepted_]scientificName[_with_author]__@DwC__@vegpath.org",
21667
    taxon_best_match."[scrubbed_]taxonomicStatus__@DwC__@vegpath.org",
21668
    taxon_best_match."[scrubbed_]taxonRank__@DwC__@vegpath.org",
21669
    taxon_best_match."[scrubbed_]family~(-Accepted_-)__@TNRS__@vegpath.org",
21670
    taxon_best_match."[scrubbed_]genus__@DwC__@vegpath.org",
21671
    taxon_best_match."[scrubbed_]specificEpithet__@DwC__@vegpath.org",
21672
    taxon_best_match."[scrubbed_]species[_binom]~(-Accepted_-)__@TNRS__@vegpath.org",
21673
    taxon_best_match."[scrubbed_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org",
21674
    taxon_best_match."[scrubbed_]Infraspecific_rank[_abbr]__@TNRS__@vegpath.org",
21675
    taxon_best_match."[scrubbed_]infraspecificEpithet__@DwC__@vegpath.org",
21676
    taxon_best_match."[scrubbed_]name[_no_author]~(-Accepted_-)__@TNRS__@vegpath.org",
21677
    taxon_best_match."[scrubbed_]author~(-Accepted_-)__@TNRS__@vegpath.org",
21678
    taxon_best_match."[scrubbed_]scientificName[_with_author]__@DwC__@vegpath.org"
21679
   FROM taxon_best_match
21680
  WHERE taxon_best_match.is_valid_match;
21680 21681

  
21681 21682

  
21682 21683
--

Also available in: Unified diff