Query editor
select-- amount_usd-- ,block_time-- ,case when token_sold_address = 0x5Ca135cB8527d76e932f34B5145575F9d8cbE08E then token_sold_amount else token_bought_amount end as token_amountblockchain,project,block_time,amount_usd,casewhen token_bought_address = 0x5Ca135cB8527d76e932f34B5145575F9d8cbE08E then token_bought_amountelse -token_sold_amountend as fpi_flow,case when token_bought_address = 0x5Ca135cB8527d76e932f34B5145575F9d8cbE08E then token_sold_symbolelse token_bought_symbolend as other_token_symbol,case when token_bought_address = 0x5Ca135cB8527d76e932f34B5145575F9d8cbE08E then -token_sold_amountelse token_bought_amountend as other_token_flow,taker,case when token_bought_address = 0x5Ca135cB8527d76e932f34B5145575F9d8cbE08E then token_sold_addresselse token_bought_addressend as other_token_address,0x5Ca135cB8527d76e932f34B5145575F9d8cbE08E as fpi_address,token_pair,block_date,project_contract_address,tx_hash,tx_from,tx_to,evt_index,version as project_versionfrom dex.tradeswhereblock_date >= timestamp '2022-03-29 00:00'and (token_sold_address = 0x5Ca135cB8527d76e932f34B5145575F9d8cbE08Eor token_bought_address = 0x5Ca135cB8527d76e932f34B5145575F9d8cbE08E)and amount_usd>0order by block_date desc