Exemple #1
0
def childless_taxa():
    return Taxon.raw(
        "SELECT * FROM taxon WHERE rank > 5 AND id NOT IN (SELECT parent_id FROM taxon WHERE parent_id IS NOT NULL)"
    )
Exemple #2
0
def bad_base_names():
    return Taxon.raw("SELECT * FROM taxon WHERE base_name_id IS NULL OR base_name_id NOT IN (SELECT id FROM name)")