Query editor
WITH buy_volumesAS(SELECTDATE_TRUNC('day', block_time) AS transaction_date,token_bought_address,SUM(amount_usd) AS buy_volume,COUNT(DISTINCT tx_hash) AS buy_transactionFROMdex.tradesWHEREblockchain = 'base'ANDtoken_bought_address = 0x1111111111166b7FE7bd91427724B487980aFc69 --ZORAGROUP BY token_bought_address, 1),sell_volumesAS(SELECTDATE_TRUNC('day', block_time) AS transaction_date,token_sold_address,SUM(amount_usd) AS sell_volume,COUNT(DISTINCT tx_hash) AS sell_transactionFROMdex.tradesWHEREblockchain = 'base'ANDtoken_sold_address = 0x1111111111166b7FE7bd91427724B487980aFc69 -- ZoraGROUPBYtoken_sold_address,1)SELECTb.transaction_date,b.token_bought_address,b.buy_transaction,s.sell_transaction,b.buy_volume,s.sell_volumeFROMbuy_volumes bJOINsell_volumes sONb.token_bought_address = s.token_sold_addressAND b.transaction_date = s.transaction_date