Query editor
with max_token_supply as (selectround(sum(value)/1e18) as max_token_supply, 'OLAS' as tagfrom erc20_ethereum.evt_Transferwherecontract_address = 0x0001A500A6B18995B03f44bb040A5fFc28E45CB0and "from" = 0x0000000000000000000000000000000000000000),token_price as(--- get last tx in the poolwith usdc_amount as (selectvalue/1e6 as usdc_value, evt_tx_hashfromerc20_ethereum.evt_Transferwhereevt_tx_hash = (select tx_hash from ethereum.traces_decoded where contract_name = 'OLAS' and function_name = 'transfer' and block_time > timestamp '2023-07-01'order by block_time desc limit 1)and contract_address = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48),olas_amount as (selectvalue/1e18 as olas_value, evt_tx_hashfromerc20_ethereum.evt_Transferwhereevt_tx_hash = (select tx_hash from ethereum.traces_decoded where contract_name = 'OLAS' and function_name = 'transfer' and block_time > timestamp '2023-07-01'order by block_time desc limit 1)and contract_address = 0x0001a500a6b18995b03f44bb040a5ffc28e45cb0) (select (usdc_value/olas_value) as token_price, 'OLAS' as tagfrom usdc_amountleft join olas_amounton usdc_amount.evt_tx_hash = olas_amount.evt_tx_hash))(select round(max_token_supply.max_token_supply * token_price.token_price) as market_capfrom max_token_supplyleft join token_priceon max_token_supply.tag = token_price.tag)