행위

복리계산 SQL

DB CAFE

Dbcafe (토론 | 기여)님의 2024년 2월 5일 (월) 14:35 판 (새 문서: === 복리 계산 SQL === <source lang=sql> select lv ||'년 후‘ , to_char(round(A.basic_amt * power((1 + a.interest) , b.lv),0), 'FM999,999,999,999') price from (select 100...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
thumb_up 추천메뉴 바로가기


복리 계산 SQL[편집]

select lv ||'년 후‘
     , to_char(round(A.basic_amt * power((1 + a.interest) , b.lv),0), 'FM999,999,999,999') price
  from (select 1000000 basic_amt -- 원금 1,000,000
             , 0.01    interest  -- 이자 1%
          from dual) A
      , (select level lv
           from dual
         connect by level <= 100) B -- 횟수