NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

--Tong so case da phan cong

select a.collector,count(a.cif_no)so_case,a.cd branch from
(select distinct work.RECIPIENT_ID collector,tc.cif_no,br.cd,mt_membertype.dscp
from EBDCRS.T_WORKFLOW_HISTS work
inner join EBDCRS.T_MT_ROUTING_TYPS routing on work.MT_ROUTING_TYP_ID = routing.id
inner join EBDCRS.T_CASES tc on tc.mcase_id = work.mcase_id
inner join EBDCRS.T_MT_BRANCHES br on br.id = tc.MT_CENTRE_ID
inner join EBDCRS.T_TEAM_MEMBER_MEMBERTYP_RELS membertyp_rels on membertyp_rels.SEC_USER_ID = work.RECIPIENT_ID
inner join EBDCRS.T_MEMBERTYP_RELS rels on rels.id = membertyp_rels.MEMBERTYP_REL_ID
inner join EBDCRS.T_MT_MEMBER_TYPS mt_membertype on mt_membertype.id = rels.MT_MEMBER_TYP_ID
where routing.cd in ('CASE_REASSIGNMENT','ROUTING')
and tc.BATCH_ID = 'RECOVERY'
and mt_membertype.dscp not in ('Branch Team Leader','ECA Team Leader','Team Lead')) a
group by a.collector,a.cd

/////////////////////////////////////////////////

--Case bi cured

select a.collector,count(a.cif_no)so_case,a.cd branch from
(select distinct ta.curr_user_id collector,tc.cif_no,br.cd,mt_membertype.dscp
from EBDCRS.T_CASES tc
inner join EBDCRS.T_ASSIGNMENTS ta on ta.mcase_id = tc.MCASE_ID
inner join EBDCRS.T_MT_BRANCHES br on br.id = tc.MT_CENTRE_ID
inner join EBDCRS.T_TEAM_MEMBER_MEMBERTYP_RELS membertyp_rels on membertyp_rels.SEC_USER_ID = ta.curr_user_id
inner join EBDCRS.T_MEMBERTYP_RELS rels on rels.id = membertyp_rels.MEMBERTYP_REL_ID
inner join EBDCRS.T_MT_MEMBER_TYPS mt_membertype on mt_membertype.id = rels.MT_MEMBER_TYP_ID
where tc.mcase_id in
(select distinct work.mcase_id
from EBDCRS.T_WORKFLOW_HISTS work
inner join EBDCRS.T_MT_ROUTING_TYPS routing on work.MT_ROUTING_TYP_ID = routing.id
where routing.cd in ('CASE_REASSIGNMENT','ROUTING'))
and not exists
(SELECT DISTINCT tc1.mcase_id
FROM ebdcrs.t_cases tc1
WHERE tc1.is_cured = 'N'
AND tc.mcase_id = tc1.mcase_id)
and mt_membertype.dscp not in ('Branch Team Leader','ECA Team Leader','Team Lead')
and tc.batch_id = 'RECOVERY')a
group by a.collector,a.cd


///////////////////////////////////////////////////////

--Case bị out of bound


select a.collector,count(a.cif_no)so_case,a.cd branch from
(select distinct ta.curr_user_id collector,tc.cif_no,br.cd,mt_membertype.dscp
from EBDCRS.T_CASES tc
inner join EBDCRS.T_ASSIGNMENTS ta on ta.mcase_id = tc.MCASE_ID
inner join EBDCRS.T_MT_BRANCHES br on br.id = tc.MT_CENTRE_ID
inner join EBDCRS.T_TEAM_MEMBER_MEMBERTYP_RELS membertyp_rels on membertyp_rels.SEC_USER_ID = ta.curr_user_id
inner join EBDCRS.T_MEMBERTYP_RELS rels on rels.id = membertyp_rels.MEMBERTYP_REL_ID
inner join EBDCRS.T_MT_MEMBER_TYPS mt_membertype on mt_membertype.id = rels.MT_MEMBER_TYP_ID
where tc.mcase_id in
(select distinct work.mcase_id
from EBDCRS.T_WORKFLOW_HISTS work
inner join EBDCRS.T_MT_ROUTING_TYPS routing on work.MT_ROUTING_TYP_ID = routing.id
where routing.cd in ('CASE_REASSIGNMENT','ROUTING'))
and not exists
(SELECT DISTINCT tc1.mcase_id
FROM ebdcrs.t_cases tc1
WHERE tc1.is_out_of_bound = 'N'
AND tc.mcase_id = tc1.mcase_id)
and mt_membertype.dscp not in ('Branch Team Leader','ECA Team Leader','Team Lead')
and tc.batch_id = 'RECOVERY')a
group by a.collector,a.cd


/////////////////////////////////////////////////
--So khach hang chuyen cho nguoi khac

