Apply check for final ages

sql_check_FINAL_FISH_AGE_IN_YEARS()

Details

sql_check_FINAL_FISH_AGE_IN_YEARS() results in a data frame of number of unique FISH_IDs present in PacFIN per PACFIN_SPECIES_CODE and AGENCY_CODE, i.e., species and state sampling agency, that have entries for AGE_IN_YEARS but have NULL values for FINAL_FISH_AGE_IN_YEARS. In theory, this table should have zero rows. But, there may be reasons why these entries do not have a final age value and potentially should not be used in assessments of population status. Thus, the result is used in an automated check and to create warning labels when downloading data.