Query editor
withdex_price as (select symbol as dex_symbol, decimals as dex_decimals, avg(token_price_usd) as dex_pricefrom dex.prices_latest,tokens.erc20where token_address = 0x6900F7B42fb4abb615c938DB6a26d73a9AFbed69and contract_address = 0x6900F7B42fb4abb615c938DB6a26d73a9AFbed69and blockchain = 'ethereum'group by 1,2),supply as (select sum(cast(value as double)*-1) as amountfromerc20_ethereum.evt_Transferwhere contract_address = 0x6900F7B42fb4abb615c938DB6a26d73a9AFbed69and "to" in (0x0000000000000000000000000000000000000000,0x000000000000000000000000000000000000dEaD,0xD15a672319Cf0352560eE76d9e89eAB0889046D3)union allselect sum(cast(value as double)) as amountfrom erc20_ethereum.evt_Transferwhere contract_address = 0x6900F7B42fb4abb615c938DB6a26d73a9AFbed69and "from"=0x0000000000000000000000000000000000000000)selectdex_symbol as symbol,dex_price as price,sum(amount*dex_price/power(10,dex_decimals)) as market_cap,sum(amount/power(10,dex_decimals)) as circulatingfrom supply,dex_pricegroup by 1,2