Query editor
with temp as (select date_trunc('week', evt_block_time) as dt, case when transfers."from" = 0x0000000000000000000000000000000000000000 then 'stake'when transfers."to" = 0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1 then 'unstake' end as is_stake, count(distinct evt_tx_hash) as txs, count(distinct transactions."from") as wallets, sum(cast(transfers.value as double) / pow(10, 18)) as volume_stethfrom erc20_ethereum.evt_Transfer as transfersjoin ethereum.transactions on transfers.evt_tx_hash = transactions.hashwhere evt_block_time > date_trunc('week', now() - interval '175' day)and evt_block_time < date_trunc('week', now())and (transfers."from" = 0x0000000000000000000000000000000000000000 or transfers."to" = 0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1)-- and "to" = 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84and contract_address = 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84and transactions."from" != 0x4a87ecdfb459eb36d25226d9ccd7ec4f684ab3fcgroup by 1, 2)select dt, is_stake, case when is_stake = 'unstake' then -txs else txs end as txs, case when is_stake = 'unstake' then -wallets else wallets end as wallets, case when is_stake = 'unstake' then -volume_steth else volume_steth end as volume_stethfrom temp/*select date_trunc('day', evt_block_time) as dt, count(*) as txs, count(evt_tx_hash) as txs_check, count(distinct "from") as walletsfrom erc20_ethereum.evt_Transferwhere evt_block_time > date('2023-04-01')and "to" = 0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1and contract_address = 0xae7ab96520de3a18e5e111b5eaab095312d7fe84group by 1*/