Query editor
-- need to make this like https://dune.com/queries/2305078/3775279 but for USD amountswithone_erc20_deposits as (select"_token" as token,symbol,cast("_amount" as double)/power(10,pr.decimals)*pr.price as amt_usd,call_tx_hash as hashfrom 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_success),one_eth_deposits as (selectvalue/1e18*pr.price as amt_usd,hashfrom 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'),data as (selectcase when amt_usd<5 then '$5 or less'when amt_usd between 5 and 100 then '$5 to $100'when amt_usd between 100 and 10000 then '$100 to $10k'when amt_usd between 10000 and 100000 then '$10k to $100k'when 100000 <= amt_usd then '$100k or more'end as amt,count(hash) as depositsfrom (select amt_usd, hash from one_erc20_depositsunion allselect amt_usd, hash from one_eth_deposits)group by 1),temp as (select amt, deposits, sum(deposits) over () as totalfrom data)select amt as "Amount",cast(deposits as double)/cast(total as double) as "Percentage"from temporder by 1