/* 적금의 현재가치 엑셀산식 =ROUND(PV(0.0021, 1, -10000000), -1) =ROUND(PV(0.0021, 2, -10000000), -1) =ROUND(PV(0.0021, 3, -10000000), -1) =ROUND(PV(0.0021, 4, -10000000), -1) =ROUND(PV(0.0021, 5, -10000000), -1) =ROUND(PV(0.0021, 6, -10000000), -1) =ROUND(PV(0.0021, 7, -10000000), -1) =ROUND(PV(0.0021, 8, -10000000), -1) =ROUND(PV(0.0021, 9, -10000000), -1) =ROUND(PV(0.0021, 10, -10000000), -1) =ROUND(PV(0.0021, 11, -10000000), -1) =ROUND(PV(0.0021, 12, -10000000), -1) 2019.03.15, Jun H. Lee */ SELECT LEVEL AS SEQ /*회차*/ , ROUND(SUM(CF / POWER(1+INT, LEVEL))OVER(ORDER BY LEVEL ASC), -1) AS PV /*현재가치*/ FROM ( SELECT 1E7 AS CF /*현금흐름(cash-flow)*/ , 0.21E-2 AS INT /*이율*/ FROM DUAL ) CONNECT BY LEVEL <= 12 ;