Query editor
/* select * from dex_trades *//* order by block_time desc */WITHdex_trades AS (SELECTtoken_sold_address AS contract_address,amount_usd / CAST(token_sold_amount AS DOUBLE) AS price,block_time,project,amount_usd,token_sold_amount AS token_amountFROMdex.tradesWHEREblockchain = 'ethereum'AND blockchain = 'ethereum'AND 1 = 1AND amount_usd > 0AND token_sold_amount > 0AND token_sold_address = 0xca1207647Ff814039530D7d35df0e1Dd2e91Fa84UNION ALLSELECTtoken_bought_address AS contract_address,amount_usd / CAST(token_bought_amount AS DOUBLE) AS price,block_time,project,amount_usd,token_bought_amount AS token_amountFROMdex.tradesWHEREblockchain = 'ethereum'AND blockchain = 'ethereum'AND 1 = 1AND amount_usd > 0AND token_bought_amount > 0AND token_bought_address = 0xca1207647Ff814039530D7d35df0e1Dd2e91Fa84)SELECT*FROMdex_tradesORDER BYblock_time DESCLIMIT1 /* union all *//* select sum(amount_usd), project, date_trunc('day', block_time) from dex_trades group by project, date_trunc('day', block_time) *//* select * from dex."view_token_prices" where contract_address=x'ffffffff2ba8f66d4e51811c5190992176930278' */