Query editor
withaddress_list (address) as (values(0xe9ed3ad8e68b3925a33cab867a29c73e8357cfc4),(0xddfE1B91ae6E668fEF58de7289EACF6db32e4167)),address_bought_tokens_summary as (selecttx_from,token_bought_address,token_bought_symbol,sum(token_bought_amount) as token_bought_amount,sum(token_sold_amount) as token_sold_amountfromdex.tradeswhereblock_date > date(TIMESTAMP '{{date_time}}' - interval '1' day)and blockchain = 'ethereum'and tx_from in ( select address from address_list )and token_bought_address not in (0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 -- WETH)group bytx_from,token_bought_address,token_bought_symbol),address_sold_tokens_summary as (selecttx_from,token_sold_address,token_sold_symbol,sum(token_sold_amount) as token_sold_amount,sum(token_bought_amount) as token_bought_amountfromdex.tradeswhereblock_date > date(TIMESTAMP '{{date_time}}' - interval '1' day)and blockchain = 'ethereum'and tx_from in ( select address from address_list )and token_sold_address not in (0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 -- WETH)group bytx_from,token_sold_address,token_sold_symbol),address_trade_token_list as (selecttx_from as address,token_sold_address as token_addressfromdex.tradeswhereblock_date > date(timestamp '{{date_time}}' - interval '1' day)and blockchain = 'ethereum'and tx_from in ( select address from address_list )unionselect