Query editor
withone_erc20_deposits as (selectdate_trunc('day', call_block_time) as block_time,"_token" as token,symbol,(sum(cast("_amount" as double))/power(10, avg(pr.decimals)))*avg(pr.price) as amt_usd,count(distinct "_franklinAddr") as depositors,count(call_tx_hash) as num_transactionsfrom zksync_ethereum.ZkSync_call_depositERC20 zkjoin prices.usd pr on (pr.contract_address = zk."_token" and date_trunc('minute', call_block_time) = minute)where call_successand call_block_time = date('2023-03-20')group by 1, 2, 3),one_eth_deposits as (select date_trunc('day', block_time) as block_time,sum(value)/1e18*avg(pr.price) as amt_usd,count(hash) as num_transactionsfrom ethereum.transactionsjoin zksync_ethereum.ZkSync_call_depositETH on (call_tx_hash = hash and call_block_time = block_time)join prices.usd pr on (date_trunc('minute', block_time) = minute)where "to" = 0xabea9132b05a70803a4e85094fd0e1800777fbefand successand pr.symbol = 'WETH'and blockchain = 'ethereum'group by 1)select amts.block_time, sum(amts.amt_usd) as "Deposits (USD)", sum(num_transactions) as "# of Deposits"from (select block_time, amt_usd, num_transactions from one_erc20_depositsunion allselect block_time, amt_usd, num_transactions from one_eth_deposits) amtswhere amts.block_time > now() - interval '{{timeframe}}' daygroup by 1 order by 1--and amts.symbol != 'ZZ' -- they bridged over 10 million usd in ZZ tokens on March 1st so this skews the Y-Axis