select a.collector,count(a.cif_no)so_case,a.cd branch from
(select distinct work.RECIPIENT_ID collector,tc.cif_no,br.cd,mt_membertype.dscp
from EBDCRS.T_WORKFLOW_HISTS work
inner join EBDCRS.T_MT_ROUTING_TYPS routing on work.MT_ROUTING_TYP_ID = routing.id
inner join EBDCRS.T_CASES tc on tc.mcase_id = work.mcase_id
inner join EBDCRS.T_ASSIGNMENTS ta on ta.mcase_id = work.MCASE_ID
inner join EBDCRS.T_MT_BRANCHES br on br.id = tc.MT_CENTRE_ID
inner join EBDCRS.T_TEAM_MEMBER_MEMBERTYP_RELS membertyp_rels on membertyp_rels.SEC_USER_ID = work.RECIPIENT_ID
inner join EBDCRS.T_MEMBERTYP_RELS rels on rels.id = membertyp_rels.MEMBERTYP_REL_ID
inner join EBDCRS.T_MT_MEMBER_TYPS mt_membertype on mt_membertype.id = rels.MT_MEMBER_TYP_ID
where routing.cd in ('CASE_REASSIGNMENT','ROUTING') and ta.CURR_USER_ID <> work.RECIPIENT_ID
and mt_membertype.dscp not in ('Branch Team Leader','ECA Team Leader','Team Lead')
and tc.BATCH_ID = 'RECOVERY') a
group by a.collector,a.cd

/////////////////////////////////////////////////////

--So case can xu ly

select a.collector,count(a.cif_no)so_case,a.cd branch from
(select distinct ta.curr_user_id collector,tc.cif_no,br.cd,mt_membertype.dscp
from EBDCRS.T_CASES tc
inner join EBDCRS.T_ASSIGNMENTS ta on ta.mcase_id = tc.MCASE_ID
inner join EBDCRS.T_MT_BRANCHES br on br.id = tc.MT_CENTRE_ID
inner join EBDCRS.T_TEAM_MEMBER_MEMBERTYP_RELS membertyp_rels on membertyp_rels.SEC_USER_ID = ta.curr_user_id
inner join EBDCRS.T_MEMBERTYP_RELS rels on rels.id = membertyp_rels.MEMBERTYP_REL_ID
inner join EBDCRS.T_MT_MEMBER_TYPS mt_membertype on mt_membertype.id = rels.MT_MEMBER_TYP_ID
where tc.mcase_id in
(select distinct work.mcase_id
from EBDCRS.T_WORKFLOW_HISTS work
inner join EBDCRS.T_MT_ROUTING_TYPS routing on work.MT_ROUTING_TYP_ID = routing.id
where routing.cd in ('CASE_REASSIGNMENT','ROUTING'))
and mt_membertype.dscp not in ('Branch Team Leader','ECA Team Leader','Team Lead')
and tc.mcase_id IN
(SELECT DISTINCT tc1.mcase_id
FROM ebdcrs.t_cases tc1
WHERE tc1.is_cured = 'N'
AND tc1.is_out_of_bound = 'N') )a
group by a.collector,a.cd

///////////////////////////////////////////////////////////////////

--Du no goc can thu


select a.collector,sum(a.AMT_OS_PRINCIPAL),a.cd branch from
(select distinct ta.curr_user_id collector,tc.cif_no,b.AMT_OS_PRINCIPAL,br.cd,mt_membertype.dscp
from EBDCRS.T_CASES tc
inner join EBDCRS.T_ASSIGNMENTS ta on ta.mcase_id = tc.MCASE_ID
inner join EBDCRS.T_MT_BRANCHES br on br.id = tc.MT_CENTRE_ID
inner join EBDCRS.T_TEAM_MEMBER_MEMBERTYP_RELS membertyp_rels on membertyp_rels.SEC_USER_ID = ta.curr_user_id
inner join EBDCRS.T_MEMBERTYP_RELS rels on rels.id = membertyp_rels.MEMBERTYP_REL_ID
inner join EBDCRS.T_MT_MEMBER_TYPS mt_membertype on mt_membertype.id = rels.MT_MEMBER_TYP_ID
inner join
(select case.mcase_id,SUM(NVL(DECODE(host.cd,'TW',acct.amt_os_principal,acct.due_principal_amt),0)) amt_os_principal
from ebdcrs.t_ht_accts acct
inner join ebdcrs.t_cases case on case.acct_no = acct.acct_no
inner join ebdcrs.t_mt_hosts host on host.id = acct.mt_host_id
where case.cpf_flag = 'Y'
group by case.mcase_id) b on b.mcase_id = tc.mcase_id
where tc.mcase_id in
(select distinct work.mcase_id
from EBDCRS.T_WORKFLOW_HISTS work
inner join EBDCRS.T_MT_ROUTING_TYPS routing on work.MT_ROUTING_TYP_ID = routing.id
where routing.cd in ('CASE_REASSIGNMENT','ROUTING'))
and mt_membertype.dscp not in ('Branch Team Leader','ECA Team Leader','Team Lead')
and tc.batch_id = 'RECOVERY'
and tc.mcase_id IN
(SELECT DISTINCT tc1.mcase_id
FROM ebdcrs.t_cases tc1
WHERE tc1.is_cured = 'N'
AND tc1.is_out_of_bound = 'N')) a
group by a.collector,a.cd

     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.