Query editor
WITH dai_ohm_bal AS (SELECTDATE_TRUNC('{{timeframe}}', block_date) AS days,SUM(CAST(amount_usd AS DOUBLE)) AS daiohm_bal_usd_volumeFROM balancer_ethereum.tradesWHERE token_pair = 'DAI-OHM'AND block_date > CAST('2022-12-15' AS TIMESTAMP)AND project_contract_address = 0x76fcf0e8c7ff37a47a799fa2cd4c13cde0d981c9GROUP BY 1),ohm_weth_bal AS (SELECTDATE_TRUNC('{{timeframe}}', block_date) AS date_range,SUM(CAST(amount_usd AS DOUBLE)) AS ohmweth_bal_usd_volumeFROM balancer_ethereum.tradesWHERE token_pair = 'OHM-WETH'AND block_date > CAST('2022-12-15' AS TIMESTAMP)AND project_contract_address = 0xd1ec5e215e8148d76f4460e4097fd3d5ae0a3558GROUP BY 1),bond_ohm_bal AS (SELECTDATE_TRUNC('{{timeframe}}', block_date) AS days4,SUM(CAST(amount_usd AS DOUBLE)) AS bondohm_bal_usd_volumeFROM balancer_ethereum.tradesWHERE token_pair = 'BOND-OHM'AND block_date > CAST('2022-12-15' AS TIMESTAMP)AND project_contract_address = 0xf5f6fb82649df7991054ef796c39da81b93364dfGROUP BY 1),brtfly_ohm_bal AS (SELECTDATE_TRUNC('{{timeframe}}', block_date) AS days5,SUM(CAST(amount_usd AS DOUBLE)) AS brtflyohm_bal_usd_volumeFROM balancer_ethereum.tradesWHERE token_pair = 'BTRFLY-OHM'AND block_date > CAST('2022-12-15' AS TIMESTAMP)AND project_contract_address = 0x2de32a7c98c3ef6ec79e703500e8ca5b2ec819aaGROUP BY 1),ohm_wseth_bal AS (SELECTDATE_TRUNC('{{timeframe}}', block_date) AS days6,SUM(CAST(amount_usd AS DOUBLE)) AS ohmwsteth_bal_usd_volumeFROM balancer_ethereum.tradesWHERE token_pair = 'OHM-wstETH'AND block_date > CAST('2022-12-15' AS TIMESTAMP)AND project_contract_address = 0xd4f79ca0ac83192693bce4699d0c10c66aa6cf0fGROUP BY 1),crvfrax_ohm_crv as (SELECTDATE_TRUNC('{{timeframe}}', block_date) AS days3,SUM(CAST(amount_usd AS DOUBLE)) AS crvFRAXOHM_crv_usd_volumeFROM curvefi.trades