Query editor
with user as(selectdate_trunc('month',block_date) as month, blockchain, taker as addressfrom dex.tradeswhere project = 'uniswap'and block_date >= cast('{{date}}' as timestamp)union allselectdate_trunc('month',block_date) as month, blockchain, taker as addressfrom dex.tradeswhere project = 'uniswap'and block_date >= cast('{{date}}' as timestamp)), count_user as(selectmonth, blockchain, count(distinct address) as total_userfrom usergroup by 1,2), metrics as (selectdate_trunc('month',block_date) as month, blockchain, sum(amount_usd) as total_volume, count(distinct tx_hash) as total_txsfrom dex.tradeswhere project = 'uniswap'and block_date >= cast('{{date}}' as timestamp)group by 1,2), final as (selectmonth, blockchain, total_volume, total_txs, total_userfrom metricsleft join count_user using (month, blockchain))select * from finalwhere blockchain in ('ethereum', 'bnb', 'polygon', 'arbitrum', 'optimism', 'fantom')