snowflake-stream

How to build a Snowflake query to get these results

♀尐吖头ヾ 提交于 2020-07-22 05:40:19
问题 The below table (TMP_RN_TC) in query is a temp table which would be used to load the data into the final table. This table has to get the data from stage-table and the output of temp-table data needs to be stored in final table. Stage table will get data for 15-days in every run. But the fact/final table should store all the data for the first run and then after only one day of data which would be changing (rest 14-days data would remain same). Since stage-table will hold even the duplicate