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_info as (selectmin(evt_block_time) as launched_at,date_diff('day', cast(min(evt_block_time) as date), current_date) as days_since_launchfrom erc20_base.evt_transferwhere contract_address = {{contract_address}}and "from" = 0x0000000000000000000000000000000000000000),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 (select price_usdfrom all_tradesorder by block_time desclimit 1),price_24h_ago as (select price_usdfrom all_tradeswhere block_time <= now() - interval '24' hourorder by block_time desc