Query editor
with transactions as (selecttx_hashfrom tokens_base.transfers twhere to in (0x1E493E7CF969FD7607A8ACe7198f6C02e5eF85A4,0xc98218Df72975EE1472919d2685e5BD215Baaad4)and block_time >= NOW() - INTERVAL '168' HOURand contract_address in (0x0000000000000000000000000000000000000000, -- ETH0x4200000000000000000000000000000000000006 -- WETH)and "from" not in (0x4200000000000000000000000000000000000006,0x3f80f138221cd5aa201b41456f6400f379508433)),trades_summary as (selectcasewhen token_bought_address in (0x4200000000000000000000000000000000000006,0x0000000000000000000000000000000000000000) then token_sold_symbolwhen token_sold_address in (0x4200000000000000000000000000000000000006,0x0000000000000000000000000000000000000000) then token_bought_symbolwhen token_bought_address = 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913then token_sold_symbolwhen token_sold_address = 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913then token_bought_symbolwhen token_bought_address = 0x1111111111166b7fe7bd91427724b487980afc69then token_sold_symbolwhen token_sold_address = 0x1111111111166b7fe7bd91427724b487980afc69then token_bought_symbolelse token_bought_symbolend as token_symbol,casewhen token_bought_address in (0x4200000000000000000000000000000000000006,0x0000000000000000000000000000000000000000) then token_sold_addresswhen token_sold_address in (0x4200000000000000000000000000000000000006,0x0000000000000000000000000000000000000000) then token_bought_addresswhen token_bought_address = 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913then token_sold_addresswhen token_sold_address = 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913then token_bought_addresswhen token_bought_address = 0x1111111111166b7fe7bd91427724b487980afc69then token_sold_addresswhen token_sold_address = 0x1111111111166b7fe7bd91427724b487980afc69then token_bought_addresselse token_bought_addressend as token_address,SUM(amount_usd) as "Volume"from dex.trades