hi
I am executing below query
select classification, member_id,sum(share_amount) amt from (
select a.cif_id,a.member_id,a.share_amount,b.name,a.share_closed_flg,a.share_closeddate,
a.classification,a.status,a.date_of_issue,
case when (a.share_closed_flg='Y' and a.share_closeddate>to_date('13-JAN-2023','dd-mon-yyyy')) or a.share_closed_flg='N'
then 'live' else 'closed' end stat
from cus.c_cxxt a inner join crm.accxxxs b on a.cif_id=b.orgkey
where a.del_flg='N' and a.bank_id='01' and trunc(a.date_of_issue)<=to_date('13-jan-2023','dd-mon-yyyy')
) where stat='live' and trim(classification)='R' --and trim(status)='S'
group by classification,member_id
with this query I shoud be able to display a record having member_id as ‘81805’ as share_closeddate is 13-jan-2023
but the same is not being displayed ..
what wrong I am doing here?
Please help