select distinct
b.business_unit
,a.emplid
,' '
,a.strm
,sum(net_award_amt)
from PS_ANTICIPATED_AID a,
ps_bus_unit_tbl_sf b
where a.institution = b.institution
and (a.disb_expire_dt > %currentdatein
or a.disb_expire_dt is null)
and a.as_of_dttm=
(select max(c.as_of_dttm)
from PS_ANTICIPATED_AID c
where a.emplid = c.emplid
and a.institution = c.institution
and a.aid_year = c.aid_year
and a.item_type = c.item_type
and a.acad_career=c.acad_career and a.disbursement_id =
c.disbursement_id)
group by
b.business_unit
,a.emplid
,a.strm
having sum(a.net_award_amt) <> 0
|