Query editor
select sum(amount) as total_sup,sum(amount) * (select avg(amount_usd / (token_bought_amount_raw / 1e18)) from dex.trades where token_bought_address = 0x164731CD270daA4A94bc70761E53320e48367B8B and block_time >= now() - interval '1' day) as price2,'70000000' as fdv,cast('70000000' as int) * (select avg(amount_usd / (token_bought_amount_raw / 1e18)) from dex.trades where token_bought_address = 0x164731CD270daA4A94bc70761E53320e48367B8B and block_time >= now() - interval '1' day) as price3,'0.1' as IDO_Price,'0.12' as Listing_Pricefrom (selectaddress,casewhen address in (select address from arbitrum.creation_traces) then 'Contract'else 'Address'end as category,sum(amount) as amountfrom (select"from" as address,-sum(value / 1e18) as amountfrom erc20_arbitrum.evt_Transferwhere contract_address = 0x164731CD270daA4A94bc70761E53320e48367B8Bgroup by 1union allselectto as address,sum(value / 1e18) as amountfrom erc20_arbitrum.evt_Transferwhere contract_address = 0x164731CD270daA4A94bc70761E53320e48367B8Bgroup by 1)group by 1)where amount > 0