I have a table as below
id date. no_of Days
12 12-03-1999 30
13 12-03-1999 7
14 12-03-1999 22
15 12-03-1999 12
I need to create another table with one extra field as date_increment which will be based on given date incremented to 1 day based no_of_days. Output will be like given below
id date. no_of Days. date_increment
12 12-03-1999 30 12-03-1999
12 12-03-1999 30 13-03-1999
12 12-03-1999 30 14-03-1999
.. ..... .. till 30 days
13 12-03-1999 7 12-03-1999
13 12-03-1999 7 13-03-1999
13 12-03-1999 7 14-03-1999
.. ... .. till 7 day
14 12-03-1999 22
15 12-03-1999 12
I am writing this query for snowflake which does not support loop or dynamic query. can somebody please suggest.
Even If i use another IDE like python, I am not sure how to address this.