SELECT DISTINCT (A.BANK_CD) ,E.LANGUAGE_CD ,E.DESCR ,D.CITY , D.COUNTRY , E.DESCR FROM PS_CSH_FCST_SUM_VW A , PS_TR_CASH_POS_CFG C ,PS_BANK_CD_TBL D ,PS_BANK_CD_LNG E ,PS_BANK_BAL_DAILY F WHERE A.SETID = C.SETID AND A.SETID = D.SETID AND A.BANK_CD = D.BANK_CD AND D.SETID = E.SETID AND D.BANK_CD = E.BANK_CD AND A.WORKSHEET_ID = C.WORKSHEET_ID AND A.GROUP_BY_FIELD = 'BNK' AND A.SOURCE_SET = C.SOURCE_SET AND A.CALC_DT IN ( SELECT MAX(B.CALC_DT) FROM PS_CSH_FCST_SUM_VW B WHERE B.SETID = A.SETID AND B.WORKSHEET_ID = A.WORKSHEET_ID AND B.SOURCE_SET = A.SOURCE_SET AND B.WRKSHEET_LINE_ITEM = A.WRKSHEET_LINE_ITEM AND B.VALUE_DT = A.VALUE_DT AND B.POSITION_CURRENCY = A.POSITION_CURRENCY) AND F.BNK_ID_NBR = D.BNK_ID_NBR
|