Query editor
WITH trades AS (SELECTblock_date,tx_hash,amount_usd,takerFROM dex.tradesWHERE project = 'balancer'AND blockchain = 'ethereum'AND block_date >= CURRENT_DATE - INTERVAL '90' DAY),gas AS (SELECTblock_date,tx_hash,tx_fee_usdFROM gas.feesWHERE blockchain = 'ethereum'AND block_date >= CURRENT_DATE - INTERVAL '90' DAY)SELECTt.block_date AS day,COUNT(DISTINCT t.tx_hash) AS daily_swaps,SUM(t.amount_usd) AS daily_trading_volume,COUNT(DISTINCT t.taker) AS unique_daily_swappers,SUM(g.tx_fee_usd) AS daily_gas_feesFROM trades tLEFT JOIN gas gON t.tx_hash = g.tx_hashAND t.block_date = g.block_dateGROUP BY 1ORDER BY 1 DESC