Query editor
with rwa as ( select week as week1, ( wCFG_volume + TRU_volume + MPL_volume + GFI_volume + CPOOL_volume ) as rwa_volfrom query_2353730 -- RWA DEX Volumewhere week >= CAST('{{Start_Date}}' AS TIMESTAMP) ),ai as (with ocean as (SELECT date_trunc('{{TimeFrame}}', block_date) as week,COALESCE(SUM(amount_usd), 0) as ocean_volumeFROM dex.tradeswhere token_bought_address = 0x967da4048cd07ab37855c090aaf366e4ce1b9f48 --oceangroup by 1 ),fet as (SELECT date_trunc('{{TimeFrame}}', block_date) as week,COALESCE(SUM(amount_usd), 0) as fet_volumeFROM dex.tradeswhere token_bought_address = 0xaea46A60368A7bD060eec7DF8CBa43b7EF41Ad85 --fetgroup by 1 ),agix as (SELECT date_trunc('{{TimeFrame}}', block_date) as week,COALESCE(SUM(amount_usd), 0) as agix_volumeFROM dex.tradeswhere token_bought_address = 0x5B7533812759B45C2B44C19e320ba2cD2681b542 --agixgroup by 1 ),orai as (SELECT date_trunc('{{TimeFrame}}', block_date) as week,COALESCE(SUM(amount_usd), 0) as orai_volumeFROM dex.tradeswhere token_bought_address = 0x4c11249814f11b9346808179Cf06e71ac328c1b5 --oraigroup by 1 ),ali as (SELECT date_trunc('{{TimeFrame}}', block_date) as week,COALESCE(SUM(amount_usd), 0) as ali_volumeFROM dex.tradeswhere token_bought_address = 0x6b0b3a982b4634ac68dd83a4dbf02311ce324181 --aligroup by 1 )select ocean.week as week1 , COALESCE((COALESCE(ocean_volume,0) + COALESCE(fet_volume,0) + COALESCE(agix_volume,0) + COALESCE(orai_volume,0) + COALESCE(ali_volume,0)),0) as ai_volfrom oceanleft join fet on fet.week = ocean.weekleft join agix on agix.week = ocean.weekleft join orai on orai.week = ocean.weekleft join ali on ali.week = ocean.weekwhere ocean.week >= CAST('{{Start_Date}}' AS TIMESTAMP)),gamblefi as (with fun as (SELECT date_trunc('{{TimeFrame}}', block_date) as week,COALESCE(SUM(amount_usd),0) as fun_volumeFROM dex.tradeswhere token_bought_address = 0x419D0d8BdD9aF5e606Ae2232ed285Aff190E711b --fungroup by 1 ),betu as (SELECT date_trunc('{{TimeFrame}}', block_date) as week,COALESCE(SUM(amount_usd),0) as betu_volumeFROM dex.tradeswhere token_bought_address = 0x0df1b3f30865c5b324797f8db9d339514cac4e94 --betu