Query editor
WITH dates AS (SELECT date_column AS periodFROM (VALUES(SEQUENCE(FROM_ISO8601_DATE('2021-01-01'),CAST(now() AS DATE),INTERVAL '1' DAY))) as T1(date_array)CROSS JOIN UNNEST(date_array) AS T2(date_column)),daily AS (SELECTd.period,1e-18 * SUM(COALESCE(CAST(value AS DOUBLE),0)) as day_val--1e-18 * SUM(COALESCE(CAST(value AS DOUBLE),0)) OVER (ORDER BY d.period) AS cumul_stethFROM dates dLEFT JOIN lido_ethereum.steth_evt_Transfer t ON d.period = DATE_TRUNC('day', t.evt_block_time) AND t."to" = 0x3e40D73EB977Dc6a537aF587D48316feE66E9C8cGROUP BY 1ORDER BY 1)SELECTDATE_TRUNC('month', period) as month,sum(day_val)FROM dailyGROUP BY 1ORDER BY 1