Query editor
select day,blockchain,interface,sum(amount_usd) as total_usd_volumefrom (select date_trunc('day', block_time) as day,blockchain,case when tx_to in (0xb555edF5dcF85f42cEeF1f3630a52A108E55A654,0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D,--eth router020xf164fC0Ec4E93095b804a4795bBe1e041497b92a, --eth router010xE592427A0AEce92De3Edee1F18E0157C05861564, --eth v3 router0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45, --eth swaprouter020x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD, --eth universalrouterv1.20xEf1c6E67703c7BD7107eed8303Fbe6EC2554BF6B, --eth universalrouter0x4C60051384bd2d3C01bfc845Cf5F4b44bcbE9de5,0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD) then 'Router'else 'Contract'end as interface,amount_usdfrom dex.tradeswhere blockchain in ('ethereum', 'optimism', 'arbitrum', 'polygon')and project = 'uniswap'and block_time > cast('2023-01-18' as timestamp))--where interface = 1WHERE blockchain = 'ethereum'group by 1, 2, 3