Query editor
with hc_yfi as (selectDATE_TRUNC('month', evt_block_time) as time,sum(value)/pow(10,18) as yfifrom erc20_ethereum.evt_Transferwhere (("from" = 0xFEB4acf3df3cDEA7399794D0869ef76A6EfAff52 or "from" = 0x93A62dA5a14C80f265DAbC077fCEE437B1a0Efde)and to = 0x7dC3A74F0684fc026f9163C6D5c3C99fda2cf60a)or (evt_tx_hash= 0xcc2367b25931f4aa5d394a7f7438f308fda5a728ae7ad4e7ae3b797db12543c7)group by 1),months AS (with month_seq as (SELECT(sequence(cast('2020-10-01' AS DATE),cast(NOW() AS DATE),interval '1' month)) month)SELECTmonths.monthFROM month_seqCROSS JOIN unnest (month) AS months (month))SELECTcast(month AS TIMESTAMP) AS month,COALESCE(yfi, 0) AS hc_yfi,SUM(COALESCE(yfi, 0)) over (ORDER BY cast(month AS TIMESTAMP)) AS total_hc_yfiFROM monthsLEFT JOIN hc_yfi t ON t.time = months.monthGROUP BY1, 2