SELECT
        T.NENDO
        ,T.RANKRITU
        ,M.RANKNAME
        ,T.TOTALDATE
        ,T.KNO
    FROM
        C_KANGEN_PRESYU T
        ,C_RANKRITU_MST M
    WHERE
        T.NENDO = M.NENDO
        AND T.COOP_CD = 493
        AND T.NENDO = TO_NUMBER(TO_CHAR(SF_TOTAL_ZENNENDO(sysdate), 'YYYY') -1)
        AND T.RANKRITU = M.RANKRITU
        AND T.TOTALDATE = TO_CHAR(SF_TOTAL_ZENNENDO(sysdate), 'YYYYMMDD');