AND f.end_dte = (SELECT MAX(f.end_dte)
FROM bfg_admin.com_partic_info_stat e,
bfg_admin.db_ann_earning_hist f
WHERE f.emp_employee_id = e.db_employee_id)
AND g.amount = (SELECT MAX(g.amount)
FROM bfg_admin.db_payment_hist g,
bfg_admin.db_relationship_hist d
WHERE g.ca_indicative_id = d.ind_indicative_id)

Why would this not work? I need the Max of (f.end_dte) but only the records
that have the Max of (g.amount) to show up too. So in essence I want the
second subquery to only apply to the first subquery and not to the entire
query. Right now it only seems to be applying to the entire query.