Query editor
-- This query has been migrated to run on DuneSQL.-- If you need to change back because you’re seeing issues, use the Query History view to restore the previous version.-- If you notice a regression, please email [email protected].with wsteth_price as (selectblock_date,oracle_price,'wstETH' as assetfrom chainlink_gnosis.price_feedswhere proxy_address = 0x0064AC007fF665CF8D0D3Af5E0AD1c26a3f853eAunion allselectblock_date,oracle_price,'USDC.e' as assetfrom chainlink_gnosis.price_feedswhere proxy_address = 0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eb48),gnosis_trades as (SELECT'gnosis' as blockchain,token_pair,sell_token,buy_token,units_sold,trader,min(block_time) min_date,sum(units_bought) bought,sum(units_sold) sold,sum(ROUND(usd_value)) AS usd_valueFROMcow_protocol_gnosis.trades t--cow_protocol_ethereum.trades tWHEREblock_date > cast('2024-06-10'as date)and trader in (0x23b4f73FB31e89B27De17f9c5DE2660cc1FB0CdF, 0x458cD345B4C05e8DF39d0A07220feb4Ec19F5e6f)and buy_token = 'GNO'and token_pair <> 'GNO-osGNO'group by 1,2,3,4,5,6),ethereum_trades as (SELECT'ethereum' as blockchain,token_pair,sell_token,buy_token,units_sold,trader,min(block_time) min_date,sum(units_bought) bought,sum(units_sold) sold,sum(ROUND(usd_value)) AS usd_value