title: How to create table depends on values from other table and depend on those values SQL
body: <p>As in title im searching a way to create new table. The table will be a table of contracts per month</p>
  
  <pre><code>create table NR1
  (
    id         INTEGER not null,
    price      INTEGER,
    price2     INTEGER,
    start_date DATE,
    end_date   DATE,
    duration   NUMBER
  )
  </code></pre>
  
  <p>depending on duration, i want to cut whole date from start_date to end_date into small month pieces, and put it as a row, for example if one row with duration 5 and starting date 2018-05-01, then i want to have in new table 5 rows with each month, so 2018-05-01, 2018-06-01, ..., 2018-10-01.</p>
  
  <p>Can you tell me what should i use to solve this problem?</p>