Query editor
with circulating_supply as (selectsum(casewhen "from" = 0x0000000000000000000000000000000000000000then cast(value as double) / 1e18when "to" = 0x0000000000000000000000000000000000000000then -(cast(value as double) / 1e18)else 0end) as circulating_supplyfrom erc20_base.evt_transferwhere contract_address = {{contract_address}}),launch_date as (selectcontract_address,min(evt_block_time) as launched_atfrom erc20_base.evt_transferwhere "from" = 0x0000000000000000000000000000000000000000and contract_address = {{contract_address}}group by contract_address),all_trades as (selectamount_usd / token_bought_amount as price_usd,amount_usd,block_timefrom dex.tradeswhere blockchain = 'base'and token_bought_address = {{contract_address}}and amount_usd > 0and token_bought_amount > 0union allselectamount_usd / token_sold_amount as price_usd,amount_usd,block_timefrom dex.tradeswhere blockchain = 'base'and token_sold_address = {{contract_address}}and amount_usd > 0and token_sold_amount > 0),latest_price as (selectprice_usdfrom all_tradesorder by block_time desclimit 1),price_24h_ago as (selectprice_usd