Given a certain token,for example Sundae, which has
policyID: 9a9693a9a37912a5097918f97918d15240c92ab729a0b7c4aa144d77 fingerprint: asset1m4u92ke6820pkk07m8qmmguye02ewr8g6tezr0
I want to get the information of this token, e.g how many Sundae tokens have been staked,how many Sundae remain in the address of the creator.
To do that,I need to know
(1) the total minted amount of Sundae (in this case 2 millions)
(2) the amount has been released to public (which does not belong to the owners)
(3) the amount remains belonging to the owners
I think I can get (1) by
select multi_asset.name, ma_tx_mint.quantity from public.multi_asset, public.ma_tx_mint, where multi_asset.id = ma_tx_mint.ident and multi_asset.fingerprint = 'asset1m4u92ke6820pkk07m8qmmguye02ewr8g6tezr0'
For (3), at least I can get the address of the creator
select multi_asset.name, ma_tx_mint.quantity, tx.fee, tx.block_id,tx.block_index, tx_out.address, tx_out.value from public.multi_asset, public.ma_tx_mint, public.tx,public.tx_out where multi_asset.id = ma_tx_mint.ident and ma_tx_mint.tx_id = tx.id and tx.id = tx_out.tx_id and multi_asset.fingerprint = 'asset1m4u92ke6820pkk07m8qmmguye02ewr8g6tezr0'
But how to get the remaining amount of Sundae in this address?
For (2),I do not have any idea how to do.
Thanks you very much!