Query editor
WITHdex_total_gas AS (SELECTdt.project AS dex,SUM(CAST(et.gas_used AS DECIMAL) * CAST(et.gas_price AS DECIMAL) / 1e18) AS total_gas_paidFROMdex.trades AS dtLEFT JOIN ethereum.transactions AS etON dt.tx_hash = et.hashWHEREdt.block_time >= NOW() - INTERVAL '7' DAYGROUP BYdt.project)SELECTdex_total_gas.dex AS "Dex",ROUND(total_gas_paid, 2) AS "Total Gas Paid"FROMdex_total_gasORDER BYtotal_gas_paid DESC;