I have this 2 query :

Query #1

```
SELECT A1.clrn_id  ,A1.gpgroup ,A1.cl_id
FROM p_dtl A1
WHERE A1.PYMT_DT = TO_DATE(:1 ,'YYYY-MM-DD') 
and A1.clrn_id in (
                     select clrn_id  
                     from gp_cl_rn run  
                     where run.clrn_id = a1.clrn_id 
                     and run.finalized_ind = :2
                  )
                    AND cl_id IN 
                        ( 
                            SELECT cl_id 
                            FROM hm_sal 
                            WHERE oprt_id ='004038'  
                            AND runctrl_id = :3
                        )  

```

Query #2

```
SELECT B.eid
FROM JBB B
WHERE B.eid IN 
(
    (
        SELECT eid
        FROM pbank A
        WHERE (bankid,branchid) IN 
        (
            SELECT bankid  ,branchid  
            FROM pbranch 
            WHERE sourceid = :1
            AND estat=:2
        )
        AND ESTAT = :2
        AND acct_type = :3
        AND acct_id = (
                select max(D.acct_id) 
                from pbank D 
                where D.eid = A.eid
                AND D.ESTAT = :2
                AND D.acct_type = :3)
     )
)

```

How can I change the `clrn_id` for the 1st query and `B.eid` for the 2nd query into EXISTS function? And are the `bankid`, `branchid` and `acct_id` also changeable into EXISTS function?

Thanks in advance!