You are on page 1of 2

select DISTINCT a.

pin_no

from kra_itms.tre_tax_payer_mst a

left outer join kra_itms.tre_taxpayer_obligation_dtl b on a.tax_payer_id=b.tax_payer_id

left outer join kra_itms.trp_returns_register c on a.tax_payer_id=c.tax_payer_id

left outer join kra_itms.bcl_payment_hdr d on a.tax_payer_id=d.tax_payer_id

where a.ipage_processed='Y' and a.tax_payer_type='NONINDI'

and b.obligation_id=9

and d.tax_payer_id is null

and c.trp_from_dt is null

limit 500

SELECT * from sem_user_mst m where m.user_id in(

SELECT d.user_id from sem_user_dtl d where d.user_sys_id in (

SELECT e.process_exec_user_id from wfm_process_execution e where e.process_exec_ref_id in

(select process_exec_ref_id from kra_itms.wfm_process_execution where process_exec_ref_id in(select


trp_id from kra_itms.trp_returns_register where trp_no = 'KRA201424341152'))));

TCC

select DISTINCT a.pin_no

from kra_itms.tre_tax_payer_mst a

left outer join kra_itms.tre_taxpayer_obligation_dtl b on a.tax_payer_id=b.tax_payer_id

left outer join kra_itms.trp_returns_register c on a.tax_payer_id=c.tax_payer_id

left outer join kra_itms.bcl_payment_hdr d on a.tax_payer_id=d.tax_payer_id

left outer join kra_itms.cam_tcc_dtls tcc on a.tax_payer_id=tcc.taxpayer_id

where a.ipage_processed='Y' and a.tax_payer_type='NONINDI'

and b.obligation_id=9
and d.tax_payer_id is null

and c.trp_from_dt is null

and tcc.taxpayer_id is null

limit 10

You might also like