Query editor
with transfers as (selectevt_block_time,casewhen contract_address = 0x9C215206Da4bf108aE5aEEf9dA7caD3352A36Dad and "to" = 0x0000000000000000000000000000000000000000 then -cast(value as double)when contract_address = 0x9C215206Da4bf108aE5aEEf9dA7caD3352A36Dad and "from" = 0x0000000000000000000000000000000000000000 then cast(value as double)end as sanUSDCfrom erc20_ethereum.evt_Transferwhere ("to" = 0x0000000000000000000000000000000000000000 or "from" = 0x0000000000000000000000000000000000000000)and contract_address = 0x9C215206Da4bf108aE5aEEf9dA7caD3352A36Dad),grouped_transfers as (selectdate_trunc('week', evt_block_time) as week,sum(sanUSDC) as sanUSDCfrom transfersgroup by 1),amount_table as (selectweek,sum(sanUSDC) over (order by week) / 1e6 as sanUSDCfrom grouped_transfers)select * from amount_tableorder by 1 desc