Query editor
withstablecoin as (select blockchain,contract_address,symbolfrom tokens.erc20_stablecoinswhere symbol in ('USDC', 'USDT')and blockchain in ('ethereum', 'arbitrum', 'polygon', 'base', 'optimism')),account as (selectblockchain,sender as walletfrom account_abstraction_erc4337.account_deployedwhere blockchain in ('ethereum', 'arbitrum', 'polygon', 'base', 'optimism')-- SELECT-- output_account,-- MIN(call_block_time) as call_block_time,-- chain-- FROM coinbase_smart_wallet_multichain.coinbasesmartwalletfactory_call_createaccount-- GROUP BY output_account, chain;),volume as (select-- date_trunc('week', block_date) as week,block_month,t.blockchain,count(distinct "from") as active_wallets,count(distinct tx_hash) as transactions,sum(amount) as token_amt,sum(amount_usd) as usd_amtfrom tokens.transfers tjoin account aon "from" = walletand t.blockchain = a.blockchainjoin stablecoin son s.contract_address = t.contract_addressand s.blockchain = t.blockchainand block_date >= date '2025-01-01'where t.blockchain in ('ethereum', 'arbitrum', 'polygon', 'base', 'optimism')group by 1,2)select *,sum(transactions) over (partition by blockchain order by block_month) as total_chain_transactions,sum(usd_amt) over (partition by blockchain order by block_month) as total_chain_volume,sum(transactions) over (order by block_month) as total_transactions,