Query editor
--section 2--Daily number of swaps--Daily trading volume (USD)--Daily unique swappers--Daily gas fees--Daily_protocol_fee_usd--Daily gas usedwith daily_trend as(selectdate_trunc('day', block_time) as day,tx_hash,taker,amount_usdfrom dex.trades dwhere project = 'balancer'and block_time >= now() - interval '6' month),fee as (selecttx_hash,tx_fee_usd,gas_used gas_usedfrom gas.fees gwhere block_time >= now() - interval '6' month),protocol_fee as (selecttx_hash,(amount_usd * swap_fee) as protocol_feefrom balancer_ethereum.trades bwhere block_time >= now() - interval '6' month)selectd.day,count(d.tx_hash) as daily_number_of_swaps,count(distinct d.taker) as daily_unique_swappers,sum(d.amount_usd) as daily_trading_volume_usd,sum(g.tx_fee_usd) as daily_gas_fees_usd,-- protocol revenue/feesum(b.protocol_fee) as daily_protocol_fee_on_eth,sum(g.gas_used) as daily_gas_usedfrom daily_trend dleft join fee gon d.tx_hash = g.tx_hashleft join protocol_fee bon d.tx_hash = b.tx_hashgroup by 1order by 1 desc